From 7567fbca0627f55b80dd4b5dd0c8b563dfd1bc96 Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Mon, 8 Apr 2019 15:43:06 -0400 Subject: [PATCH 001/327] Update meteor-babel and babel-compiler to version 7.4.3. --- History.md | 10 + .../.npm/package/npm-shrinkwrap.json | 228 +++++++++--------- packages/babel-compiler/package.js | 4 +- packages/ecmascript/package.js | 2 +- scripts/dev-bundle-tool-package.js | 7 +- 5 files changed, 129 insertions(+), 122 deletions(-) diff --git a/History.md b/History.md index c415b5d0ea..cafbaa1817 100644 --- a/History.md +++ b/History.md @@ -1,5 +1,15 @@ ## v.NEXT +### Breaking changes +N/A + +### Migration Steps +N/A + +### Changes + +* The `meteor-babel` npm package has been updated to version 7.4.3. + ## v1.8.1, 2019-04-03 ### Breaking changes diff --git a/packages/babel-compiler/.npm/package/npm-shrinkwrap.json b/packages/babel-compiler/.npm/package/npm-shrinkwrap.json index a927664f22..6b11a073b6 100644 --- a/packages/babel-compiler/.npm/package/npm-shrinkwrap.json +++ b/packages/babel-compiler/.npm/package/npm-shrinkwrap.json @@ -7,9 +7,9 @@ "integrity": "sha512-OfC2uemaknXr87bdLUkWog7nYuliM9Ij5HUcajsVcMCpQrcLmtxRbVFTIqmcSkSeYRBFBRxs2FiUqFJDLdiebA==" }, "@babel/core": { - "version": "7.3.4", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.3.4.tgz", - "integrity": "sha512-jRsuseXBo9pN197KnDwhhaaBzyZr2oIcLHHTt2oDdQrej5Qp57dCCJafWx5ivU8/alEYDpssYqv1MUqcxwQlrA==", + "version": "7.4.3", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.4.3.tgz", + "integrity": "sha512-oDpASqKFlbspQfzAE7yaeTmdljSH2ADIvBlb0RwbStltTuWa0+7CCI1fYVINNv9saHPa1W7oaKeuNuKj+RQCvA==", "dependencies": { "json5": { "version": "2.1.0", @@ -19,9 +19,9 @@ } }, "@babel/generator": { - "version": "7.3.4", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.3.4.tgz", - "integrity": "sha512-8EXhHRFqlVVWXPezBW5keTiQi/rJMQTg/Y9uVCEZ0CAF3PKtCCaVRnp64Ii1ujhkoDhhF1fVsImoN4yJ2uz4Wg==" + "version": "7.4.0", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.4.0.tgz", + "integrity": "sha512-/v5I+a1jhGSKLgZDcmAUZ4K/VePi43eRkUs3yePW1HB1iANOD5tqJXwGSG4BZhSksP8J9ejSlwGeTiiOFZOrXQ==" }, "@babel/helper-annotate-as-pure": { "version": "7.0.0", @@ -39,19 +39,19 @@ "integrity": "sha512-MjA9KgwCuPEkQd9ncSXvSyJ5y+j2sICHyrI0M3L+6fnS4wMSNDc1ARXsbTfbb2cXHn17VisSnU/sHFTCxVxSMw==" }, "@babel/helper-call-delegate": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@babel/helper-call-delegate/-/helper-call-delegate-7.1.0.tgz", - "integrity": "sha512-YEtYZrw3GUK6emQHKthltKNZwszBcHK58Ygcis+gVUrF4/FmTVr5CCqQNSfmvg2y+YDEANyYoaLz/SHsnusCwQ==" + "version": "7.4.0", + "resolved": "https://registry.npmjs.org/@babel/helper-call-delegate/-/helper-call-delegate-7.4.0.tgz", + "integrity": "sha512-SdqDfbVdNQCBp3WhK2mNdDvHd3BD6qbmIc43CAyjnsfCmgHMeqgDcM3BzY2lchi7HBJGJ2CVdynLWbezaE4mmQ==" }, "@babel/helper-create-class-features-plugin": { - "version": "7.3.4", - "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.3.4.tgz", - "integrity": "sha512-uFpzw6L2omjibjxa8VGZsJUPL5wJH0zzGKpoz0ccBkzIa6C8kWNUbiBmQ0rgOKWlHJ6qzmfa6lTiGchiV8SC+g==" + "version": "7.4.3", + "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.4.3.tgz", + "integrity": "sha512-UMl3TSpX11PuODYdWGrUeW6zFkdYhDn7wRLrOuNVM6f9L+S9CzmDXYyrp3MTHcwWjnzur1f/Op8A7iYZWya2Yg==" }, "@babel/helper-define-map": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@babel/helper-define-map/-/helper-define-map-7.1.0.tgz", - "integrity": "sha512-yPPcW8dc3gZLN+U1mhYV91QU3n5uTbx7DUdf8NnPbjS0RMwBuHi9Xt2MUgppmNz7CJxTBWsGczTiEp1CSOTPRg==" + "version": "7.4.0", + "resolved": "https://registry.npmjs.org/@babel/helper-define-map/-/helper-define-map-7.4.0.tgz", + "integrity": "sha512-wAhQ9HdnLIywERVcSvX40CEJwKdAa1ID4neI9NXQPDOHwwA+57DqwLiPEVy2AIyWzAk0CQ8qx4awO0VUURwLtA==" }, "@babel/helper-explode-assignable-expression": { "version": "7.1.0", @@ -69,9 +69,9 @@ "integrity": "sha512-r2DbJeg4svYvt3HOS74U4eWKsUAMRH01Z1ds1zx8KNTPtpTL5JAsdFv8BNyOpVqdFhHkkRDIg5B4AsxmkjAlmQ==" }, "@babel/helper-hoist-variables": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.0.0.tgz", - "integrity": "sha512-Ggv5sldXUeSKsuzLkddtyhyHe2YantsxWKNi7A+7LeD12ExRDWTRk29JCXpaHPAbMaIPZSil7n+lq78WY2VY7w==" + "version": "7.4.0", + "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.4.0.tgz", + "integrity": "sha512-/NErCuoe/et17IlAQFKWM24qtyYYie7sFIrW/tIQXpck6vAu2hhtYYsKLBWQV+BQZMbcIYPU/QMYuTufrY4aQw==" }, "@babel/helper-member-expression-to-functions": { "version": "7.0.0", @@ -84,9 +84,9 @@ "integrity": "sha512-aP/hlLq01DWNEiDg4Jn23i+CXxW/owM4WpDLFUbpjxe4NS3BhLVZQ5i7E0ZrxuQ/vwekIeciyamgB1UIYxxM6A==" }, "@babel/helper-module-transforms": { - "version": "7.2.2", - "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.2.2.tgz", - "integrity": "sha512-YRD7I6Wsv+IHuTPkAmAS4HhY0dkPobgLftHp0cRGZSdrRvmZY8rFvae/GVu3bD00qscuvK3WPHB3YdNpBXUqrA==" + "version": "7.4.3", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.4.3.tgz", + "integrity": "sha512-H88T9IySZW25anu5uqyaC1DaQre7ofM+joZtAaO2F8NBdFfupH0SZ4gKjgSFVcvtx/aAirqA9L9Clio2heYbZA==" }, "@babel/helper-optimise-call-expression": { "version": "7.0.0", @@ -99,9 +99,9 @@ "integrity": "sha512-CYAOUCARwExnEixLdB6sDm2dIJ/YgEAKDM1MOeMeZu9Ld/bDgVo8aiWrXwcY7OBh+1Ea2uUcVRcxKk0GJvW7QA==" }, "@babel/helper-regex": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/@babel/helper-regex/-/helper-regex-7.0.0.tgz", - "integrity": "sha512-TR0/N0NDCcUIUEbqV6dCO+LptmmSQFQ7q70lfcEB4URsjD0E1HzicrwUH+ap6BAQ2jhCX9Q4UqZy4wilujWlkg==" + "version": "7.4.3", + "resolved": "https://registry.npmjs.org/@babel/helper-regex/-/helper-regex-7.4.3.tgz", + "integrity": "sha512-hnoq5u96pLCfgjXuj8ZLX3QQ+6nAulS+zSgi6HulUwFbEruRAKwbGLU5OvXkE14L8XW6XsQEKsIDfgthKLRAyA==" }, "@babel/helper-remap-async-to-generator": { "version": "7.1.0", @@ -109,9 +109,9 @@ "integrity": "sha512-3fOK0L+Fdlg8S5al8u/hWE6vhufGSn0bN09xm2LXMy//REAF8kDCrYoOBKYmA8m5Nom+sV9LyLCwrFynA8/slg==" }, "@babel/helper-replace-supers": { - "version": "7.3.4", - "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.3.4.tgz", - "integrity": "sha512-pvObL9WVf2ADs+ePg0jrqlhHoxRXlOa+SHRHzAXIz2xkYuOHfGl+fKxPMaS4Fq+uje8JQPobnertBBvyrWnQ1A==" + "version": "7.4.0", + "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.4.0.tgz", + "integrity": "sha512-PVwCVnWWAgnal+kJ+ZSAphzyl58XrFeSKSAJRiqg5QToTsjL+Xu1f9+RJ+d+Q0aPhPfBGaYfkox66k86thxNSg==" }, "@babel/helper-simple-access": { "version": "7.1.0", @@ -119,9 +119,9 @@ "integrity": "sha512-Vk+78hNjRbsiu49zAPALxTb+JUQCz1aolpd8osOF16BGnLtseD21nbHgLPGUwrXEurZgiCOUmvs3ExTu4F5x6w==" }, "@babel/helper-split-export-declaration": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.0.0.tgz", - "integrity": "sha512-MXkOJqva62dfC0w85mEf/LucPPS/1+04nmmRMPEBUB++hiiThQ2zPtX/mEWQ3mtzCEjIJvPY8nuwxXtQeQwUag==" + "version": "7.4.0", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.4.0.tgz", + "integrity": "sha512-7Cuc6JZiYShaZnybDmfwhY4UYHzI6rlqhWjaIqbsJGsIqPimEYy5uh3akSRLMg65LSdSEnJ8a8/bWQN6u2oMGw==" }, "@babel/helper-wrap-function": { "version": "7.2.0", @@ -129,9 +129,9 @@ "integrity": "sha512-o9fP1BZLLSrYlxYEYyl2aS+Flun5gtjTIG8iln+XuEzQTs0PLagAGSXUcqruJwD5fM48jzIEggCKpIfWTcR7pQ==" }, "@babel/helpers": { - "version": "7.3.1", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.3.1.tgz", - "integrity": "sha512-Q82R3jKsVpUV99mgX50gOPCWwco9Ec5Iln/8Vyu4osNIOQgSrd9RFrQeUvmvddFNoLwMyOUWU+5ckioEKpDoGA==" + "version": "7.4.3", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.4.3.tgz", + "integrity": "sha512-BMh7X0oZqb36CfyhvtbSmcWc3GXocfxv3yNsAEuM0l+fAqSO22rQrUpijr3oE/10jCTrB6/0b9kzmG4VetCj8Q==" }, "@babel/highlight": { "version": "7.0.0", @@ -139,9 +139,9 @@ "integrity": "sha512-UFMC4ZeFC48Tpvj7C8UgLvtkaUuovQX+5xNWrsIoMG8o2z+XFKjKaN9iVmS84dPwVN00W4wPmqvYoZF3EGAsfw==" }, "@babel/parser": { - "version": "7.3.4", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.3.4.tgz", - "integrity": "sha512-tXZCqWtlOOP4wgCp6RjRvLmfuhnqTLy9VHwRochJBCP2nDm27JnnuFEnXFASVyQNHk36jD1tAammsCEEqgscIQ==" + "version": "7.4.3", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.4.3.tgz", + "integrity": "sha512-gxpEUhTS1sGA63EGQGuA+WESPR/6tz6ng7tSHFCmaTJK/cGK8y37cBTspX+U2xCAue2IQVvF6Z0oigmjwD8YGQ==" }, "@babel/plugin-proposal-async-generator-functions": { "version": "7.2.0", @@ -149,14 +149,14 @@ "integrity": "sha512-+Dfo/SCQqrwx48ptLVGLdE39YtWRuKc/Y9I5Fy0P1DDBB9lsAHpjcEJQt+4IifuSOSTLBKJObJqMvaO1pIE8LQ==" }, "@babel/plugin-proposal-class-properties": { - "version": "7.3.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.3.4.tgz", - "integrity": "sha512-lUf8D3HLs4yYlAo8zjuneLvfxN7qfKv1Yzbj5vjqaqMJxgJA3Ipwp4VUJ+OrOdz53Wbww6ahwB8UhB2HQyLotA==" + "version": "7.4.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.4.0.tgz", + "integrity": "sha512-t2ECPNOXsIeK1JxJNKmgbzQtoG27KIlVE61vTqX0DKR9E9sZlVVxWUtEW9D5FlZ8b8j7SBNCHY47GgPKCKlpPg==" }, "@babel/plugin-proposal-object-rest-spread": { - "version": "7.3.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.3.4.tgz", - "integrity": "sha512-j7VQmbbkA+qrzNqbKHrBsW3ddFnOeva6wzSe/zB7T+xaxGc+RCpwo44wCmRixAIGRoIpmVgvzFzNJqQcO3/9RA==" + "version": "7.4.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.4.3.tgz", + "integrity": "sha512-xC//6DNSSHVjq8O2ge0dyYlhshsH4T7XdCVoxbi5HzLYWfsC5ooFlJjrXk8RcAT+hjHAK9UjBXdylzSoDK3t4g==" }, "@babel/plugin-syntax-async-generators": { "version": "7.2.0", @@ -194,9 +194,9 @@ "integrity": "sha512-ER77Cax1+8/8jCB9fo4Ud161OZzWN5qawi4GusDuRLcDbDG+bIGYY20zb2dfAFdTRGzrfq2xZPvF0R64EHnimg==" }, "@babel/plugin-transform-async-to-generator": { - "version": "7.3.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.3.4.tgz", - "integrity": "sha512-Y7nCzv2fw/jEZ9f678MuKdMo99MFDJMT/PvD9LisrR5JDFcJH6vYeH6RnjVt3p5tceyGRvTtEN0VOlU+rgHZjA==" + "version": "7.4.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.4.0.tgz", + "integrity": "sha512-EeaFdCeUULM+GPFEsf7pFcNSxM7hYjoj5fiYbyuiXobW4JhFnjAv9OWzNwHyHcKoPNpAfeRDuW6VyaXEDUBa7g==" }, "@babel/plugin-transform-block-scoped-functions": { "version": "7.2.0", @@ -204,14 +204,14 @@ "integrity": "sha512-ntQPR6q1/NKuphly49+QiQiTN0O63uOwjdD6dhIjSWBI5xlrbUFh720TIpzBhpnrLfv2tNH/BXvLIab1+BAI0w==" }, "@babel/plugin-transform-block-scoping": { - "version": "7.3.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.3.4.tgz", - "integrity": "sha512-blRr2O8IOZLAOJklXLV4WhcEzpYafYQKSGT3+R26lWG41u/FODJuBggehtOwilVAcFu393v3OFj+HmaE6tVjhA==" + "version": "7.4.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.4.0.tgz", + "integrity": "sha512-AWyt3k+fBXQqt2qb9r97tn3iBwFpiv9xdAiG+Gr2HpAZpuayvbL55yWrsV3MyHvXk/4vmSiedhDRl1YI2Iy5nQ==" }, "@babel/plugin-transform-classes": { - "version": "7.3.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.3.4.tgz", - "integrity": "sha512-J9fAvCFBkXEvBimgYxCjvaVDzL6thk0j0dBvCeZmIUDBwyt+nv6HfbImsSrWsYXfDNDivyANgJlFXDUWRTZBuA==" + "version": "7.4.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.4.3.tgz", + "integrity": "sha512-PUaIKyFUDtG6jF5DUJOfkBdwAS/kFFV3XFk7Nn0a6vR7ZT8jYw5cGtIlat77wcnd0C6ViGqo/wyNf4ZHytF/nQ==" }, "@babel/plugin-transform-computed-properties": { "version": "7.2.0", @@ -219,9 +219,9 @@ "integrity": "sha512-kP/drqTxY6Xt3NNpKiMomfgkNn4o7+vKxK2DDKcBG9sHj51vHqMBGy8wbDS/J4lMxnqs153/T3+DmCEAkC5cpA==" }, "@babel/plugin-transform-destructuring": { - "version": "7.3.2", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.3.2.tgz", - "integrity": "sha512-Lrj/u53Ufqxl/sGxyjsJ2XNtNuEjDyjpqdhMNh5aZ+XFOdThL46KBj27Uem4ggoezSYBxKWAil6Hu8HtwqesYw==" + "version": "7.4.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.4.3.tgz", + "integrity": "sha512-rVTLLZpydDFDyN4qnXdzwoVpk1oaXHIvPEOkOLyr88o7oHxVc/LyrnDx+amuBWGOwUb7D1s/uLsKBNTx08htZg==" }, "@babel/plugin-transform-exponentiation-operator": { "version": "7.2.0", @@ -229,14 +229,14 @@ "integrity": "sha512-umh4hR6N7mu4Elq9GG8TOu9M0bakvlsREEC+ialrQN6ABS4oDQ69qJv1VtR3uxlKMCQMCvzk7vr17RHKcjx68A==" }, "@babel/plugin-transform-flow-strip-types": { - "version": "7.3.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-flow-strip-types/-/plugin-transform-flow-strip-types-7.3.4.tgz", - "integrity": "sha512-PmQC9R7DwpBFA+7ATKMyzViz3zCaMNouzZMPZN2K5PnbBbtL3AXFYTkDk+Hey5crQq2A90UG5Uthz0mel+XZrA==" + "version": "7.4.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-flow-strip-types/-/plugin-transform-flow-strip-types-7.4.0.tgz", + "integrity": "sha512-C4ZVNejHnfB22vI2TYN4RUp2oCmq6cSEAg4RygSvYZUECRqUu9O4PMEMNJ4wsemaRGg27BbgYctG4BZh+AgIHw==" }, "@babel/plugin-transform-for-of": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.2.0.tgz", - "integrity": "sha512-Kz7Mt0SsV2tQk6jG5bBv5phVbkd0gd27SgYD4hH1aLMJRchM0dzHaXvrWhVZ+WxAlDoAKZ7Uy3jVTW2mKXQ1WQ==" + "version": "7.4.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.4.3.tgz", + "integrity": "sha512-UselcZPwVWNSURnqcfpnxtMehrb8wjXYOimlYQPBnup/Zld426YzIhNEvuRsEWVHfESIECGrxoI6L5QqzuLH5Q==" }, "@babel/plugin-transform-literals": { "version": "7.2.0", @@ -244,9 +244,9 @@ "integrity": "sha512-2ThDhm4lI4oV7fVQ6pNNK+sx+c/GM5/SaML0w/r4ZB7sAneD/piDJtwdKlNckXeyGK7wlwg2E2w33C/Hh+VFCg==" }, "@babel/plugin-transform-modules-commonjs": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.2.0.tgz", - "integrity": "sha512-V6y0uaUQrQPXUrmj+hgnks8va2L0zcZymeU7TtWEgdRLNkceafKXEduv7QzgQAE4lT+suwooG9dC7LFhdRAbVQ==" + "version": "7.4.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.4.3.tgz", + "integrity": "sha512-sMP4JqOTbMJMimqsSZwYWsMjppD+KRyDIUVW91pd7td0dZKAvPmhCaxhOzkzLParKwgQc7bdL9UNv+rpJB0HfA==" }, "@babel/plugin-transform-object-super": { "version": "7.2.0", @@ -254,9 +254,9 @@ "integrity": "sha512-VMyhPYZISFZAqAPVkiYb7dUe2AsVi2/wCT5+wZdsNO31FojQJa9ns40hzZ6U9f50Jlq4w6qwzdBB2uwqZ00ebg==" }, "@babel/plugin-transform-parameters": { - "version": "7.3.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.3.3.tgz", - "integrity": "sha512-IrIP25VvXWu/VlBWTpsjGptpomtIkYrN/3aDp4UKm7xK6UxZY88kcJ1UwETbzHAlwN21MnNfwlar0u8y3KpiXw==" + "version": "7.4.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.4.3.tgz", + "integrity": "sha512-ULJYC2Vnw96/zdotCZkMGr2QVfKpIT/4/K+xWWY0MbOJyMZuk660BGkr3bEKWQrrciwz6xpmft39nA4BF7hJuA==" }, "@babel/plugin-transform-property-literals": { "version": "7.2.0", @@ -284,14 +284,14 @@ "integrity": "sha512-A32OkKTp4i5U6aE88GwwcuV4HAprUgHcTq0sSafLxjr6AW0QahrCRCjxogkbbcdtpbXkuTOlgpjophCxb6sh5g==" }, "@babel/plugin-transform-regenerator": { - "version": "7.3.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.3.4.tgz", - "integrity": "sha512-hvJg8EReQvXT6G9H2MvNPXkv9zK36Vxa1+csAVTpE1J3j0zlHplw76uudEbJxgvqZzAq9Yh45FLD4pk5mKRFQA==" + "version": "7.4.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.4.3.tgz", + "integrity": "sha512-kEzotPuOpv6/iSlHroCDydPkKYw7tiJGKlmYp6iJn4a6C/+b2FdttlJsLKYxolYHgotTJ5G5UY5h0qey5ka3+A==" }, "@babel/plugin-transform-runtime": { - "version": "7.3.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-runtime/-/plugin-transform-runtime-7.3.4.tgz", - "integrity": "sha512-PaoARuztAdd5MgeVjAxnIDAIUet5KpogqaefQvPOmPYCxYoaPhautxDh3aO8a4xHsKgT/b9gSxR0BKK1MIewPA==" + "version": "7.4.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-runtime/-/plugin-transform-runtime-7.4.3.tgz", + "integrity": "sha512-7Q61bU+uEI7bCUFReT1NKn7/X6sDQsZ7wL1sJ9IYMAO7cI+eg6x9re1cEw2fCRMbbTVyoeUKWSV1M6azEfKCfg==" }, "@babel/plugin-transform-shorthand-properties": { "version": "7.2.0", @@ -319,14 +319,14 @@ "integrity": "sha512-2LNhETWYxiYysBtrBTqL8+La0jIoQQnIScUJc74OYvUGRmkskNY4EzLCnjHBzdmb38wqtTaixpo1NctEcvMDZw==" }, "@babel/plugin-transform-typescript": { - "version": "7.3.2", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.3.2.tgz", - "integrity": "sha512-Pvco0x0ZSCnexJnshMfaibQ5hnK8aUHSvjCQhC1JR8eeg+iBwt0AtCO7gWxJ358zZevuf9wPSO5rv+WJcbHPXQ==" + "version": "7.4.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.4.0.tgz", + "integrity": "sha512-U7/+zKnRZg04ggM/Bm+xmu2B/PrwyDQTT/V89FXWYWNMxBDwSx56u6jtk9SEbfLFbZaEI72L+5LPvQjeZgFCrQ==" }, "@babel/plugin-transform-unicode-regex": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.2.0.tgz", - "integrity": "sha512-m48Y0lMhrbXEJnVUaYly29jRXbQ3ksxPrS1Tg8t+MHqzXhtBYAvI51euOBaoAlZLPHsieY9XPVMf80a5x0cPcA==" + "version": "7.4.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.4.3.tgz", + "integrity": "sha512-lnSNgkVjL8EMtnE8eSS7t2ku8qvKH3eqNf/IwIfnSPUqzgqYmRwzdsQWv4mNQAN9Nuo6Gz1Y0a4CSmdpu1Pp6g==" }, "@babel/preset-react": { "version": "7.0.0", @@ -334,24 +334,24 @@ "integrity": "sha512-oayxyPS4Zj+hF6Et11BwuBkmpgT/zMxyuZgFrMeZID6Hdh3dGlk4sHCAhdBCpuCKW2ppBfl2uCCetlrUIJRY3w==" }, "@babel/runtime": { - "version": "7.3.4", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.3.4.tgz", - "integrity": "sha512-IvfvnMdSaLBateu0jfsYIpZTxAc2cKEXEMiezGGN75QcBcecDUKd3PgLAncT0oOgxKy8dd8hrJKj9MfzgfZd6g==" + "version": "7.4.3", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.4.3.tgz", + "integrity": "sha512-9lsJwJLxDh/T3Q3SZszfWOTkk3pHbkmH+3KY+zwIDmsNlxsumuhS2TH3NIpktU4kNvfzy+k3eLT7aTJSPTo0OA==" }, "@babel/template": { - "version": "7.2.2", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.2.2.tgz", - "integrity": "sha512-zRL0IMM02AUDwghf5LMSSDEz7sBCO2YnNmpg3uWTZj/v1rcG2BmQUvaGU8GhU8BvfMh1k2KIAYZ7Ji9KXPUg7g==" + "version": "7.4.0", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.4.0.tgz", + "integrity": "sha512-SOWwxxClTTh5NdbbYZ0BmaBVzxzTh2tO/TeLTbF6MO6EzVhHTnff8CdBXx3mEtazFBoysmEM6GU/wF+SuSx4Fw==" }, "@babel/traverse": { - "version": "7.3.4", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.3.4.tgz", - "integrity": "sha512-TvTHKp6471OYEcE/91uWmhR6PrrYywQntCHSaZ8CM8Vmp+pjAusal4nGB2WCCQd0rvI7nOMKn9GnbcvTUz3/ZQ==" + "version": "7.4.3", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.4.3.tgz", + "integrity": "sha512-HmA01qrtaCwwJWpSKpA948cBvU5BrmviAief/b3AVw936DtcdsTexlbyzNuDnthwhOQ37xshn7hvQaEQk7ISYQ==" }, "@babel/types": { - "version": "7.3.4", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.3.4.tgz", - "integrity": "sha512-WEkp8MsLftM7O/ty580wAmZzN1nDmCACc5+jFzUt+GUFNNIi3LdRlueYz0YIlmJhlZx1QYDMZL5vdWCL0fNjFQ==" + "version": "7.4.0", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.4.0.tgz", + "integrity": "sha512-aPvkXyU2SPOnztlgo8n9cEiXW755mgyvueUPcpStqdzoSPm0fjO0vQBjLkt3JKJW7ufikfcnMTTPsN1xaTsBPA==" }, "acorn": { "version": "5.7.3", @@ -521,9 +521,9 @@ "integrity": "sha1-viQcqBQEAwZ4t0hxcyK4nQyP4oA=" }, "babel-preset-meteor": { - "version": "7.3.4", - "resolved": "https://registry.npmjs.org/babel-preset-meteor/-/babel-preset-meteor-7.3.4.tgz", - "integrity": "sha512-5S95oZLKn1RZexBCs3tPjjYXf2rJ8rBjkvJGkD9Bhut7XEGxDMMt1S+hhhGYo4ZwqOTmIeHv0EMppMWVxa7Lbg==" + "version": "7.4.3", + "resolved": "https://registry.npmjs.org/babel-preset-meteor/-/babel-preset-meteor-7.4.3.tgz", + "integrity": "sha512-0nxAvTPAQMMIRM64KcQN3sLgQQSjM41vFZY4lqpAc1vZ9SA3UeYbmMaZ6tqONveiQ09IwTukkVIiAeQd5/mw1Q==" }, "babel-preset-minify": { "version": "0.5.0", @@ -606,9 +606,9 @@ "integrity": "sha1-G7nzFO9ri63tE7VJFpsqlF62jk0=" }, "meteor-babel": { - "version": "7.3.4", - "resolved": "https://registry.npmjs.org/meteor-babel/-/meteor-babel-7.3.4.tgz", - "integrity": "sha512-5aVvIa9yGRq2WlkO8tThWhc3f07escWb0t93KRYM0EnsUbv2rDmrAir0P+e+4rpyDDz7utOpIfuO1dT1F8SCSA==" + "version": "7.4.3", + "resolved": "https://registry.npmjs.org/meteor-babel/-/meteor-babel-7.4.3.tgz", + "integrity": "sha512-JkFG5wO0Fno+2o0Bcg+coHhLMvtxyY4HDYkSsDOqy0ZhTEnqYzNnFxTcvkOeip3l4y+VTeJElSV1iSqCQyBWbQ==" }, "meteor-babel-helpers": { "version": "0.0.3", @@ -641,14 +641,14 @@ "integrity": "sha512-1G6jJVDWrt0rK99kBjvEtziZNCICAuvIPkSiUFIQxVP06RCVpq3dmDo2oi6ABpYaDYaTRr67BEhL8r1wgEZZKg==" }, "regenerate-unicode-properties": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/regenerate-unicode-properties/-/regenerate-unicode-properties-7.0.0.tgz", - "integrity": "sha512-s5NGghCE4itSlUS+0WUj88G6cfMVMmH8boTPNvABf8od+2dhT9WDlWu8n01raQAJZMOK8Ch6jSexaRO7swd6aw==" + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/regenerate-unicode-properties/-/regenerate-unicode-properties-8.0.2.tgz", + "integrity": "sha512-SbA/iNrBUf6Pv2zU8Ekv1Qbhv92yxL4hiDa2siuxs4KKn4oOoMDHXjAf7+Nz9qinUQ46B1LcWEi/PhJfPWpZWQ==" }, "regenerator-runtime": { - "version": "0.12.1", - "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.12.1.tgz", - "integrity": "sha512-odxIc1/vDlo4iZcfXqRYFj0vpXFNoGdKMAUieAlFYO6m/nl5e9KR/beGf41z4a1FI+aQgtjhuaSlDxQ0hmkrHg==" + "version": "0.13.2", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.2.tgz", + "integrity": "sha512-S/TQAZJO+D3m9xeN1WTI8dLKBBiRgXBlTJvbWjCThHWZj9EvHK70Ff50/tYj2J/fvBY6JtFVwRuazHN2E7M9BA==" }, "regenerator-transform": { "version": "0.13.4", @@ -656,9 +656,9 @@ "integrity": "sha512-T0QMBjK3J0MtxjPmdIMXm72Wvj2Abb0Bd4HADdfijwMdoIsyQZ6fWC7kDFhk2YinBBEMZDL7Y7wh0J1sGx3S4A==" }, "regexpu-core": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-4.4.0.tgz", - "integrity": "sha512-eDDWElbwwI3K0Lo6CqbQbA6FwgtCz4kYTarrri1okfkRLZAqstU+B3voZBCjg8Fl6iq0gXrJG6MvRgLthfvgOA==" + "version": "4.5.4", + "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-4.5.4.tgz", + "integrity": "sha512-BtizvGtFQKGPUcTy56o3nk1bGRp4SZOTYrDtGNlqCQufptV5IkkLN6Emw+yunAJjzf+C9FQFtvq7IoA3+oMYHQ==" }, "regjsgen": { "version": "0.5.0", @@ -693,9 +693,9 @@ "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" }, "semver": { - "version": "5.6.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.6.0.tgz", - "integrity": "sha512-RS9R6R35NYgQn++fkDWaOmqGoj4Ek9gGs+DPxNUZKuwE183xjJroKvyo1IzVFeXvUrvmALy6FWD5xrdJT25gMg==" + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.0.tgz", + "integrity": "sha512-Ya52jSX2u7QKghxeoFGpLwCtGlt7j0oY9DYb5apt9nPlJ42ID+ulTXESnt/qAQcoSERyZ5sl3LDIOw0nAn/5DA==" }, "source-map": { "version": "0.5.7", @@ -728,14 +728,14 @@ "integrity": "sha512-L4Qoh15vTfntsn4P1zqnHulG0LdXgjSO035fEpdtp6YxXhMT51Q6vgM5lYdG/5X3MjS+k/Y9Xw4SFCY9IkR0rg==" }, "unicode-match-property-value-ecmascript": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/unicode-match-property-value-ecmascript/-/unicode-match-property-value-ecmascript-1.0.2.tgz", - "integrity": "sha512-Rx7yODZC1L/T8XKo/2kNzVAQaRE88AaMvI1EF/Xnj3GW2wzN6fop9DDWuFAKUVFH7vozkz26DzP0qyWLKLIVPQ==" + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/unicode-match-property-value-ecmascript/-/unicode-match-property-value-ecmascript-1.1.0.tgz", + "integrity": "sha512-hDTHvaBk3RmFzvSl0UVrUmC3PuW9wKVnpoUDYH0JDkSIovzw+J5viQmeYHxVSBptubnr7PbH2e0fnpDRQnQl5g==" }, "unicode-property-aliases-ecmascript": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/unicode-property-aliases-ecmascript/-/unicode-property-aliases-ecmascript-1.0.4.tgz", - "integrity": "sha512-2WSLa6OdYd2ng8oqiGIWnJqyFArvhn+5vgx5GTxMbUYjCYKUcuKS62YLFF0R/BDGlB1yzXjQOLtPAfHsgirEpg==" + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/unicode-property-aliases-ecmascript/-/unicode-property-aliases-ecmascript-1.0.5.tgz", + "integrity": "sha512-L5RAqCfXqAwR3RriF8pM0lU0w4Ryf/GgzONwi6KnL1taJQa7x1TCxdJnILX59WIGOwR57IVxn7Nej0fz1Ny6fw==" } } } diff --git a/packages/babel-compiler/package.js b/packages/babel-compiler/package.js index 0fc349846d..b3a2d930cc 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.3.4' + version: '7.4.3' }); Npm.depends({ - 'meteor-babel': '7.3.4', + 'meteor-babel': '7.4.3', 'json5': '2.1.0' }); diff --git a/packages/ecmascript/package.js b/packages/ecmascript/package.js index c64429cb37..45fc281d49 100644 --- a/packages/ecmascript/package.js +++ b/packages/ecmascript/package.js @@ -1,6 +1,6 @@ Package.describe({ name: 'ecmascript', - version: '0.12.7', + version: '0.12.8', summary: 'Compiler plugin that supports ES2015+ in all .js files', documentation: 'README.md' }); diff --git a/scripts/dev-bundle-tool-package.js b/scripts/dev-bundle-tool-package.js index ea910e781e..3c51e7c2f2 100644 --- a/scripts/dev-bundle-tool-package.js +++ b/scripts/dev-bundle-tool-package.js @@ -14,15 +14,12 @@ var packageJson = { pacote: "https://github.com/meteor/pacote/tarball/c5043daa1b768594e01d76275e3854fc19f038f9", "node-gyp": "3.7.0", "node-pre-gyp": "0.10.3", - "meteor-babel": "7.3.4", + "meteor-babel": "7.4.3", "meteor-promise": "0.8.7", reify: "0.17.3", fibers: "3.1.1", // So that Babel can emit require("@babel/runtime/helpers/...") calls. - "@babel/runtime": "7.3.4", - // For backwards compatibility with isopackets that still depend on - // babel-runtime rather than @babel/runtime. - "babel-runtime": "7.0.0-beta.3", + "@babel/runtime": "7.4.3", // Not yet upgrading Underscore from 1.5.2 to 1.7.0 (which should be done // in the package too) because we should consider using lodash instead // (and there are backwards-incompatible changes either way). From a059f0b8684a5a2fd9daf55da4ca36e7656973d3 Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Mon, 8 Apr 2019 15:54:24 -0400 Subject: [PATCH 002/327] Bump $BUNDLE_VERSION to 8.15.1.2 before rebuilding dev bundle. --- meteor | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meteor b/meteor index f903890e8a..fd9c57dea6 100755 --- a/meteor +++ b/meteor @@ -1,6 +1,6 @@ #!/usr/bin/env bash -BUNDLE_VERSION=8.15.1.1 +BUNDLE_VERSION=8.15.1.2 # OS Check. Put here because here is where we download the precompiled # bundles that are arch specific. From 3c225033ae811cdee2849358d08e6af22af13c4d Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Wed, 10 Apr 2019 11:03:53 -0400 Subject: [PATCH 003/327] Undo babel-compiler upgrade but keep meteor/tools using 7.4.3. Until this issue is addressed: https://github.com/babel/babel/issues/9720 --- .../.npm/package/npm-shrinkwrap.json | 228 +++++++++--------- packages/babel-compiler/package.js | 4 +- packages/ecmascript/package.js | 2 +- scripts/dev-bundle-tool-package.js | 3 + 4 files changed, 120 insertions(+), 117 deletions(-) diff --git a/packages/babel-compiler/.npm/package/npm-shrinkwrap.json b/packages/babel-compiler/.npm/package/npm-shrinkwrap.json index 6b11a073b6..a927664f22 100644 --- a/packages/babel-compiler/.npm/package/npm-shrinkwrap.json +++ b/packages/babel-compiler/.npm/package/npm-shrinkwrap.json @@ -7,9 +7,9 @@ "integrity": "sha512-OfC2uemaknXr87bdLUkWog7nYuliM9Ij5HUcajsVcMCpQrcLmtxRbVFTIqmcSkSeYRBFBRxs2FiUqFJDLdiebA==" }, "@babel/core": { - "version": "7.4.3", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.4.3.tgz", - "integrity": "sha512-oDpASqKFlbspQfzAE7yaeTmdljSH2ADIvBlb0RwbStltTuWa0+7CCI1fYVINNv9saHPa1W7oaKeuNuKj+RQCvA==", + "version": "7.3.4", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.3.4.tgz", + "integrity": "sha512-jRsuseXBo9pN197KnDwhhaaBzyZr2oIcLHHTt2oDdQrej5Qp57dCCJafWx5ivU8/alEYDpssYqv1MUqcxwQlrA==", "dependencies": { "json5": { "version": "2.1.0", @@ -19,9 +19,9 @@ } }, "@babel/generator": { - "version": "7.4.0", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.4.0.tgz", - "integrity": "sha512-/v5I+a1jhGSKLgZDcmAUZ4K/VePi43eRkUs3yePW1HB1iANOD5tqJXwGSG4BZhSksP8J9ejSlwGeTiiOFZOrXQ==" + "version": "7.3.4", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.3.4.tgz", + "integrity": "sha512-8EXhHRFqlVVWXPezBW5keTiQi/rJMQTg/Y9uVCEZ0CAF3PKtCCaVRnp64Ii1ujhkoDhhF1fVsImoN4yJ2uz4Wg==" }, "@babel/helper-annotate-as-pure": { "version": "7.0.0", @@ -39,19 +39,19 @@ "integrity": "sha512-MjA9KgwCuPEkQd9ncSXvSyJ5y+j2sICHyrI0M3L+6fnS4wMSNDc1ARXsbTfbb2cXHn17VisSnU/sHFTCxVxSMw==" }, "@babel/helper-call-delegate": { - "version": "7.4.0", - "resolved": "https://registry.npmjs.org/@babel/helper-call-delegate/-/helper-call-delegate-7.4.0.tgz", - "integrity": "sha512-SdqDfbVdNQCBp3WhK2mNdDvHd3BD6qbmIc43CAyjnsfCmgHMeqgDcM3BzY2lchi7HBJGJ2CVdynLWbezaE4mmQ==" + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/@babel/helper-call-delegate/-/helper-call-delegate-7.1.0.tgz", + "integrity": "sha512-YEtYZrw3GUK6emQHKthltKNZwszBcHK58Ygcis+gVUrF4/FmTVr5CCqQNSfmvg2y+YDEANyYoaLz/SHsnusCwQ==" }, "@babel/helper-create-class-features-plugin": { - "version": "7.4.3", - "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.4.3.tgz", - "integrity": "sha512-UMl3TSpX11PuODYdWGrUeW6zFkdYhDn7wRLrOuNVM6f9L+S9CzmDXYyrp3MTHcwWjnzur1f/Op8A7iYZWya2Yg==" + "version": "7.3.4", + "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.3.4.tgz", + "integrity": "sha512-uFpzw6L2omjibjxa8VGZsJUPL5wJH0zzGKpoz0ccBkzIa6C8kWNUbiBmQ0rgOKWlHJ6qzmfa6lTiGchiV8SC+g==" }, "@babel/helper-define-map": { - "version": "7.4.0", - "resolved": "https://registry.npmjs.org/@babel/helper-define-map/-/helper-define-map-7.4.0.tgz", - "integrity": "sha512-wAhQ9HdnLIywERVcSvX40CEJwKdAa1ID4neI9NXQPDOHwwA+57DqwLiPEVy2AIyWzAk0CQ8qx4awO0VUURwLtA==" + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/@babel/helper-define-map/-/helper-define-map-7.1.0.tgz", + "integrity": "sha512-yPPcW8dc3gZLN+U1mhYV91QU3n5uTbx7DUdf8NnPbjS0RMwBuHi9Xt2MUgppmNz7CJxTBWsGczTiEp1CSOTPRg==" }, "@babel/helper-explode-assignable-expression": { "version": "7.1.0", @@ -69,9 +69,9 @@ "integrity": "sha512-r2DbJeg4svYvt3HOS74U4eWKsUAMRH01Z1ds1zx8KNTPtpTL5JAsdFv8BNyOpVqdFhHkkRDIg5B4AsxmkjAlmQ==" }, "@babel/helper-hoist-variables": { - "version": "7.4.0", - "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.4.0.tgz", - "integrity": "sha512-/NErCuoe/et17IlAQFKWM24qtyYYie7sFIrW/tIQXpck6vAu2hhtYYsKLBWQV+BQZMbcIYPU/QMYuTufrY4aQw==" + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.0.0.tgz", + "integrity": "sha512-Ggv5sldXUeSKsuzLkddtyhyHe2YantsxWKNi7A+7LeD12ExRDWTRk29JCXpaHPAbMaIPZSil7n+lq78WY2VY7w==" }, "@babel/helper-member-expression-to-functions": { "version": "7.0.0", @@ -84,9 +84,9 @@ "integrity": "sha512-aP/hlLq01DWNEiDg4Jn23i+CXxW/owM4WpDLFUbpjxe4NS3BhLVZQ5i7E0ZrxuQ/vwekIeciyamgB1UIYxxM6A==" }, "@babel/helper-module-transforms": { - "version": "7.4.3", - "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.4.3.tgz", - "integrity": "sha512-H88T9IySZW25anu5uqyaC1DaQre7ofM+joZtAaO2F8NBdFfupH0SZ4gKjgSFVcvtx/aAirqA9L9Clio2heYbZA==" + "version": "7.2.2", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.2.2.tgz", + "integrity": "sha512-YRD7I6Wsv+IHuTPkAmAS4HhY0dkPobgLftHp0cRGZSdrRvmZY8rFvae/GVu3bD00qscuvK3WPHB3YdNpBXUqrA==" }, "@babel/helper-optimise-call-expression": { "version": "7.0.0", @@ -99,9 +99,9 @@ "integrity": "sha512-CYAOUCARwExnEixLdB6sDm2dIJ/YgEAKDM1MOeMeZu9Ld/bDgVo8aiWrXwcY7OBh+1Ea2uUcVRcxKk0GJvW7QA==" }, "@babel/helper-regex": { - "version": "7.4.3", - "resolved": "https://registry.npmjs.org/@babel/helper-regex/-/helper-regex-7.4.3.tgz", - "integrity": "sha512-hnoq5u96pLCfgjXuj8ZLX3QQ+6nAulS+zSgi6HulUwFbEruRAKwbGLU5OvXkE14L8XW6XsQEKsIDfgthKLRAyA==" + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/@babel/helper-regex/-/helper-regex-7.0.0.tgz", + "integrity": "sha512-TR0/N0NDCcUIUEbqV6dCO+LptmmSQFQ7q70lfcEB4URsjD0E1HzicrwUH+ap6BAQ2jhCX9Q4UqZy4wilujWlkg==" }, "@babel/helper-remap-async-to-generator": { "version": "7.1.0", @@ -109,9 +109,9 @@ "integrity": "sha512-3fOK0L+Fdlg8S5al8u/hWE6vhufGSn0bN09xm2LXMy//REAF8kDCrYoOBKYmA8m5Nom+sV9LyLCwrFynA8/slg==" }, "@babel/helper-replace-supers": { - "version": "7.4.0", - "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.4.0.tgz", - "integrity": "sha512-PVwCVnWWAgnal+kJ+ZSAphzyl58XrFeSKSAJRiqg5QToTsjL+Xu1f9+RJ+d+Q0aPhPfBGaYfkox66k86thxNSg==" + "version": "7.3.4", + "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.3.4.tgz", + "integrity": "sha512-pvObL9WVf2ADs+ePg0jrqlhHoxRXlOa+SHRHzAXIz2xkYuOHfGl+fKxPMaS4Fq+uje8JQPobnertBBvyrWnQ1A==" }, "@babel/helper-simple-access": { "version": "7.1.0", @@ -119,9 +119,9 @@ "integrity": "sha512-Vk+78hNjRbsiu49zAPALxTb+JUQCz1aolpd8osOF16BGnLtseD21nbHgLPGUwrXEurZgiCOUmvs3ExTu4F5x6w==" }, "@babel/helper-split-export-declaration": { - "version": "7.4.0", - "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.4.0.tgz", - "integrity": "sha512-7Cuc6JZiYShaZnybDmfwhY4UYHzI6rlqhWjaIqbsJGsIqPimEYy5uh3akSRLMg65LSdSEnJ8a8/bWQN6u2oMGw==" + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.0.0.tgz", + "integrity": "sha512-MXkOJqva62dfC0w85mEf/LucPPS/1+04nmmRMPEBUB++hiiThQ2zPtX/mEWQ3mtzCEjIJvPY8nuwxXtQeQwUag==" }, "@babel/helper-wrap-function": { "version": "7.2.0", @@ -129,9 +129,9 @@ "integrity": "sha512-o9fP1BZLLSrYlxYEYyl2aS+Flun5gtjTIG8iln+XuEzQTs0PLagAGSXUcqruJwD5fM48jzIEggCKpIfWTcR7pQ==" }, "@babel/helpers": { - "version": "7.4.3", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.4.3.tgz", - "integrity": "sha512-BMh7X0oZqb36CfyhvtbSmcWc3GXocfxv3yNsAEuM0l+fAqSO22rQrUpijr3oE/10jCTrB6/0b9kzmG4VetCj8Q==" + "version": "7.3.1", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.3.1.tgz", + "integrity": "sha512-Q82R3jKsVpUV99mgX50gOPCWwco9Ec5Iln/8Vyu4osNIOQgSrd9RFrQeUvmvddFNoLwMyOUWU+5ckioEKpDoGA==" }, "@babel/highlight": { "version": "7.0.0", @@ -139,9 +139,9 @@ "integrity": "sha512-UFMC4ZeFC48Tpvj7C8UgLvtkaUuovQX+5xNWrsIoMG8o2z+XFKjKaN9iVmS84dPwVN00W4wPmqvYoZF3EGAsfw==" }, "@babel/parser": { - "version": "7.4.3", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.4.3.tgz", - "integrity": "sha512-gxpEUhTS1sGA63EGQGuA+WESPR/6tz6ng7tSHFCmaTJK/cGK8y37cBTspX+U2xCAue2IQVvF6Z0oigmjwD8YGQ==" + "version": "7.3.4", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.3.4.tgz", + "integrity": "sha512-tXZCqWtlOOP4wgCp6RjRvLmfuhnqTLy9VHwRochJBCP2nDm27JnnuFEnXFASVyQNHk36jD1tAammsCEEqgscIQ==" }, "@babel/plugin-proposal-async-generator-functions": { "version": "7.2.0", @@ -149,14 +149,14 @@ "integrity": "sha512-+Dfo/SCQqrwx48ptLVGLdE39YtWRuKc/Y9I5Fy0P1DDBB9lsAHpjcEJQt+4IifuSOSTLBKJObJqMvaO1pIE8LQ==" }, "@babel/plugin-proposal-class-properties": { - "version": "7.4.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.4.0.tgz", - "integrity": "sha512-t2ECPNOXsIeK1JxJNKmgbzQtoG27KIlVE61vTqX0DKR9E9sZlVVxWUtEW9D5FlZ8b8j7SBNCHY47GgPKCKlpPg==" + "version": "7.3.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.3.4.tgz", + "integrity": "sha512-lUf8D3HLs4yYlAo8zjuneLvfxN7qfKv1Yzbj5vjqaqMJxgJA3Ipwp4VUJ+OrOdz53Wbww6ahwB8UhB2HQyLotA==" }, "@babel/plugin-proposal-object-rest-spread": { - "version": "7.4.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.4.3.tgz", - "integrity": "sha512-xC//6DNSSHVjq8O2ge0dyYlhshsH4T7XdCVoxbi5HzLYWfsC5ooFlJjrXk8RcAT+hjHAK9UjBXdylzSoDK3t4g==" + "version": "7.3.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.3.4.tgz", + "integrity": "sha512-j7VQmbbkA+qrzNqbKHrBsW3ddFnOeva6wzSe/zB7T+xaxGc+RCpwo44wCmRixAIGRoIpmVgvzFzNJqQcO3/9RA==" }, "@babel/plugin-syntax-async-generators": { "version": "7.2.0", @@ -194,9 +194,9 @@ "integrity": "sha512-ER77Cax1+8/8jCB9fo4Ud161OZzWN5qawi4GusDuRLcDbDG+bIGYY20zb2dfAFdTRGzrfq2xZPvF0R64EHnimg==" }, "@babel/plugin-transform-async-to-generator": { - "version": "7.4.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.4.0.tgz", - "integrity": "sha512-EeaFdCeUULM+GPFEsf7pFcNSxM7hYjoj5fiYbyuiXobW4JhFnjAv9OWzNwHyHcKoPNpAfeRDuW6VyaXEDUBa7g==" + "version": "7.3.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.3.4.tgz", + "integrity": "sha512-Y7nCzv2fw/jEZ9f678MuKdMo99MFDJMT/PvD9LisrR5JDFcJH6vYeH6RnjVt3p5tceyGRvTtEN0VOlU+rgHZjA==" }, "@babel/plugin-transform-block-scoped-functions": { "version": "7.2.0", @@ -204,14 +204,14 @@ "integrity": "sha512-ntQPR6q1/NKuphly49+QiQiTN0O63uOwjdD6dhIjSWBI5xlrbUFh720TIpzBhpnrLfv2tNH/BXvLIab1+BAI0w==" }, "@babel/plugin-transform-block-scoping": { - "version": "7.4.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.4.0.tgz", - "integrity": "sha512-AWyt3k+fBXQqt2qb9r97tn3iBwFpiv9xdAiG+Gr2HpAZpuayvbL55yWrsV3MyHvXk/4vmSiedhDRl1YI2Iy5nQ==" + "version": "7.3.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.3.4.tgz", + "integrity": "sha512-blRr2O8IOZLAOJklXLV4WhcEzpYafYQKSGT3+R26lWG41u/FODJuBggehtOwilVAcFu393v3OFj+HmaE6tVjhA==" }, "@babel/plugin-transform-classes": { - "version": "7.4.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.4.3.tgz", - "integrity": "sha512-PUaIKyFUDtG6jF5DUJOfkBdwAS/kFFV3XFk7Nn0a6vR7ZT8jYw5cGtIlat77wcnd0C6ViGqo/wyNf4ZHytF/nQ==" + "version": "7.3.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.3.4.tgz", + "integrity": "sha512-J9fAvCFBkXEvBimgYxCjvaVDzL6thk0j0dBvCeZmIUDBwyt+nv6HfbImsSrWsYXfDNDivyANgJlFXDUWRTZBuA==" }, "@babel/plugin-transform-computed-properties": { "version": "7.2.0", @@ -219,9 +219,9 @@ "integrity": "sha512-kP/drqTxY6Xt3NNpKiMomfgkNn4o7+vKxK2DDKcBG9sHj51vHqMBGy8wbDS/J4lMxnqs153/T3+DmCEAkC5cpA==" }, "@babel/plugin-transform-destructuring": { - "version": "7.4.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.4.3.tgz", - "integrity": "sha512-rVTLLZpydDFDyN4qnXdzwoVpk1oaXHIvPEOkOLyr88o7oHxVc/LyrnDx+amuBWGOwUb7D1s/uLsKBNTx08htZg==" + "version": "7.3.2", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.3.2.tgz", + "integrity": "sha512-Lrj/u53Ufqxl/sGxyjsJ2XNtNuEjDyjpqdhMNh5aZ+XFOdThL46KBj27Uem4ggoezSYBxKWAil6Hu8HtwqesYw==" }, "@babel/plugin-transform-exponentiation-operator": { "version": "7.2.0", @@ -229,14 +229,14 @@ "integrity": "sha512-umh4hR6N7mu4Elq9GG8TOu9M0bakvlsREEC+ialrQN6ABS4oDQ69qJv1VtR3uxlKMCQMCvzk7vr17RHKcjx68A==" }, "@babel/plugin-transform-flow-strip-types": { - "version": "7.4.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-flow-strip-types/-/plugin-transform-flow-strip-types-7.4.0.tgz", - "integrity": "sha512-C4ZVNejHnfB22vI2TYN4RUp2oCmq6cSEAg4RygSvYZUECRqUu9O4PMEMNJ4wsemaRGg27BbgYctG4BZh+AgIHw==" + "version": "7.3.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-flow-strip-types/-/plugin-transform-flow-strip-types-7.3.4.tgz", + "integrity": "sha512-PmQC9R7DwpBFA+7ATKMyzViz3zCaMNouzZMPZN2K5PnbBbtL3AXFYTkDk+Hey5crQq2A90UG5Uthz0mel+XZrA==" }, "@babel/plugin-transform-for-of": { - "version": "7.4.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.4.3.tgz", - "integrity": "sha512-UselcZPwVWNSURnqcfpnxtMehrb8wjXYOimlYQPBnup/Zld426YzIhNEvuRsEWVHfESIECGrxoI6L5QqzuLH5Q==" + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.2.0.tgz", + "integrity": "sha512-Kz7Mt0SsV2tQk6jG5bBv5phVbkd0gd27SgYD4hH1aLMJRchM0dzHaXvrWhVZ+WxAlDoAKZ7Uy3jVTW2mKXQ1WQ==" }, "@babel/plugin-transform-literals": { "version": "7.2.0", @@ -244,9 +244,9 @@ "integrity": "sha512-2ThDhm4lI4oV7fVQ6pNNK+sx+c/GM5/SaML0w/r4ZB7sAneD/piDJtwdKlNckXeyGK7wlwg2E2w33C/Hh+VFCg==" }, "@babel/plugin-transform-modules-commonjs": { - "version": "7.4.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.4.3.tgz", - "integrity": "sha512-sMP4JqOTbMJMimqsSZwYWsMjppD+KRyDIUVW91pd7td0dZKAvPmhCaxhOzkzLParKwgQc7bdL9UNv+rpJB0HfA==" + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.2.0.tgz", + "integrity": "sha512-V6y0uaUQrQPXUrmj+hgnks8va2L0zcZymeU7TtWEgdRLNkceafKXEduv7QzgQAE4lT+suwooG9dC7LFhdRAbVQ==" }, "@babel/plugin-transform-object-super": { "version": "7.2.0", @@ -254,9 +254,9 @@ "integrity": "sha512-VMyhPYZISFZAqAPVkiYb7dUe2AsVi2/wCT5+wZdsNO31FojQJa9ns40hzZ6U9f50Jlq4w6qwzdBB2uwqZ00ebg==" }, "@babel/plugin-transform-parameters": { - "version": "7.4.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.4.3.tgz", - "integrity": "sha512-ULJYC2Vnw96/zdotCZkMGr2QVfKpIT/4/K+xWWY0MbOJyMZuk660BGkr3bEKWQrrciwz6xpmft39nA4BF7hJuA==" + "version": "7.3.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.3.3.tgz", + "integrity": "sha512-IrIP25VvXWu/VlBWTpsjGptpomtIkYrN/3aDp4UKm7xK6UxZY88kcJ1UwETbzHAlwN21MnNfwlar0u8y3KpiXw==" }, "@babel/plugin-transform-property-literals": { "version": "7.2.0", @@ -284,14 +284,14 @@ "integrity": "sha512-A32OkKTp4i5U6aE88GwwcuV4HAprUgHcTq0sSafLxjr6AW0QahrCRCjxogkbbcdtpbXkuTOlgpjophCxb6sh5g==" }, "@babel/plugin-transform-regenerator": { - "version": "7.4.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.4.3.tgz", - "integrity": "sha512-kEzotPuOpv6/iSlHroCDydPkKYw7tiJGKlmYp6iJn4a6C/+b2FdttlJsLKYxolYHgotTJ5G5UY5h0qey5ka3+A==" + "version": "7.3.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.3.4.tgz", + "integrity": "sha512-hvJg8EReQvXT6G9H2MvNPXkv9zK36Vxa1+csAVTpE1J3j0zlHplw76uudEbJxgvqZzAq9Yh45FLD4pk5mKRFQA==" }, "@babel/plugin-transform-runtime": { - "version": "7.4.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-runtime/-/plugin-transform-runtime-7.4.3.tgz", - "integrity": "sha512-7Q61bU+uEI7bCUFReT1NKn7/X6sDQsZ7wL1sJ9IYMAO7cI+eg6x9re1cEw2fCRMbbTVyoeUKWSV1M6azEfKCfg==" + "version": "7.3.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-runtime/-/plugin-transform-runtime-7.3.4.tgz", + "integrity": "sha512-PaoARuztAdd5MgeVjAxnIDAIUet5KpogqaefQvPOmPYCxYoaPhautxDh3aO8a4xHsKgT/b9gSxR0BKK1MIewPA==" }, "@babel/plugin-transform-shorthand-properties": { "version": "7.2.0", @@ -319,14 +319,14 @@ "integrity": "sha512-2LNhETWYxiYysBtrBTqL8+La0jIoQQnIScUJc74OYvUGRmkskNY4EzLCnjHBzdmb38wqtTaixpo1NctEcvMDZw==" }, "@babel/plugin-transform-typescript": { - "version": "7.4.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.4.0.tgz", - "integrity": "sha512-U7/+zKnRZg04ggM/Bm+xmu2B/PrwyDQTT/V89FXWYWNMxBDwSx56u6jtk9SEbfLFbZaEI72L+5LPvQjeZgFCrQ==" + "version": "7.3.2", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.3.2.tgz", + "integrity": "sha512-Pvco0x0ZSCnexJnshMfaibQ5hnK8aUHSvjCQhC1JR8eeg+iBwt0AtCO7gWxJ358zZevuf9wPSO5rv+WJcbHPXQ==" }, "@babel/plugin-transform-unicode-regex": { - "version": "7.4.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.4.3.tgz", - "integrity": "sha512-lnSNgkVjL8EMtnE8eSS7t2ku8qvKH3eqNf/IwIfnSPUqzgqYmRwzdsQWv4mNQAN9Nuo6Gz1Y0a4CSmdpu1Pp6g==" + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.2.0.tgz", + "integrity": "sha512-m48Y0lMhrbXEJnVUaYly29jRXbQ3ksxPrS1Tg8t+MHqzXhtBYAvI51euOBaoAlZLPHsieY9XPVMf80a5x0cPcA==" }, "@babel/preset-react": { "version": "7.0.0", @@ -334,24 +334,24 @@ "integrity": "sha512-oayxyPS4Zj+hF6Et11BwuBkmpgT/zMxyuZgFrMeZID6Hdh3dGlk4sHCAhdBCpuCKW2ppBfl2uCCetlrUIJRY3w==" }, "@babel/runtime": { - "version": "7.4.3", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.4.3.tgz", - "integrity": "sha512-9lsJwJLxDh/T3Q3SZszfWOTkk3pHbkmH+3KY+zwIDmsNlxsumuhS2TH3NIpktU4kNvfzy+k3eLT7aTJSPTo0OA==" + "version": "7.3.4", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.3.4.tgz", + "integrity": "sha512-IvfvnMdSaLBateu0jfsYIpZTxAc2cKEXEMiezGGN75QcBcecDUKd3PgLAncT0oOgxKy8dd8hrJKj9MfzgfZd6g==" }, "@babel/template": { - "version": "7.4.0", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.4.0.tgz", - "integrity": "sha512-SOWwxxClTTh5NdbbYZ0BmaBVzxzTh2tO/TeLTbF6MO6EzVhHTnff8CdBXx3mEtazFBoysmEM6GU/wF+SuSx4Fw==" + "version": "7.2.2", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.2.2.tgz", + "integrity": "sha512-zRL0IMM02AUDwghf5LMSSDEz7sBCO2YnNmpg3uWTZj/v1rcG2BmQUvaGU8GhU8BvfMh1k2KIAYZ7Ji9KXPUg7g==" }, "@babel/traverse": { - "version": "7.4.3", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.4.3.tgz", - "integrity": "sha512-HmA01qrtaCwwJWpSKpA948cBvU5BrmviAief/b3AVw936DtcdsTexlbyzNuDnthwhOQ37xshn7hvQaEQk7ISYQ==" + "version": "7.3.4", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.3.4.tgz", + "integrity": "sha512-TvTHKp6471OYEcE/91uWmhR6PrrYywQntCHSaZ8CM8Vmp+pjAusal4nGB2WCCQd0rvI7nOMKn9GnbcvTUz3/ZQ==" }, "@babel/types": { - "version": "7.4.0", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.4.0.tgz", - "integrity": "sha512-aPvkXyU2SPOnztlgo8n9cEiXW755mgyvueUPcpStqdzoSPm0fjO0vQBjLkt3JKJW7ufikfcnMTTPsN1xaTsBPA==" + "version": "7.3.4", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.3.4.tgz", + "integrity": "sha512-WEkp8MsLftM7O/ty580wAmZzN1nDmCACc5+jFzUt+GUFNNIi3LdRlueYz0YIlmJhlZx1QYDMZL5vdWCL0fNjFQ==" }, "acorn": { "version": "5.7.3", @@ -521,9 +521,9 @@ "integrity": "sha1-viQcqBQEAwZ4t0hxcyK4nQyP4oA=" }, "babel-preset-meteor": { - "version": "7.4.3", - "resolved": "https://registry.npmjs.org/babel-preset-meteor/-/babel-preset-meteor-7.4.3.tgz", - "integrity": "sha512-0nxAvTPAQMMIRM64KcQN3sLgQQSjM41vFZY4lqpAc1vZ9SA3UeYbmMaZ6tqONveiQ09IwTukkVIiAeQd5/mw1Q==" + "version": "7.3.4", + "resolved": "https://registry.npmjs.org/babel-preset-meteor/-/babel-preset-meteor-7.3.4.tgz", + "integrity": "sha512-5S95oZLKn1RZexBCs3tPjjYXf2rJ8rBjkvJGkD9Bhut7XEGxDMMt1S+hhhGYo4ZwqOTmIeHv0EMppMWVxa7Lbg==" }, "babel-preset-minify": { "version": "0.5.0", @@ -606,9 +606,9 @@ "integrity": "sha1-G7nzFO9ri63tE7VJFpsqlF62jk0=" }, "meteor-babel": { - "version": "7.4.3", - "resolved": "https://registry.npmjs.org/meteor-babel/-/meteor-babel-7.4.3.tgz", - "integrity": "sha512-JkFG5wO0Fno+2o0Bcg+coHhLMvtxyY4HDYkSsDOqy0ZhTEnqYzNnFxTcvkOeip3l4y+VTeJElSV1iSqCQyBWbQ==" + "version": "7.3.4", + "resolved": "https://registry.npmjs.org/meteor-babel/-/meteor-babel-7.3.4.tgz", + "integrity": "sha512-5aVvIa9yGRq2WlkO8tThWhc3f07escWb0t93KRYM0EnsUbv2rDmrAir0P+e+4rpyDDz7utOpIfuO1dT1F8SCSA==" }, "meteor-babel-helpers": { "version": "0.0.3", @@ -641,14 +641,14 @@ "integrity": "sha512-1G6jJVDWrt0rK99kBjvEtziZNCICAuvIPkSiUFIQxVP06RCVpq3dmDo2oi6ABpYaDYaTRr67BEhL8r1wgEZZKg==" }, "regenerate-unicode-properties": { - "version": "8.0.2", - "resolved": "https://registry.npmjs.org/regenerate-unicode-properties/-/regenerate-unicode-properties-8.0.2.tgz", - "integrity": "sha512-SbA/iNrBUf6Pv2zU8Ekv1Qbhv92yxL4hiDa2siuxs4KKn4oOoMDHXjAf7+Nz9qinUQ46B1LcWEi/PhJfPWpZWQ==" + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/regenerate-unicode-properties/-/regenerate-unicode-properties-7.0.0.tgz", + "integrity": "sha512-s5NGghCE4itSlUS+0WUj88G6cfMVMmH8boTPNvABf8od+2dhT9WDlWu8n01raQAJZMOK8Ch6jSexaRO7swd6aw==" }, "regenerator-runtime": { - "version": "0.13.2", - "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.2.tgz", - "integrity": "sha512-S/TQAZJO+D3m9xeN1WTI8dLKBBiRgXBlTJvbWjCThHWZj9EvHK70Ff50/tYj2J/fvBY6JtFVwRuazHN2E7M9BA==" + "version": "0.12.1", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.12.1.tgz", + "integrity": "sha512-odxIc1/vDlo4iZcfXqRYFj0vpXFNoGdKMAUieAlFYO6m/nl5e9KR/beGf41z4a1FI+aQgtjhuaSlDxQ0hmkrHg==" }, "regenerator-transform": { "version": "0.13.4", @@ -656,9 +656,9 @@ "integrity": "sha512-T0QMBjK3J0MtxjPmdIMXm72Wvj2Abb0Bd4HADdfijwMdoIsyQZ6fWC7kDFhk2YinBBEMZDL7Y7wh0J1sGx3S4A==" }, "regexpu-core": { - "version": "4.5.4", - "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-4.5.4.tgz", - "integrity": "sha512-BtizvGtFQKGPUcTy56o3nk1bGRp4SZOTYrDtGNlqCQufptV5IkkLN6Emw+yunAJjzf+C9FQFtvq7IoA3+oMYHQ==" + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-4.4.0.tgz", + "integrity": "sha512-eDDWElbwwI3K0Lo6CqbQbA6FwgtCz4kYTarrri1okfkRLZAqstU+B3voZBCjg8Fl6iq0gXrJG6MvRgLthfvgOA==" }, "regjsgen": { "version": "0.5.0", @@ -693,9 +693,9 @@ "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" }, "semver": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.0.tgz", - "integrity": "sha512-Ya52jSX2u7QKghxeoFGpLwCtGlt7j0oY9DYb5apt9nPlJ42ID+ulTXESnt/qAQcoSERyZ5sl3LDIOw0nAn/5DA==" + "version": "5.6.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.6.0.tgz", + "integrity": "sha512-RS9R6R35NYgQn++fkDWaOmqGoj4Ek9gGs+DPxNUZKuwE183xjJroKvyo1IzVFeXvUrvmALy6FWD5xrdJT25gMg==" }, "source-map": { "version": "0.5.7", @@ -728,14 +728,14 @@ "integrity": "sha512-L4Qoh15vTfntsn4P1zqnHulG0LdXgjSO035fEpdtp6YxXhMT51Q6vgM5lYdG/5X3MjS+k/Y9Xw4SFCY9IkR0rg==" }, "unicode-match-property-value-ecmascript": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/unicode-match-property-value-ecmascript/-/unicode-match-property-value-ecmascript-1.1.0.tgz", - "integrity": "sha512-hDTHvaBk3RmFzvSl0UVrUmC3PuW9wKVnpoUDYH0JDkSIovzw+J5viQmeYHxVSBptubnr7PbH2e0fnpDRQnQl5g==" + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/unicode-match-property-value-ecmascript/-/unicode-match-property-value-ecmascript-1.0.2.tgz", + "integrity": "sha512-Rx7yODZC1L/T8XKo/2kNzVAQaRE88AaMvI1EF/Xnj3GW2wzN6fop9DDWuFAKUVFH7vozkz26DzP0qyWLKLIVPQ==" }, "unicode-property-aliases-ecmascript": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/unicode-property-aliases-ecmascript/-/unicode-property-aliases-ecmascript-1.0.5.tgz", - "integrity": "sha512-L5RAqCfXqAwR3RriF8pM0lU0w4Ryf/GgzONwi6KnL1taJQa7x1TCxdJnILX59WIGOwR57IVxn7Nej0fz1Ny6fw==" + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/unicode-property-aliases-ecmascript/-/unicode-property-aliases-ecmascript-1.0.4.tgz", + "integrity": "sha512-2WSLa6OdYd2ng8oqiGIWnJqyFArvhn+5vgx5GTxMbUYjCYKUcuKS62YLFF0R/BDGlB1yzXjQOLtPAfHsgirEpg==" } } } diff --git a/packages/babel-compiler/package.js b/packages/babel-compiler/package.js index b3a2d930cc..0fc349846d 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.4.3' + version: '7.3.4' }); Npm.depends({ - 'meteor-babel': '7.4.3', + 'meteor-babel': '7.3.4', 'json5': '2.1.0' }); diff --git a/packages/ecmascript/package.js b/packages/ecmascript/package.js index 45fc281d49..c64429cb37 100644 --- a/packages/ecmascript/package.js +++ b/packages/ecmascript/package.js @@ -1,6 +1,6 @@ Package.describe({ name: 'ecmascript', - version: '0.12.8', + version: '0.12.7', summary: 'Compiler plugin that supports ES2015+ in all .js files', documentation: 'README.md' }); diff --git a/scripts/dev-bundle-tool-package.js b/scripts/dev-bundle-tool-package.js index 3c51e7c2f2..7e6429ec8b 100644 --- a/scripts/dev-bundle-tool-package.js +++ b/scripts/dev-bundle-tool-package.js @@ -20,6 +20,9 @@ var packageJson = { fibers: "3.1.1", // So that Babel can emit require("@babel/runtime/helpers/...") calls. "@babel/runtime": "7.4.3", + // For backwards compatibility with isopackets that still depend on + // babel-runtime rather than @babel/runtime. + "babel-runtime": "7.0.0-beta.3", // Not yet upgrading Underscore from 1.5.2 to 1.7.0 (which should be done // in the package too) because we should consider using lodash instead // (and there are backwards-incompatible changes either way). From e6c3fb66c85579bde3b1b39c768ffbb04a720ce0 Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Wed, 10 Apr 2019 11:05:57 -0400 Subject: [PATCH 004/327] Bump $BUNDLE_VERSION to 8.15.1.3 before rebuilding dev bundle. --- meteor | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meteor b/meteor index fd9c57dea6..b030ec1ef8 100755 --- a/meteor +++ b/meteor @@ -1,6 +1,6 @@ #!/usr/bin/env bash -BUNDLE_VERSION=8.15.1.2 +BUNDLE_VERSION=8.15.1.3 # OS Check. Put here because here is where we download the precompiled # bundles that are arch specific. From 0383f01c637ba3eb16f016e01cfa0efa3135f352 Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Wed, 10 Apr 2019 12:59:04 -0400 Subject: [PATCH 005/327] Update optimism and use noContext to isolate Fiber contexts. The optimism package no longer knows anything about Fibers, but it does export various helpers for managing execution contexts, one of which (noContext) allows us to censor the current context for the duration of a function call. By wrapping Fiber.yield with noContext, we keep distinct Fibers from accidentally registering cache dependencies on one another. --- scripts/dev-bundle-tool-package.js | 2 +- tools/tool-env/install-runtime.js | 12 ++++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/scripts/dev-bundle-tool-package.js b/scripts/dev-bundle-tool-package.js index 7e6429ec8b..6206f321b7 100644 --- a/scripts/dev-bundle-tool-package.js +++ b/scripts/dev-bundle-tool-package.js @@ -52,7 +52,7 @@ var packageJson = { split2: "2.2.0", multipipe: "2.0.1", pathwatcher: "8.0.2", - optimism: "0.8.3", + optimism: "0.9.1", 'lru-cache': '4.1.3' } }; diff --git a/tools/tool-env/install-runtime.js b/tools/tool-env/install-runtime.js index 620e4d2131..bf4991aef9 100644 --- a/tools/tool-env/install-runtime.js +++ b/tools/tool-env/install-runtime.js @@ -1,5 +1,17 @@ "use strict"; +const { noContext } = require("optimism"); +if (noContext) { + // If we're using a modern version of the optimism package that supports + // noContext, we can use it to wrap Fiber.yield so that the current + // context is suspended before any yield and restored immediately after. + const Fiber = require("fibers"); + const originalYield = Fiber.yield; + Fiber.yield = function () { + return noContext(originalYield, arguments, Fiber); + }; +} + // Install ES2015-complaint polyfills for Object, Array, String, Function, // Symbol, Map, Set, and Promise, patching the native implementations when // they are available. From bb83acb2862e68e050671bfd259d26c0a46726f9 Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Wed, 10 Apr 2019 14:46:34 -0400 Subject: [PATCH 006/327] Bump $BUNDLE_VERSION to 8.15.1.4 before rebuilding dev bundle. --- meteor | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meteor b/meteor index b030ec1ef8..505a621eb4 100755 --- a/meteor +++ b/meteor @@ -1,6 +1,6 @@ #!/usr/bin/env bash -BUNDLE_VERSION=8.15.1.3 +BUNDLE_VERSION=8.15.1.4 # OS Check. Put here because here is where we download the precompiled # bundles that are arch specific. From 5adb7c64ab82746a90e1911ce2e6c941ed7b44bb Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Wed, 10 Apr 2019 17:13:56 -0400 Subject: [PATCH 007/327] Wrap Fiber.prototype.{run,throwInto} as well as Fiber.yield. https://github.com/laverdet/node-fibers/blob/ddebed9b8ae3883e57f822e2108e6943e5c8d2a8/fibers.js#L97-L100 --- tools/tool-env/install-promise.js | 6 ++++++ tools/tool-env/install-runtime.js | 14 +++----------- tools/tool-env/wrap-fibers.js | 19 +++++++++++++++++++ 3 files changed, 28 insertions(+), 11 deletions(-) create mode 100644 tools/tool-env/wrap-fibers.js diff --git a/tools/tool-env/install-promise.js b/tools/tool-env/install-promise.js index b86a68cf09..cd4dac6267 100644 --- a/tools/tool-env/install-promise.js +++ b/tools/tool-env/install-promise.js @@ -1,3 +1,9 @@ +// It's vitally important that we wrap Fiber.yield and other yielding +// methods before we call makeCompatible, because the meteor-promise +// implementation captures Fiber.yield and keeps calling the captured +// version, which ignores any wrapping that happens later. +require("./wrap-fibers.js"); + // Ensure the global Promise constructor knows how to run all its // callbacks in Fibers. diff --git a/tools/tool-env/install-runtime.js b/tools/tool-env/install-runtime.js index bf4991aef9..50a8c523bb 100644 --- a/tools/tool-env/install-runtime.js +++ b/tools/tool-env/install-runtime.js @@ -1,16 +1,8 @@ "use strict"; -const { noContext } = require("optimism"); -if (noContext) { - // If we're using a modern version of the optimism package that supports - // noContext, we can use it to wrap Fiber.yield so that the current - // context is suspended before any yield and restored immediately after. - const Fiber = require("fibers"); - const originalYield = Fiber.yield; - Fiber.yield = function () { - return noContext(originalYield, arguments, Fiber); - }; -} +// This module gets imported again in install-promise.js, but we might as +// well import it here as well, in case we ever stop using meteor-promise. +require("./wrap-fibers.js"); // Install ES2015-complaint polyfills for Object, Array, String, Function, // Symbol, Map, Set, and Promise, patching the native implementations when diff --git a/tools/tool-env/wrap-fibers.js b/tools/tool-env/wrap-fibers.js new file mode 100644 index 0000000000..b58a317133 --- /dev/null +++ b/tools/tool-env/wrap-fibers.js @@ -0,0 +1,19 @@ +const { noContext } = require("optimism"); + +if (noContext) { + // If we're using a modern version of optimism that supports noContext, + // we can use it to wrap yielding Fiber functions so that the current + // context is suspended before the yield and restored immediately after. + const Fiber = require("fibers"); + function wrap(obj, method) { + const fn = obj[method]; + obj[method] = function () { + return noContext(fn, arguments, this); + }; + } + // These methods can yield, according to + // https://github.com/laverdet/node-fibers/blob/ddebed9b8ae3883e57f822e2108e6943e5c8d2a8/fibers.js#L97-L100 + wrap(Fiber, "yield"); + wrap(Fiber.prototype, "run"); + wrap(Fiber.prototype, "throwInto"); +} From ca3caa9c8f3ba5c480d23575a1908e868879e447 Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Wed, 10 Apr 2019 18:33:16 -0400 Subject: [PATCH 008/327] Update optimism and explicitly depend on @wry/context and tslib. --- scripts/dev-bundle-tool-package.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/scripts/dev-bundle-tool-package.js b/scripts/dev-bundle-tool-package.js index 6206f321b7..13ab74b2e2 100644 --- a/scripts/dev-bundle-tool-package.js +++ b/scripts/dev-bundle-tool-package.js @@ -23,6 +23,7 @@ var packageJson = { // For backwards compatibility with isopackets that still depend on // babel-runtime rather than @babel/runtime. "babel-runtime": "7.0.0-beta.3", + tslib: "1.9.3", // Not yet upgrading Underscore from 1.5.2 to 1.7.0 (which should be done // in the package too) because we should consider using lodash instead // (and there are backwards-incompatible changes either way). @@ -52,7 +53,10 @@ var packageJson = { split2: "2.2.0", multipipe: "2.0.1", pathwatcher: "8.0.2", - optimism: "0.9.1", + // The @wry/context package version must be compatible with the + // version constraint imposed by optimism/package.json. + optimism: "0.9.3", + "@wry/context": "0.3.1", 'lru-cache': '4.1.3' } }; From d1f8bca88b09b4eec50671e45986f8e9422ed5c4 Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Wed, 10 Apr 2019 18:35:14 -0400 Subject: [PATCH 009/327] Bump $BUNDLE_VERSION to 8.15.1.5 before rebuilding dev bundle. --- meteor | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meteor b/meteor index 505a621eb4..0a73a2de14 100755 --- a/meteor +++ b/meteor @@ -1,6 +1,6 @@ #!/usr/bin/env bash -BUNDLE_VERSION=8.15.1.4 +BUNDLE_VERSION=8.15.1.5 # OS Check. Put here because here is where we download the precompiled # bundles that are arch specific. From 466cda693e5479da90056ae01692da940f0331b2 Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Wed, 10 Apr 2019 18:48:10 -0400 Subject: [PATCH 010/327] Use wrapYieldingFiberMethods from @wry/context. --- tools/tool-env/wrap-fibers.js | 20 +------------------- 1 file changed, 1 insertion(+), 19 deletions(-) diff --git a/tools/tool-env/wrap-fibers.js b/tools/tool-env/wrap-fibers.js index b58a317133..8afc0245b1 100644 --- a/tools/tool-env/wrap-fibers.js +++ b/tools/tool-env/wrap-fibers.js @@ -1,19 +1 @@ -const { noContext } = require("optimism"); - -if (noContext) { - // If we're using a modern version of optimism that supports noContext, - // we can use it to wrap yielding Fiber functions so that the current - // context is suspended before the yield and restored immediately after. - const Fiber = require("fibers"); - function wrap(obj, method) { - const fn = obj[method]; - obj[method] = function () { - return noContext(fn, arguments, this); - }; - } - // These methods can yield, according to - // https://github.com/laverdet/node-fibers/blob/ddebed9b8ae3883e57f822e2108e6943e5c8d2a8/fibers.js#L97-L100 - wrap(Fiber, "yield"); - wrap(Fiber.prototype, "run"); - wrap(Fiber.prototype, "throwInto"); -} +require("@wry/context").wrapYieldingFiberMethods(require("fibers")); From f096796a8f14882e469216a0039325908d1eda9f Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Thu, 11 Apr 2019 15:38:41 -0400 Subject: [PATCH 011/327] Update optimism and @wry/context to latest versions. --- scripts/dev-bundle-tool-package.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/dev-bundle-tool-package.js b/scripts/dev-bundle-tool-package.js index 13ab74b2e2..a4040fc78f 100644 --- a/scripts/dev-bundle-tool-package.js +++ b/scripts/dev-bundle-tool-package.js @@ -55,8 +55,8 @@ var packageJson = { pathwatcher: "8.0.2", // The @wry/context package version must be compatible with the // version constraint imposed by optimism/package.json. - optimism: "0.9.3", - "@wry/context": "0.3.1", + optimism: "0.9.5", + "@wry/context": "0.4.0", 'lru-cache': '4.1.3' } }; From 664560d8bbec279b1c9a8cd113d3534e564d2b82 Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Fri, 12 Apr 2019 14:40:04 -0400 Subject: [PATCH 012/327] Implement basic meteor/context package with @wry/context. The promise package needs a weak dependency on this package (on the server) because meteor-promise saves a reference to Fiber.yield, so we need to have wrapped Fiber.yield with noContext before that happens. --- packages/context/.npm/package/.gitignore | 1 + packages/context/.npm/package/README | 7 ++++++ .../context/.npm/package/npm-shrinkwrap.json | 15 ++++++++++++ packages/context/README.md | 0 packages/context/context-tests.js | 12 ++++++++++ packages/context/context.js | 15 ++++++++++++ packages/context/package.js | 24 +++++++++++++++++++ packages/context/server.js | 2 ++ packages/promise/package.js | 1 + 9 files changed, 77 insertions(+) create mode 100644 packages/context/.npm/package/.gitignore create mode 100644 packages/context/.npm/package/README create mode 100644 packages/context/.npm/package/npm-shrinkwrap.json create mode 100644 packages/context/README.md create mode 100644 packages/context/context-tests.js create mode 100644 packages/context/context.js create mode 100644 packages/context/package.js create mode 100644 packages/context/server.js diff --git a/packages/context/.npm/package/.gitignore b/packages/context/.npm/package/.gitignore new file mode 100644 index 0000000000..3c3629e647 --- /dev/null +++ b/packages/context/.npm/package/.gitignore @@ -0,0 +1 @@ +node_modules diff --git a/packages/context/.npm/package/README b/packages/context/.npm/package/README new file mode 100644 index 0000000000..3d492553a4 --- /dev/null +++ b/packages/context/.npm/package/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/context/.npm/package/npm-shrinkwrap.json b/packages/context/.npm/package/npm-shrinkwrap.json new file mode 100644 index 0000000000..93b5b96251 --- /dev/null +++ b/packages/context/.npm/package/npm-shrinkwrap.json @@ -0,0 +1,15 @@ +{ + "lockfileVersion": 1, + "dependencies": { + "@wry/context": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/@wry/context/-/context-0.4.0.tgz", + "integrity": "sha512-rVjwzFjVYXJ8pWJ8ZRCHv6meOebQvfTlvnUYUNX93Ce0KNeMTqCkf0GiOJc6BNVB96s7qfvwoLN3nUgDnSFOOg==" + }, + "tslib": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.9.3.tgz", + "integrity": "sha512-4krF8scpejhaOgqzBEcGM7yDIEfi0/8+8zDRZhNZZ2kjmHJ4hv3zCbQWxoJGz1iw5U0Jl0nma13xzHXcncMavQ==" + } + } +} diff --git a/packages/context/README.md b/packages/context/README.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/packages/context/context-tests.js b/packages/context/context-tests.js new file mode 100644 index 0000000000..ee3f45c623 --- /dev/null +++ b/packages/context/context-tests.js @@ -0,0 +1,12 @@ +import { Tinytest } from "meteor/tinytest"; +import { Slot } from "meteor/context"; + +Tinytest.add('context - basic Slot usage', function (test) { + const slot = new Slot(); + test.equal(slot.hasValue(), false); + slot.withValue(123, () => { + test.equal(slot.hasValue(), true); + test.equal(slot.getValue(), 123); + }); + test.equal(slot.hasValue(), false); +}); diff --git a/packages/context/context.js b/packages/context/context.js new file mode 100644 index 0000000000..720e3c8086 --- /dev/null +++ b/packages/context/context.js @@ -0,0 +1,15 @@ +const { + Slot, + bind, + noContext, + setTimeout, + asyncFromGen, +} = require("@wry/context"); + +Object.assign(exports, { + Slot, + bind, + noContext, + setTimeout, + asyncFromGen, +}); diff --git a/packages/context/package.js b/packages/context/package.js new file mode 100644 index 0000000000..90fd9f0e89 --- /dev/null +++ b/packages/context/package.js @@ -0,0 +1,24 @@ +Package.describe({ + name: "context", + version: "0.4.0", + summary: "", + git: "", + documentation: "README.md" +}); + +Npm.depends({ + "@wry/context": "0.4.0" +}); + +Package.onUse(function(api) { + api.use("modules"); + api.addFiles("server.js", "server"); + api.mainModule("context.js"); +}); + +Package.onTest(function(api) { + api.use("ecmascript"); + api.use("tinytest"); + api.use("context"); + api.mainModule("context-tests.js"); +}); diff --git a/packages/context/server.js b/packages/context/server.js new file mode 100644 index 0000000000..b9a5d3efbe --- /dev/null +++ b/packages/context/server.js @@ -0,0 +1,2 @@ +const { wrapYieldingFiberMethods } = require("@wry/context"); +wrapYieldingFiberMethods(require("fibers")); diff --git a/packages/promise/package.js b/packages/promise/package.js index 07090384df..1af67abed0 100644 --- a/packages/promise/package.js +++ b/packages/promise/package.js @@ -14,6 +14,7 @@ Npm.depends({ Package.onUse(function(api) { api.use("modules"); api.use("modern-browsers"); + api.use("context", "server", { weak: true }); api.addFiles("modern.js"); api.addFiles("legacy.js", "legacy"); api.mainModule("client.js", "client"); From 312dc29da7fc1154571a486b4404b6ca5a029ea4 Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Fri, 12 Apr 2019 17:02:53 -0400 Subject: [PATCH 013/327] Bump $BUNDLE_VERSION to 8.15.1.6 before rebuilding dev bundle. --- meteor | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meteor b/meteor index 0a73a2de14..bbc143982e 100755 --- a/meteor +++ b/meteor @@ -1,6 +1,6 @@ #!/usr/bin/env bash -BUNDLE_VERSION=8.15.1.5 +BUNDLE_VERSION=8.15.1.6 # OS Check. Put here because here is where we download the precompiled # bundles that are arch specific. From b510327f9c28baadfefa38f5d39481f48838056c Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Fri, 12 Apr 2019 19:18:01 -0400 Subject: [PATCH 014/327] Add a basic summary and README.md to meteor/context. --- packages/context/README.md | 7 +++++++ packages/context/package.js | 3 +-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/packages/context/README.md b/packages/context/README.md index e69de29bb2..444c17c212 100644 --- a/packages/context/README.md +++ b/packages/context/README.md @@ -0,0 +1,7 @@ +# context +[Source code of released version](https://github.com/meteor/meteor/tree/master/packages/context) | [Source code of development version](https://github.com/meteor/meteor/tree/devel/packages/context) +*** + +Meteor wrapper package for the +[`@wry/context`](https://github.com/benjamn/wryware/tree/master/packages/context) +npm package. diff --git a/packages/context/package.js b/packages/context/package.js index 90fd9f0e89..5a82cffd9c 100644 --- a/packages/context/package.js +++ b/packages/context/package.js @@ -1,8 +1,7 @@ Package.describe({ name: "context", version: "0.4.0", - summary: "", - git: "", + summary: "Manage contextual information needed by (a)synchronous tasks without explicitly passing objects around", documentation: "README.md" }); From 96778efcc8b1952eb6dbced9d3d6d1056605164e Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Fri, 12 Apr 2019 19:24:38 -0400 Subject: [PATCH 015/327] Shorten meteor/context summary. --- packages/context/package.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/context/package.js b/packages/context/package.js index 5a82cffd9c..f179cb2051 100644 --- a/packages/context/package.js +++ b/packages/context/package.js @@ -1,7 +1,7 @@ Package.describe({ name: "context", version: "0.4.0", - summary: "Manage contextual information needed by (a)synchronous tasks without explicitly passing objects around", + summary: "Manage contextual information without passing objects around", documentation: "README.md" }); From 588d037ca66532b3f5cdbad6ed4ce13e5ac0af09 Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Fri, 12 Apr 2019 19:34:13 -0400 Subject: [PATCH 016/327] Bump package versions for 1.8.2-alpha.0 release. --- packages/context/package.js | 2 +- packages/meteor-tool/package.js | 2 +- scripts/admin/meteor-release-experimental.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/context/package.js b/packages/context/package.js index f179cb2051..573e04d784 100644 --- a/packages/context/package.js +++ b/packages/context/package.js @@ -1,6 +1,6 @@ Package.describe({ name: "context", - version: "0.4.0", + version: "0.4.0-alpha182.0", summary: "Manage contextual information without passing objects around", documentation: "README.md" }); diff --git a/packages/meteor-tool/package.js b/packages/meteor-tool/package.js index 7ae9f7b667..b3593de6fe 100644 --- a/packages/meteor-tool/package.js +++ b/packages/meteor-tool/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "The Meteor command-line tool", - version: '1.8.1' + version: '1.8.2-alpha.0' }); Package.includeTool(); diff --git a/scripts/admin/meteor-release-experimental.json b/scripts/admin/meteor-release-experimental.json index 1e09057fff..0eaa19ac16 100644 --- a/scripts/admin/meteor-release-experimental.json +++ b/scripts/admin/meteor-release-experimental.json @@ -1,6 +1,6 @@ { "track": "METEOR", - "version": "1.8.1-rc.1", + "version": "1.8.2-alpha.0", "recommended": false, "official": false, "description": "Meteor" From 798a155c64b2257252553563d4185b7d30a4218f Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Sat, 13 Apr 2019 11:05:58 -0400 Subject: [PATCH 017/327] Enable Babel-powered TypeScript compilation of meteor/tools. These changes pave the way for incrementally converting the implementation of Meteor's command-line tool to TypeScript, which should have profound benefits for self-documentation via types, as well as substantially improving navigability and approachability for community contributors. Just imagine being able to auto-complete the fields of the various File-like classes currently floating around the codebase, instead of having to track down their implementations every time. TypeScript was designed with large projects like Meteor in mind, and it seems increasingly irresponsible to forgo the benefits of a type system by relying on the expertise of a few core contributors who know the codebase inside and out. I am one of those few people, and I am very excited to have the assistance of a type system, so I can only imagine how transformative and empowering it will be for everyone else. If you've ever wanted to get involved in core Meteor development, picking a few meteor/tools modules to convert to TypeScript is a great way to get to know that part of the codebase, while also making things easier for everyone else who interacts with that code in the future. Because we already compile meteor/tools using Babel, it makes the most sense to use Babel's @babel/preset-typescript to compile .ts files: https://babeljs.io/docs/en/next/babel-preset-typescript.html Using Babel also means we get to keep all of our current advanced compilation strategies, such as using Reify to compile module syntax: https://www.npmjs.com/package/reify Since we're using Babel, the meteor/tools/tsconfig.json file exists mostly for the benefit of external tools like VSCode, rather than as a source of truth for compilation behavior. Despite our existing convention of including explicit .js file extensions when importing modules, TypeScript and VSCode strongly encourage omitting the file extension, so the import can be resolved to a .ts file in development or a .js file when compiled. Although I find this ambiguity somewhat unfortunate, it makes sense to follow community norms, at least until Node.js begins supporting .ts modules by default. --- scripts/dev-bundle-tool-package.js | 3 +- tools/isobuild/isopack.js | 68 +++++++++++++++--------------- tools/tool-env/install-babel.js | 3 +- tools/tsconfig.json | 29 +++++++++++++ 4 files changed, 66 insertions(+), 37 deletions(-) create mode 100644 tools/tsconfig.json diff --git a/scripts/dev-bundle-tool-package.js b/scripts/dev-bundle-tool-package.js index a4040fc78f..42ed2f4bfd 100644 --- a/scripts/dev-bundle-tool-package.js +++ b/scripts/dev-bundle-tool-package.js @@ -14,7 +14,7 @@ var packageJson = { pacote: "https://github.com/meteor/pacote/tarball/c5043daa1b768594e01d76275e3854fc19f038f9", "node-gyp": "3.7.0", "node-pre-gyp": "0.10.3", - "meteor-babel": "7.4.3", + "meteor-babel": "7.4.4", "meteor-promise": "0.8.7", reify: "0.17.3", fibers: "3.1.1", @@ -23,7 +23,6 @@ var packageJson = { // For backwards compatibility with isopackets that still depend on // babel-runtime rather than @babel/runtime. "babel-runtime": "7.0.0-beta.3", - tslib: "1.9.3", // Not yet upgrading Underscore from 1.5.2 to 1.7.0 (which should be done // in the package too) because we should consider using lodash instead // (and there are backwards-incompatible changes either way). diff --git a/tools/isobuild/isopack.js b/tools/isobuild/isopack.js index 037e5c398e..b10d89c4a6 100644 --- a/tools/isobuild/isopack.js +++ b/tools/isobuild/isopack.js @@ -1409,33 +1409,20 @@ _.extend(Isopack.prototype, { !f.match(/^examples\/unfinished/); }); - // Regexes matching paths to transpile using babel - var transpileRegexes = [ - /^tools\/[^\/]+\.js$/, // General tools files - /^tools\/isobuild\/[^\/]+\.js$/, // Isobuild files - /^tools\/cli\/[^\/]+\.js$/, // CLI files - /^tools\/tool-env\/[^\/]+\.js$/, // Tool initiation and clean up - /^tools\/runners\/[^\/]+\.js$/, // Parts of tool process - /^tools\/packaging\/[^\/]+\.js$/, - /^tools\/packaging\/catalog\/[^\/]+\.js$/, - /^tools\/utils\/[^\/]+\.js$/, - /^tools\/fs\/[^\/]+\.js$/, - /^tools\/meteor-services\/[^\/]+\.js$/, - /^tools\/tool-testing\/[^\/]+\.js$/, - /^tools\/console\/[^\/]+\.js$/, - /^tools\/cordova\/[^\/]+\.js$/, - // We don't support running self-test from an install anymore - ]; + function shouldTranspile(path) { + return path.startsWith("tools/") && + (path.endsWith(".js") || path.endsWith(".ts")) && + !path.startsWith("tools/node_modules/") && + !path.startsWith("tools/static-assets/") && + !path.startsWith("tools/tests/"); + } // Split pathsToCopy into two arrays - one of files that should be copied // directly, and one of files that should be transpiled with Babel var pathsToTranspile = []; var pathsToCopyStraight = []; - pathsToCopy.forEach((path) => { - var shouldTranspile = - _.some(transpileRegexes, (regex) => path.match(regex)); - - if (shouldTranspile) { + pathsToCopy.forEach(path => { + if (shouldTranspile(path)) { pathsToTranspile.push(path); } else { pathsToCopyStraight.push(path); @@ -1446,8 +1433,14 @@ _.extend(Isopack.prototype, { var toolPath = 'mt-' + archinfo.host(); builder = builder.enter(toolPath); + const babel = require("meteor-babel"); + const commonBabelOptions = babel.getDefaultOptions({ + nodeMajorVersion: parseInt(process.versions.node), + typescript: true + }); + commonBabelOptions.sourceMaps = true; + // Transpile the files we selected - var babel = require("meteor-babel"); pathsToTranspile.forEach((path) => { const toolsDir = files.getCurrentToolsDir(); const fullPath = files.convertToOSPath(files.pathJoin(toolsDir, path)); @@ -1464,29 +1457,36 @@ _.extend(Isopack.prototype, { inputFileContents = inputFileContents.replace(/^.*#RemoveInProd.*$/mg, ""); } - var babelOptions = babel.getDefaultOptions({ - nodeMajorVersion: parseInt(process.versions.node) - }); - - _.extend(babelOptions, { + var transpiled = babel.compile(inputFileContents, { + ...commonBabelOptions, filename: path, sourceFileName: "/" + path, - sourceMaps: true - }); - - var transpiled = babel.compile(inputFileContents, babelOptions, { + }, { cacheDirectory: babelCacheDirectory, }); var sourceMapUrlComment = "//# sourceMappingURL=" + files.pathBasename(path + ".map"); - builder.write(path, { + let outputPath = path; + if (path.endsWith(".ts")) { + // The published implementation of the meteor-tool package should + // contain only .js files, like any compiled TypeScript project. + // This design has the unfortunate consequence of forbidding + // explicit .ts file extensions in imported module identifier + // strings, but that's just how it goes with TypeScript. + const parts = path.split("."); + assert.strictEqual(parts.pop(), "ts"); + parts.push("js"); + outputPath = parts.join("."); + } + + builder.write(outputPath, { data: Buffer.from(transpiled.code + "\n" + sourceMapUrlComment, 'utf8') }); // The babelOptions.sourceMapTarget option was deprecated in Babel // 7.0.0-beta.41: https://github.com/babel/babel/pull/7500 - const sourceMapTarget = path + ".map"; + const sourceMapTarget = outputPath + ".map"; transpiled.map.file = sourceMapTarget; builder.write(sourceMapTarget, { diff --git a/tools/tool-env/install-babel.js b/tools/tool-env/install-babel.js index f8a26ee7ef..e9a3c6903d 100644 --- a/tools/tool-env/install-babel.js +++ b/tools/tool-env/install-babel.js @@ -10,7 +10,8 @@ function babelRegister() { const meteorPath = path.dirname(toolsPath); const cacheDir = path.join(meteorPath, ".babel-cache"); const babelOptions = meteorBabel.getDefaultOptions({ - nodeMajorVersion: parseInt(process.versions.node) + nodeMajorVersion: parseInt(process.versions.node), + typescript: true }); // Make sure that source maps are included in the generated code for diff --git a/tools/tsconfig.json b/tools/tsconfig.json new file mode 100644 index 0000000000..b7793b4b38 --- /dev/null +++ b/tools/tsconfig.json @@ -0,0 +1,29 @@ +{ + "compilerOptions": { + /* Basic Options */ + "target": "es2018", + "module": "es2015", + "lib": ["esnext"], + "allowJs": true, + "checkJs": false, + "incremental": true, + "noEmit": true, + + /* Strict Type-Checking Options */ + "strict": true, + "noImplicitAny": true, + "strictNullChecks": true, + + /* Additional Checks */ + "noUnusedLocals": true, + "noUnusedParameters": true, + "noImplicitReturns": false, + "noFallthroughCasesInSwitch": false, + + /* Module Resolution Options */ + "moduleResolution": "node", + "types": ["node"], + "esModuleInterop": true, + "preserveSymlinks": true, + } +} From 257b2d62d3e79bb9a3b6071d0e4d43969d67ef1e Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Sun, 14 Apr 2019 13:15:03 -0400 Subject: [PATCH 018/327] Bump $BUNDLE_VERSION to 8.15.1.7 before rebuilding dev bundle. --- meteor | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meteor b/meteor index bbc143982e..ae99a0efc8 100755 --- a/meteor +++ b/meteor @@ -1,6 +1,6 @@ #!/usr/bin/env bash -BUNDLE_VERSION=8.15.1.6 +BUNDLE_VERSION=8.15.1.7 # OS Check. Put here because here is where we download the precompiled # bundles that are arch specific. From 543bed4e0b5f0baffaba7e5cbb72c499b8654b44 Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Sat, 13 Apr 2019 12:29:50 -0400 Subject: [PATCH 019/327] Convert tools/isobuild/css-modules.js to TypeScript. Choosing this module first because it's tiny and only imported twice. --- tools/isobuild/compiler-plugin.js | 2 +- tools/isobuild/{css-modules.js => css-modules.ts} | 2 +- tools/isobuild/import-scanner.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) rename tools/isobuild/{css-modules.js => css-modules.ts} (75%) diff --git a/tools/isobuild/compiler-plugin.js b/tools/isobuild/compiler-plugin.js index 7ac64cbf5c..0ae055c57f 100644 --- a/tools/isobuild/compiler-plugin.js +++ b/tools/isobuild/compiler-plugin.js @@ -14,7 +14,7 @@ import LRU from 'lru-cache'; import {sourceMapLength} from '../utils/utils.js'; import {Console} from '../console/console.js'; import ImportScanner from './import-scanner.js'; -import {cssToCommonJS} from "./css-modules.js"; +import {cssToCommonJS} from "./css-modules"; import Resolver from "./resolver.js"; import { optimisticStatOrNull, diff --git a/tools/isobuild/css-modules.js b/tools/isobuild/css-modules.ts similarity index 75% rename from tools/isobuild/css-modules.js rename to tools/isobuild/css-modules.ts index 2b71c2bcd7..5a7c589b0d 100644 --- a/tools/isobuild/css-modules.js +++ b/tools/isobuild/css-modules.ts @@ -1,4 +1,4 @@ -export function cssToCommonJS(css) { +export function cssToCommonJS(css: string) { return [ 'module.exports = require("meteor/modules").addStyles(', " " + JSON.stringify(css), diff --git a/tools/isobuild/import-scanner.js b/tools/isobuild/import-scanner.js index 065c005206..6e4b033449 100644 --- a/tools/isobuild/import-scanner.js +++ b/tools/isobuild/import-scanner.js @@ -7,7 +7,7 @@ import { import {sha1} from "../fs/watch.js"; import {matches as archMatches} from "../utils/archinfo.js"; import {findImportedModuleIdentifiers} from "./js-analyze.js"; -import {cssToCommonJS} from "./css-modules.js"; +import {cssToCommonJS} from "./css-modules"; import buildmessage from "../utils/buildmessage.js"; import LRU from "lru-cache"; import {Profile} from "../tool-env/profile.js"; From 20273d72e9cfbaaf9179713fa35555b8a71a7aaf Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Sun, 14 Apr 2019 14:27:07 -0400 Subject: [PATCH 020/327] Bump package versions for 1.8.2-alpha.1 release. --- packages/context/package.js | 2 +- packages/meteor-tool/package.js | 2 +- scripts/admin/meteor-release-experimental.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/context/package.js b/packages/context/package.js index 573e04d784..5c0e5c5e09 100644 --- a/packages/context/package.js +++ b/packages/context/package.js @@ -1,6 +1,6 @@ Package.describe({ name: "context", - version: "0.4.0-alpha182.0", + version: "0.4.0-alpha182.1", summary: "Manage contextual information without passing objects around", documentation: "README.md" }); diff --git a/packages/meteor-tool/package.js b/packages/meteor-tool/package.js index b3593de6fe..72e65b3365 100644 --- a/packages/meteor-tool/package.js +++ b/packages/meteor-tool/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "The Meteor command-line tool", - version: '1.8.2-alpha.0' + version: '1.8.2-alpha.1' }); Package.includeTool(); diff --git a/scripts/admin/meteor-release-experimental.json b/scripts/admin/meteor-release-experimental.json index 0eaa19ac16..0a44548a03 100644 --- a/scripts/admin/meteor-release-experimental.json +++ b/scripts/admin/meteor-release-experimental.json @@ -1,6 +1,6 @@ { "track": "METEOR", - "version": "1.8.2-alpha.0", + "version": "1.8.2-alpha.1", "recommended": false, "official": false, "description": "Meteor" From 154ca31faa696b585ff84764e16a39d8cb15457c Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Mon, 22 Apr 2019 13:41:00 -0400 Subject: [PATCH 021/327] Enable compilation of tools/static-assets/server. --- tools/isobuild/isopack.js | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/tools/isobuild/isopack.js b/tools/isobuild/isopack.js index b10d89c4a6..e137d8fc15 100644 --- a/tools/isobuild/isopack.js +++ b/tools/isobuild/isopack.js @@ -1410,11 +1410,18 @@ _.extend(Isopack.prototype, { }); function shouldTranspile(path) { - return path.startsWith("tools/") && - (path.endsWith(".js") || path.endsWith(".ts")) && - !path.startsWith("tools/node_modules/") && - !path.startsWith("tools/static-assets/") && - !path.startsWith("tools/tests/"); + const parts = path.split("/"); + if (parts[0] === "tools" && + (path.endsWith(".js") || path.endsWith(".ts"))) { + if (parts[1] === "static-assets") { + return parts[2] === "server"; + } + if (parts[1] !== "node_modules" && + parts[1] !== "tests") { + return true; + } + } + return false; } // Split pathsToCopy into two arrays - one of files that should be copied From f0192a82d9ac988a141765c6b75979323218547f Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Mon, 22 Apr 2019 14:05:07 -0400 Subject: [PATCH 022/327] Stop using mini-files.js in non-Babel-compiled code. --- tools/cli/convert-to-os-path.js | 20 ++++++++++++++++++++ tools/cli/dev-bundle-bin-helpers.js | 9 +++++---- tools/cli/dev-bundle-links.js | 10 +++++----- 3 files changed, 30 insertions(+), 9 deletions(-) create mode 100644 tools/cli/convert-to-os-path.js diff --git a/tools/cli/convert-to-os-path.js b/tools/cli/convert-to-os-path.js new file mode 100644 index 0000000000..bcc5446cfb --- /dev/null +++ b/tools/cli/convert-to-os-path.js @@ -0,0 +1,20 @@ +function toDosPath(path) { + if (path[0] === "/") { + if (! /^\/[A-Za-z](\/|$)/.test(path)) { + throw new Error("Surprising path: " + path); + } + // transform a previously windows path back + // "/C/something" to "c:/something" + path = path[1] + ":" + path.slice(2); + } + return path.split("/").join("\\"); +} + +function convertToOSPath(path) { + if (process.platform === "win32") { + return toDosPath(path); + } + return path; +} + +exports.convertToOSPath = convertToOSPath; diff --git a/tools/cli/dev-bundle-bin-helpers.js b/tools/cli/dev-bundle-bin-helpers.js index ce0ffa13d3..2d8b7b62c5 100644 --- a/tools/cli/dev-bundle-bin-helpers.js +++ b/tools/cli/dev-bundle-bin-helpers.js @@ -1,6 +1,7 @@ -var fs = require("fs"); -var path = require("path"); -var files = require("../fs/mini-files.js"); +const fs = require("fs"); +const path = require("path"); +const { convertToOSPath } = require("./convert-to-os-path.js"); + var isWindows = process.platform === "win32"; var extensions = isWindows ? [".cmd", ".exe"] : [""]; var hasOwn = Object.prototype.hasOwnProperty; @@ -63,7 +64,7 @@ function isValidCommand(name, devBundleDir) { exports.getEnv = function (options) { var devBundle = options && options.devBundle; var devBundlePromise = typeof devBundle === "string" - ? Promise.resolve(files.convertToOSPath(devBundle)) + ? Promise.resolve(convertToOSPath(devBundle)) : getDevBundle(); return devBundlePromise.then(function (devBundleDir) { diff --git a/tools/cli/dev-bundle-links.js b/tools/cli/dev-bundle-links.js index d203fc973a..5327c2d02c 100644 --- a/tools/cli/dev-bundle-links.js +++ b/tools/cli/dev-bundle-links.js @@ -1,9 +1,9 @@ -var fs = require("fs"); -var files = require("../fs/mini-files.js"); +const fs = require("fs"); +const { convertToOSPath } = require("./convert-to-os-path.js"); exports.makeLink = function (target, linkPath) { - target = files.convertToOSPath(target); - linkPath = files.convertToOSPath(linkPath); + target = convertToOSPath(target); + linkPath = convertToOSPath(linkPath); var tempPath = linkPath + "-" + Math.random().toString(36).slice(2); @@ -24,7 +24,7 @@ exports.makeLink = function (target, linkPath) { // Note: this function returns an OS-specific path! exports.readLink = function (linkPath) { - linkPath = files.convertToOSPath(linkPath); + linkPath = convertToOSPath(linkPath); var stat = fs.lstatSync(linkPath); if (stat.isSymbolicLink()) { From 59c66baa9bc7bb3005ed67470f57aba981f61764 Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Mon, 22 Apr 2019 13:50:37 -0400 Subject: [PATCH 023/327] Convert tools/static-assets/server/mini-files.js to module. --- tools/static-assets/server/mini-files.js | 103 ++++++++++------------- 1 file changed, 45 insertions(+), 58 deletions(-) diff --git a/tools/static-assets/server/mini-files.js b/tools/static-assets/server/mini-files.js index c2a0639c81..30dff0ca25 100644 --- a/tools/static-assets/server/mini-files.js +++ b/tools/static-assets/server/mini-files.js @@ -1,7 +1,6 @@ -var _ = require("underscore"); -var os = require("os"); -var path = require("path"); -var assert = require("assert"); +import * as assert from "assert"; +import * as path from "path"; +import { release, EOL } from "os"; // All of these functions are attached to files.js for the tool; // they live here because we need them in boot.js as well to avoid duplicating @@ -11,17 +10,15 @@ var assert = require("assert"); // synchronously" functions from files.js; this is intentional, because we want // to make it very hard to accidentally use fs.*Sync functions in the app server // after bootup (since they block all concurrency!) -var files = module.exports; // Detect that we are on a Windows-like Filesystem, such as that in a WSL // (Windows Subsystem for Linux) even if it otherwise looks like we're on Unix. // https://github.com/Microsoft/BashOnWindows/issues/423#issuecomment-221627364 -var isWindowsLikeFilesystem = function () { - return process.platform === "win32" || - (os.release().indexOf("Microsoft") > -1); -}; +export function isWindowsLikeFilesystem() { + return process.platform === "win32" || release().indexOf("Microsoft") >= 0; +} -var toPosixPath = function (p, partialPath) { +export function toPosixPath(p, partialPath) { // Sometimes, you can have a path like \Users\IEUser on windows, and this // actually means you want C:\Users\IEUser if (p[0] === "\\" && (! partialPath)) { @@ -35,9 +32,11 @@ var toPosixPath = function (p, partialPath) { } return p; -}; +} -var toDosPath = function (p, partialPath) { +export const convertToPosixPath = toPosixPath; + +export function toDosPath(p, partialPath) { if (p[0] === '/' && ! partialPath) { if (! /^\/[A-Za-z](\/|$)/.test(p)) throw new Error("Surprising path: " + p); @@ -48,18 +47,19 @@ var toDosPath = function (p, partialPath) { p = p.replace(/\//g, '\\'); return p; -}; +} +export const convertToWindowsPath = toDosPath; -var convertToOSPath = function (standardPath, partialPath) { +export function convertToOSPath(standardPath, partialPath) { if (process.platform === "win32") { return toDosPath(standardPath, partialPath); } return standardPath; -}; +} -var convertToStandardPath = function (osPath, partialPath) { +export function convertToStandardPath(osPath, partialPath) { if (process.platform === "win32") { return toPosixPath(osPath, partialPath); } @@ -67,69 +67,56 @@ var convertToStandardPath = function (osPath, partialPath) { return osPath; } -var convertToOSLineEndings = function (fileContents) { - return fileContents.replace(/\n/g, os.EOL); -}; +export function convertToOSLineEndings(fileContents) { + return fileContents.replace(/\n/g, EOL); +} -var convertToStandardLineEndings = function (fileContents) { +export function convertToStandardLineEndings(fileContents) { // Convert all kinds of end-of-line chars to linuxy "\n". return fileContents.replace(new RegExp("\r\n", "g"), "\n") .replace(new RegExp("\r", "g"), "\n"); -}; +} + // Return the Unicode Normalization Form of the passed in path string, using // "Normalization Form Canonical Composition" -const unicodeNormalizePath = (path) => { +export function unicodeNormalizePath(path) { return (path) ? path.normalize('NFC') : path; -}; +} // wrappings for path functions that always run as they were on unix (using // forward slashes) -var wrapPathFunction = function (name, partialPaths) { - var f = path[name]; +export function wrapPathFunction(name, partialPaths) { + const f = path[name]; assert.strictEqual(typeof f, "function"); - return function (/* args */) { + return function () { if (process.platform === 'win32') { - var args = _.toArray(arguments); - args = _.map(args, function (p, i) { + const args = Array.prototype.map.call( + arguments, // if partialPaths is turned on (for path.join mostly) // forget about conversion of absolute paths for Windows - return toDosPath(p, partialPaths); - }); - - var result = f.apply(path, args); + p => toDosPath(p, partialPaths), + ); + const result = f.apply(path, args); if (typeof result === "string") { - result = toPosixPath(result, partialPaths); + return toPosixPath(result, partialPaths); } - return result; } return f.apply(path, arguments); }; -}; +} -files.pathJoin = wrapPathFunction("join", true); -files.pathNormalize = wrapPathFunction("normalize"); -files.pathRelative = wrapPathFunction("relative"); -files.pathResolve = wrapPathFunction("resolve"); -files.pathDirname = wrapPathFunction("dirname"); -files.pathBasename = wrapPathFunction("basename"); -files.pathExtname = wrapPathFunction("extname"); -// The path.isAbsolute function is implemented in Node v4. -files.pathIsAbsolute = wrapPathFunction("isAbsolute"); -files.pathSep = '/'; -files.pathDelimiter = ':'; -files.pathOsDelimiter = path.delimiter; - -files.isWindowsLikeFilesystem = isWindowsLikeFilesystem; - -files.convertToStandardPath = convertToStandardPath; -files.convertToOSPath = convertToOSPath; -files.convertToWindowsPath = toDosPath; -files.convertToPosixPath = toPosixPath; - -files.convertToStandardLineEndings = convertToStandardLineEndings; -files.convertToOSLineEndings = convertToOSLineEndings; -files.unicodeNormalizePath = unicodeNormalizePath; +export const pathJoin = wrapPathFunction("join", true); +export const pathNormalize = wrapPathFunction("normalize"); +export const pathRelative = wrapPathFunction("relative"); +export const pathResolve = wrapPathFunction("resolve"); +export const pathDirname = wrapPathFunction("dirname"); +export const pathBasename = wrapPathFunction("basename"); +export const pathExtname = wrapPathFunction("extname"); +export const pathIsAbsolute = wrapPathFunction("isAbsolute"); +export const pathSep = '/'; +export const pathDelimiter = ':'; +export const pathOsDelimiter = path.delimiter; From 15ba990d7233d6d99e3932c7b8d7e22e813ebffb Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Tue, 23 Apr 2019 16:56:08 -0400 Subject: [PATCH 024/327] Update Node.js to version 8.16.0. https://nodejs.org/en/blog/release/v8.16.0/ https://github.com/nodejs/node/blob/master/doc/changelogs/CHANGELOG_V8.md#8.16.0 --- History.md | 3 +++ scripts/build-dev-bundle-common.sh | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/History.md b/History.md index cafbaa1817..363e842453 100644 --- a/History.md +++ b/History.md @@ -8,6 +8,9 @@ N/A ### Changes +* Node has been updated to version + [8.16.0](https://nodejs.org/en/blog/release/v8.16.0/). + * The `meteor-babel` npm package has been updated to version 7.4.3. ## v1.8.1, 2019-04-03 diff --git a/scripts/build-dev-bundle-common.sh b/scripts/build-dev-bundle-common.sh index f4905d8cd7..58a1d79928 100644 --- a/scripts/build-dev-bundle-common.sh +++ b/scripts/build-dev-bundle-common.sh @@ -5,7 +5,7 @@ set -u UNAME=$(uname) ARCH=$(uname -m) -NODE_VERSION=8.15.1 +NODE_VERSION=8.16.0 MONGO_VERSION_64BIT=4.0.6 MONGO_VERSION_32BIT=3.2.22 NPM_VERSION=6.9.0 From e3aecf2bc1560c90a6f349b61b5dac880d03d32f Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Tue, 23 Apr 2019 18:07:29 -0400 Subject: [PATCH 025/327] Bump $BUNDLE_VERSION to 8.16.0.0 before rebuilding dev bundle. --- meteor | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meteor b/meteor index ae99a0efc8..89225f365f 100755 --- a/meteor +++ b/meteor @@ -1,6 +1,6 @@ #!/usr/bin/env bash -BUNDLE_VERSION=8.15.1.7 +BUNDLE_VERSION=8.16.0.0 # OS Check. Put here because here is where we download the precompiled # bundles that are arch specific. From 4ff27f8a52f6bbe7bfc0a2c03c200e20ad2749ed Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Fri, 26 Apr 2019 11:38:37 -0400 Subject: [PATCH 026/327] Use Builder#copyTranspiledModules to compile .js and .ts files with Babel. --- tools/isobuild/builder.js | 88 ++++++++++++++++++++++++++++++++++++++- tools/isobuild/bundler.js | 21 +++++----- tools/isobuild/isopack.js | 63 ++-------------------------- 3 files changed, 102 insertions(+), 70 deletions(-) diff --git a/tools/isobuild/builder.js b/tools/isobuild/builder.js index ea71eb8fc1..eaaf8e99b5 100644 --- a/tools/isobuild/builder.js +++ b/tools/isobuild/builder.js @@ -343,6 +343,79 @@ Previous builder: ${previousBuilder.outputPath}, this builder: ${outputPath}` return relPath; } + copyTranspiledModules(relativePaths, { + sourceRootDir, + targetRootDir = this.outputPath, + needToTranspile = files.inCheckout(), + }) { + if (!needToTranspile) { + // If these files have already been transpiled, copy the transpiled files + // (both .js and .js.map) directly to the builder output directory, without + // recompiling them. + relativePaths.forEach(relPath => { + const jsPath = jsToTs(relPath); + [jsPath, jsPath + ".map"].forEach(path => { + this.write(path, { + file: files.pathJoin(sourceRootDir, path), + }); + }); + }); + return; + } + + const babel = require("meteor-babel"); + const commonBabelOptions = babel.getDefaultOptions({ + nodeMajorVersion: parseInt(process.versions.node), + typescript: true + }); + commonBabelOptions.sourceMaps = true; + + const toolsDir = files.getCurrentToolsDir(); + const babelCacheDirectory = + files.pathJoin(files.pathDirname(toolsDir), ".babel-cache"); + + relativePaths.forEach(relPath => { + assert.ok(!files.pathIsAbsolute(relPath), relPath); + const fullPath = files.pathJoin(sourceRootDir, relPath); + let inputFileContents = files.readFile(fullPath, "utf-8"); + + // If certain behavior should be disabled in the transpiled code, the + // #RemoveInProd comment can be added to strip out appropriate lines. + inputFileContents = inputFileContents.replace(/^.*#RemoveInProd.*$/mg, ""); + + var transpiled = babel.compile(inputFileContents, { + ...commonBabelOptions, + filename: relPath, + sourceFileName: "/" + relPath, + }, { + cacheDirectory: babelCacheDirectory, + }); + + // The published implementation of the meteor-tool package should + // contain only .js files, like any compiled TypeScript project. + // This design has the unfortunate consequence of forbidding + // explicit .ts file extensions in imported module identifier + // strings, but that's just how it goes with TypeScript. + let outputPath = jsToTs(relPath); + + const sourceMapUrlComment = + "//# sourceMappingURL=" + files.pathBasename(outputPath + ".map"); + + this.write(outputPath, { + data: Buffer.from(transpiled.code + "\n" + sourceMapUrlComment, 'utf8') + }); + + // The babelOptions.sourceMapTarget option was deprecated in Babel + // 7.0.0-beta.41: https://github.com/babel/babel/pull/7500 + const sourceMapTarget = outputPath + ".map"; + transpiled.map.file = sourceMapTarget; + + this.write(sourceMapTarget, { + data: Buffer.from(JSON.stringify(transpiled.map), 'utf8') + }); + }); + } + // Serialize `data` as JSON and write it to `relPath` (a path to a // file relative to the bundle root), creating parent directories as // necessary. Throw an exception if the file already exists. @@ -770,7 +843,10 @@ Previous builder: ${previousBuilder.outputPath}, this builder: ${outputPath}` // Methods that don't have to fix up arguments or return values, because // they are implemented purely in terms of other methods which do. - const passThroughMethods = ["writeToGeneratedFilename"]; + const passThroughMethods = [ + "writeToGeneratedFilename", + "copyTranspiledModules", + ]; passThroughMethods.forEach(method => { subBuilder[method] = this[method]; }); @@ -834,6 +910,16 @@ Previous builder: ${previousBuilder.outputPath}, this builder: ${outputPath}` } } +function jsToTs(path) { + if (path.endsWith(".ts")) { + const parts = path.split("."); + assert.strictEqual(parts.pop(), "ts"); + parts.push("js"); + path = parts.join("."); + } + return path; +} + function atomicallyRewriteFile(path, data, options) { // create a different file with a random name and then rename over atomically const rname = '.builder-tmp-file.' + Math.floor(Math.random() * 999999); diff --git a/tools/isobuild/bundler.js b/tools/isobuild/bundler.js index 1adbfe88ae..8ef8b1fc35 100644 --- a/tools/isobuild/bundler.js +++ b/tools/isobuild/bundler.js @@ -2700,7 +2700,7 @@ class ServerTarget extends JsImageTarget { }); // Server bootstrap - _.each([ + builder.copyTranspiledModules([ "boot.js", "boot-utils.js", "debug.js", @@ -2709,15 +2709,16 @@ class ServerTarget extends JsImageTarget { "npm-require.js", "npm-rebuild.js", "npm-rebuild-args.js", - ], function (filename) { - builder.write(filename, { - file: files.pathJoin( - toolsDir, - 'static-assets', - 'server', - filename - ) - }); + ], { + sourceRootDir: files.pathJoin( + toolsDir, + "static-assets", + "server", + ), + // If we're not in a checkout, then /static-assets/server + // already contains transpiled files, so we can just copy them, without + // also transpiling them again. + needToTranspile: files.inCheckout(), }); // Script that fetches the dev_bundle and runs the server bootstrap diff --git a/tools/isobuild/isopack.js b/tools/isobuild/isopack.js index e137d8fc15..07d03a7ee3 100644 --- a/tools/isobuild/isopack.js +++ b/tools/isobuild/isopack.js @@ -1440,65 +1440,10 @@ _.extend(Isopack.prototype, { var toolPath = 'mt-' + archinfo.host(); builder = builder.enter(toolPath); - const babel = require("meteor-babel"); - const commonBabelOptions = babel.getDefaultOptions({ - nodeMajorVersion: parseInt(process.versions.node), - typescript: true - }); - commonBabelOptions.sourceMaps = true; - - // Transpile the files we selected - pathsToTranspile.forEach((path) => { - const toolsDir = files.getCurrentToolsDir(); - const fullPath = files.convertToOSPath(files.pathJoin(toolsDir, path)); - let inputFileContents = files.readFile(fullPath, "utf-8"); - const babelCacheDirectory = - files.pathJoin(files.pathDirname(toolsDir), ".babel-cache"); - - // #RemoveInProd - // We don't actually want to load the babel auto-transpiler when we are - // in a Meteor installation where everything is already transpiled for us. - // Therefore, strip out that line in main.js - if (path === "tools/tool-env/install-babel.js" || - path === "tools/tool-env/source-map-retriever-stack.js") { - inputFileContents = inputFileContents.replace(/^.*#RemoveInProd.*$/mg, ""); - } - - var transpiled = babel.compile(inputFileContents, { - ...commonBabelOptions, - filename: path, - sourceFileName: "/" + path, - }, { - cacheDirectory: babelCacheDirectory, - }); - - var sourceMapUrlComment = "//# sourceMappingURL=" + files.pathBasename(path + ".map"); - - let outputPath = path; - if (path.endsWith(".ts")) { - // The published implementation of the meteor-tool package should - // contain only .js files, like any compiled TypeScript project. - // This design has the unfortunate consequence of forbidding - // explicit .ts file extensions in imported module identifier - // strings, but that's just how it goes with TypeScript. - const parts = path.split("."); - assert.strictEqual(parts.pop(), "ts"); - parts.push("js"); - outputPath = parts.join("."); - } - - builder.write(outputPath, { - data: Buffer.from(transpiled.code + "\n" + sourceMapUrlComment, 'utf8') - }); - - // The babelOptions.sourceMapTarget option was deprecated in Babel - // 7.0.0-beta.41: https://github.com/babel/babel/pull/7500 - const sourceMapTarget = outputPath + ".map"; - transpiled.map.file = sourceMapTarget; - - builder.write(sourceMapTarget, { - data: Buffer.from(JSON.stringify(transpiled.map), 'utf8') - }); + const sourceRootDir = files.getCurrentToolsDir(); + builder.copyTranspiledModules(pathsToTranspile, { + sourceRootDir, + needToTranspile: true, }); var gitSha = utils.runGitInCheckout('rev-parse', 'HEAD'); From c9ba0f3a22d0af8e33e9bba490daec699a60c7dd Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Fri, 26 Apr 2019 15:37:42 -0400 Subject: [PATCH 027/327] Install latest Reify runtime in programs/server/main.js. Also updated meteor-babel in the dev bundle to depend on reify@0.18.1, to be consistent with the version used by server code. --- scripts/dev-bundle-server-package.js | 3 +++ scripts/dev-bundle-tool-package.js | 6 ++++-- tools/isobuild/bundler.js | 2 ++ tools/static-assets/server/runtime.js | 20 ++++++++++++++++++++ tools/tool-env/install-runtime.js | 24 +++--------------------- 5 files changed, 32 insertions(+), 23 deletions(-) create mode 100644 tools/static-assets/server/runtime.js diff --git a/scripts/dev-bundle-server-package.js b/scripts/dev-bundle-server-package.js index d875b7e55e..ec6a2bbed3 100644 --- a/scripts/dev-bundle-server-package.js +++ b/scripts/dev-bundle-server-package.js @@ -8,9 +8,12 @@ var packageJson = { name: "meteor-dev-bundle", private: true, dependencies: { + // Keep the versions of these packages consistent with the versions + // found in dev-bundle-tool-package.js. fibers: "3.1.1", "meteor-promise": "0.8.7", promise: "8.0.2", + reify: "0.18.1", // Not yet upgrading Underscore from 1.5.2 to 1.7.0 (which should be done // in the package too) because we should consider using lodash instead // (and there are backwards-incompatible changes either way). diff --git a/scripts/dev-bundle-tool-package.js b/scripts/dev-bundle-tool-package.js index 42ed2f4bfd..3dda1a360c 100644 --- a/scripts/dev-bundle-tool-package.js +++ b/scripts/dev-bundle-tool-package.js @@ -14,9 +14,11 @@ var packageJson = { pacote: "https://github.com/meteor/pacote/tarball/c5043daa1b768594e01d76275e3854fc19f038f9", "node-gyp": "3.7.0", "node-pre-gyp": "0.10.3", - "meteor-babel": "7.4.4", + "meteor-babel": "7.4.5", + // Keep the versions of these packages consistent with the versions + // found in dev-bundle-server-package.js. "meteor-promise": "0.8.7", - reify: "0.17.3", + reify: "0.18.1", fibers: "3.1.1", // So that Babel can emit require("@babel/runtime/helpers/...") calls. "@babel/runtime": "7.4.3", diff --git a/tools/isobuild/bundler.js b/tools/isobuild/bundler.js index 8ef8b1fc35..46896fe4d8 100644 --- a/tools/isobuild/bundler.js +++ b/tools/isobuild/bundler.js @@ -211,6 +211,7 @@ exports._mainJsContents = [ "", "process.argv.splice(2, 0, 'program.json');", "process.chdir(require('path').join(__dirname, 'programs', 'server'));", + 'require("./programs/server/runtime.js");', "require('./programs/server/boot.js');", ].join("\n"); @@ -2709,6 +2710,7 @@ class ServerTarget extends JsImageTarget { "npm-require.js", "npm-rebuild.js", "npm-rebuild-args.js", + "runtime.js", ], { sourceRootDir: files.pathJoin( toolsDir, diff --git a/tools/static-assets/server/runtime.js b/tools/static-assets/server/runtime.js new file mode 100644 index 0000000000..3d521e57d0 --- /dev/null +++ b/tools/static-assets/server/runtime.js @@ -0,0 +1,20 @@ +const Module = module.constructor; +const Mp = Module.prototype; + +Mp.resolve = function (id) { + return Module._resolveFilename(id, this); +}; + +// Enable the module.{watch,export,...} runtime API needed by Reify. +require("reify/lib/runtime").enable(Mp); + +const moduleLoad = Mp.load; +Mp.load = function (filename) { + const result = moduleLoad.apply(this, arguments); + if (typeof this.runSetters === "function") { + // Make sure we call module.runSetters (or module.runModuleSetters, a + // legacy synonym) whenever a module finishes loading. + this.runSetters(); + } + return result; +}; diff --git a/tools/tool-env/install-runtime.js b/tools/tool-env/install-runtime.js index 50a8c523bb..4b286e0509 100644 --- a/tools/tool-env/install-runtime.js +++ b/tools/tool-env/install-runtime.js @@ -9,27 +9,9 @@ require("./wrap-fibers.js"); // they are available. require("./install-promise.js"); -const Module = module.constructor; -const Mp = Module.prototype; - -Mp.resolve = function (id) { - return Module._resolveFilename(id, this); -}; - -// Enable the module.{watch,export,...} runtime API needed by Reify. -require("reify/lib/runtime").enable(Mp); - -const moduleLoad = Mp.load; -Mp.load = function (filename) { - const result = moduleLoad.apply(this, arguments); - const runSetters = this.runSetters || this.runModuleSetters; - if (typeof runSetters === "function") { - // Make sure we call module.runSetters (or module.runModuleSetters, a - // legacy synonym) whenever a module finishes loading. - runSetters.call(this); - } - return result; -}; +// Enable the Reify module runtime: Module.prototype.{link,export,...}. +// The same runtime.js code is used by server code (see boot.js). +require("../static-assets/server/runtime.js"); // Installs source map support with a hook to add functions to look for // source maps in custom places. From 114a348bb31f3d7cc64381f3278458c68f1f7f23 Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Fri, 26 Apr 2019 15:49:18 -0400 Subject: [PATCH 028/327] Convert programs/server/debug.js to TypeScript. Another tiny module (like tools/isobuild/css-modules.ts) that proves we can use TypeScript in programs/server/* code. --- tools/isobuild/bundler.js | 2 +- tools/static-assets/server/boot.js | 2 +- tools/static-assets/server/{debug.js => debug.ts} | 5 ++--- 3 files changed, 4 insertions(+), 5 deletions(-) rename tools/static-assets/server/{debug.js => debug.ts} (89%) diff --git a/tools/isobuild/bundler.js b/tools/isobuild/bundler.js index 46896fe4d8..53f0ff2748 100644 --- a/tools/isobuild/bundler.js +++ b/tools/isobuild/bundler.js @@ -2704,7 +2704,7 @@ class ServerTarget extends JsImageTarget { builder.copyTranspiledModules([ "boot.js", "boot-utils.js", - "debug.js", + "debug.ts", "server-json.js", "mini-files.js", "npm-require.js", diff --git a/tools/static-assets/server/boot.js b/tools/static-assets/server/boot.js index 487ef07c5e..80592c7c2f 100644 --- a/tools/static-assets/server/boot.js +++ b/tools/static-assets/server/boot.js @@ -55,7 +55,7 @@ const meteorDebugFuture = function maybeWaitForDebuggerToAttach() { if (meteorDebugFuture) { - const { pause } = require("./debug.js"); + const { pause } = require("./debug"); const pauseThresholdMs = 50; const pollIntervalMs = 500; const waitStartTimeMs = +new Date; diff --git a/tools/static-assets/server/debug.js b/tools/static-assets/server/debug.ts similarity index 89% rename from tools/static-assets/server/debug.js rename to tools/static-assets/server/debug.ts index 4532ae43e6..eab1bd39ff 100644 --- a/tools/static-assets/server/debug.js +++ b/tools/static-assets/server/debug.ts @@ -1,8 +1,7 @@ - -exports.pause = function () { +export function pause() { // The debugger pauses here when you run `meteor debug`, so that you can // set breakpoints or add `debugger` statements to your server code // before the code begins executing. Once you have set any breakpoints // you wish to set, click the |▶ button to continue. debugger; -}; \ No newline at end of file +} From 0482e6611731833175ee276cea6e358e41322b13 Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Fri, 26 Apr 2019 16:38:24 -0400 Subject: [PATCH 029/327] Bump $BUNDLE_VERSION to 8.16.0.1 before rebuilding dev bundle. --- meteor | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meteor b/meteor index 89225f365f..8826068a02 100755 --- a/meteor +++ b/meteor @@ -1,6 +1,6 @@ #!/usr/bin/env bash -BUNDLE_VERSION=8.16.0.0 +BUNDLE_VERSION=8.16.0.1 # OS Check. Put here because here is where we download the precompiled # bundles that are arch specific. From f4b92a004e07edac9b37f25d6e21d0fbd8029625 Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Fri, 26 Apr 2019 19:49:03 -0400 Subject: [PATCH 030/327] Bump package versions for 1.8.2-beta.0 release. --- packages/context/package.js | 2 +- packages/meteor-tool/package.js | 2 +- scripts/admin/meteor-release-experimental.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/context/package.js b/packages/context/package.js index 5c0e5c5e09..9026cc7473 100644 --- a/packages/context/package.js +++ b/packages/context/package.js @@ -1,6 +1,6 @@ Package.describe({ name: "context", - version: "0.4.0-alpha182.1", + version: "0.4.0-beta182.0", summary: "Manage contextual information without passing objects around", documentation: "README.md" }); diff --git a/packages/meteor-tool/package.js b/packages/meteor-tool/package.js index 72e65b3365..c42d69995f 100644 --- a/packages/meteor-tool/package.js +++ b/packages/meteor-tool/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "The Meteor command-line tool", - version: '1.8.2-alpha.1' + version: '1.8.2-beta.0' }); Package.includeTool(); diff --git a/scripts/admin/meteor-release-experimental.json b/scripts/admin/meteor-release-experimental.json index 0a44548a03..e6ec16757b 100644 --- a/scripts/admin/meteor-release-experimental.json +++ b/scripts/admin/meteor-release-experimental.json @@ -1,6 +1,6 @@ { "track": "METEOR", - "version": "1.8.2-alpha.1", + "version": "1.8.2-beta.0", "recommended": false, "official": false, "description": "Meteor" From b0a8e1bfaf6bc2b5d85b691d30dcae3b7e3abbf3 Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Thu, 2 May 2019 13:37:03 -0400 Subject: [PATCH 031/327] Increase arbitrary SIGKILL timeout to make self-test more robust. --- tools/tests/run.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/tests/run.js b/tools/tests/run.js index e5e9270a12..e69d280680 100644 --- a/tools/tests/run.js +++ b/tools/tests/run.js @@ -381,7 +381,7 @@ selftest.define("run and SIGKILL parent process", ["yet-unsolved-windows-failure // This sleep should be a little more time than the interval at which // the child checks if the parent is still alive, in // packages/webapp/webapp_server.js. - utils.sleepMs(3500); + utils.sleepMs(10000); // Send the child process a signal of 0. If there is no error, it // means that the process is still running, which is not what we From e680804ffcfcd2d7854ba5d44e6a6007decbc115 Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Thu, 2 May 2019 13:48:02 -0400 Subject: [PATCH 032/327] Wrap fs.copyFile[Sync] rather than reimplementing it. (#10542) Should help prevent noYieldsAllowed errors due to the Promise#await call in the removed copyFileHelper function, which is what caused 1.8.2-beta.0 to fail to publish on Linux (reported in #10540). --- tools/fs/files.js | 88 ++++++++++++++++++----------------------------- 1 file changed, 34 insertions(+), 54 deletions(-) diff --git a/tools/fs/files.js b/tools/fs/files.js index 02a4c7353e..3f57c4acb8 100644 --- a/tools/fs/files.js +++ b/tools/fs/files.js @@ -529,23 +529,22 @@ files.cp_r = function(from, to, options = {}) { if (stat.isSymbolicLink()) { symlinkWithOverwrite(files.readlink(from), to); + } else if (options.transformContents) { + files.writeFile(to, options.transformContents( + files.readFile(from), + files.pathBasename(from) + ), { + // Create the file as readable and writable by everyone, and + // executable by everyone if the original file is executable by + // owner. (This mode will be modified by umask.) We don't copy the + // mode *directly* because this function is used by 'meteor create' + // which is copying from the read-only tools tree into a writable app. + mode: (stat.mode & 0o100) ? 0o777 : 0o666, + }); + } else { - // Create the file as readable and writable by everyone, and - // executable by everyone if the original file is executable by - // owner. (This mode will be modified by umask.) We don't copy the - // mode *directly* because this function is used by 'meteor create' - // which is copying from the read-only tools tree into a writable app. - const mode = (stat.mode & 0o100) ? 0o777 : 0o666; - - if (options.transformContents) { - files.writeFile(to, options.transformContents( - files.readFile(from), - files.pathBasename(from) - ), { mode }); - - } else { - copyFileHelper(from, to, mode); - } + // Note: files.copyFile applies the same stat.mode logic as above. + files.copyFile(from, to); } }; @@ -646,44 +645,6 @@ files.findPathsWithRegex = function (dir, regex, options) { }); }; -// Copies a file, which is expected to exist. Parent directories of "to" do not -// have to exist. Treats symbolic links transparently (copies the contents, not -// the link itself, and it's an error if the link doesn't point to a file). -files.copyFile = function (from, to, origMode=null) { - files.mkdir_p(files.pathDirname(files.pathResolve(to)), 0o755); - - if (origMode === null) { - var stats = files.stat(from); - if (!stats.isFile()) { - throw Error("cannot copy non-files"); - } - origMode = stats.mode; - } - - // Create the file as readable and writable by everyone, and executable by - // everyone if the original file is executably by owner. (This mode will be - // modified by umask.) We don't copy the mode *directly* because this function - // is used by 'meteor create' which is copying from the read-only tools tree - // into a writable app. - var mode = (origMode & 0o100) ? 0o777 : 0o666; - - copyFileHelper(from, to, mode); -}; -files.copyFile = Profile("files.copyFile", files.copyFile); - -var copyFileHelper = function (from, to, mode) { - var readStream = files.createReadStream(from); - var writeStream = files.createWriteStream(to, { mode: mode }); - new Promise(function (resolve, reject) { - readStream.on('error', reject); - writeStream.on('error', reject); - writeStream.on('open', function () { - readStream.pipe(writeStream); - }); - writeStream.once('finish', resolve); - }).await(); -}; - // Make a temporary directory. Returns the path to the newly created // directory. Only the current user is allowed to read or write the // files in the directory (or add files to it). The directory will @@ -1733,6 +1694,25 @@ wrapFsFunc("lstat", [0]); wrapDestructiveFsFunc("rename", [0, 1]); +wrapDestructiveFsFunc("copyFile", [0, 1]); +const wrappedCopyFile = files.copyFile; +// Copies a file, which is expected to exist. Parent directories of "to" do not +// have to exist. Treats symbolic links transparently (copies the contents, not +// the link itself, and it's an error if the link doesn't point to a file). +files.copyFile = function copyFile(from, to, flags = 0) { + files.mkdir_p(files.pathDirname(files.pathResolve(to)), 0o755); + wrappedCopyFile(from, to, flags); + const stat = statOrNull(from); + if (stat && stat.isFile()) { + // Create the file as readable and writable by everyone, and executable by + // everyone if the original file is executably by owner. (This mode will be + // modified by umask.) We don't copy the mode *directly* because this function + // is used by 'meteor create' which is copying from the read-only tools tree + // into a writable app. + files.chmod(to, (stat.mode & 0o100) ? 0o777 : 0o666); + } +}; + // After the outermost files.withCache call returns, the withCacheCache is // reset to null so that it does not survive server restarts. let withCacheCache = null; From 4b0e4f8b0dd829a17e46d68f8a1e69ad588d2fac Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Thu, 2 May 2019 15:23:14 -0400 Subject: [PATCH 033/327] Add package.json to tools/tests/apps/app-prints-pid. The SIGKILL self-test in tools/tests/run.js has been failing recently because @babel/runtime can't be found when the app-prints-pid app starts up, which prevents the app from polling the parent process correctly. --- tools/tests/apps/app-prints-pid/package.json | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 tools/tests/apps/app-prints-pid/package.json diff --git a/tools/tests/apps/app-prints-pid/package.json b/tools/tests/apps/app-prints-pid/package.json new file mode 100644 index 0000000000..f20e3e823c --- /dev/null +++ b/tools/tests/apps/app-prints-pid/package.json @@ -0,0 +1,14 @@ +{ + "name": "app-prints-pid", + "private": true, + "dependencies": { + "@babel/runtime": "^7.3.4", + "meteor-node-stubs": "^0.4.1" + }, + "meteor": { + "mainModule": { + "client": false, + "server": "print.js" + } + } +} From 35ca6980dc43b60c4ecd6a48cd4035223bcbfac8 Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Thu, 2 May 2019 17:07:58 -0400 Subject: [PATCH 034/327] Use is-reachable to detect child process health in self-test. On Linux, child processes that have exited may remain as "zombie" processes, which prevents process.kill(childPid, 0) from throwing, so we need a different trick for detecting whether the child process is still alive. --- scripts/dev-bundle-tool-package.js | 1 + tools/tests/run.js | 14 ++++++-------- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/scripts/dev-bundle-tool-package.js b/scripts/dev-bundle-tool-package.js index 3dda1a360c..6129b9f1b6 100644 --- a/scripts/dev-bundle-tool-package.js +++ b/scripts/dev-bundle-tool-package.js @@ -41,6 +41,7 @@ var packageJson = { sqlite3: "3.1.8", netroute: "1.0.2", "http-proxy": "1.16.2", + "is-reachable": "3.1.0", "wordwrap": "0.0.2", "moment": "2.20.1", "rimraf": "2.6.2", diff --git a/tools/tests/run.js b/tools/tests/run.js index e69d280680..f5a1288738 100644 --- a/tools/tests/run.js +++ b/tools/tests/run.js @@ -7,6 +7,7 @@ var _ = require('underscore'); var files = require('../fs/files.js'); var catalog = require('../packaging/catalog/catalog.js'); var os = require('os'); +var isReachable = require("is-reachable"); var DEFAULT_RELEASE_TRACK = catalog.DEFAULT_TRACK; @@ -377,6 +378,10 @@ selftest.define("run and SIGKILL parent process", ["yet-unsolved-windows-failure } childPid = match[1]; + if (!isReachable("localhost:3000").await()) { + selftest.fail("Child process " + childPid + " already dead?"); + } + process.kill(run.proc.pid, "SIGKILL"); // This sleep should be a little more time than the interval at which // the child checks if the parent is still alive, in @@ -386,14 +391,7 @@ selftest.define("run and SIGKILL parent process", ["yet-unsolved-windows-failure // Send the child process a signal of 0. If there is no error, it // means that the process is still running, which is not what we // expect. - var caughtError; - try { - process.kill(childPid, 0); - } catch (err) { - caughtError = err; - } - - if (! caughtError) { + if (isReachable("localhost:3000").await()) { selftest.fail("Child process " + childPid + " is still running"); } From c4382c7d5925e758ab7f2549815a3f4ac5f64624 Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Thu, 2 May 2019 17:11:18 -0400 Subject: [PATCH 035/327] Bump $BUNDLE_VERSION to 8.16.0.2 before rebuilding dev bundle. --- meteor | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meteor b/meteor index 8826068a02..f68c762c03 100755 --- a/meteor +++ b/meteor @@ -1,6 +1,6 @@ #!/usr/bin/env bash -BUNDLE_VERSION=8.16.0.1 +BUNDLE_VERSION=8.16.0.2 # OS Check. Put here because here is where we download the precompiled # bundles that are arch specific. From f166f226d84bef99334e00279d5a217d346d815d Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Thu, 2 May 2019 18:30:13 -0400 Subject: [PATCH 036/327] Support the "module" field of package.json for client code. (#10541) Supporting "module" in package.json for server code is not advisable because Node.js will be adopting the "type":"module" convention instead, and in the meantime we need to maintain consistency with Node's module resolution rules, which only currently pay attention to "main": https://medium.com/@nodejs/announcing-a-new-experimental-modules-1be8d2d6c2ff --- History.md | 7 +++++++ packages/modules-runtime/client.js | 3 ++- packages/modules-runtime/package.js | 2 +- tools/fs/optimistic.js | 15 +++++++++++++++ tools/isobuild/linker.js | 1 + tools/isobuild/package-source.js | 17 +++++++++++++++-- tools/isobuild/resolver.js | 12 +++++++----- tools/tests/apps/modules/package-lock.json | 13 +++++++++++++ tools/tests/apps/modules/package.json | 1 + tools/tests/apps/modules/tests.js | 14 ++++++++++++++ 10 files changed, 76 insertions(+), 9 deletions(-) diff --git a/History.md b/History.md index 363e842453..64922ec4c6 100644 --- a/History.md +++ b/History.md @@ -13,6 +13,13 @@ N/A * The `meteor-babel` npm package has been updated to version 7.4.3. +* When bundling client code, the Meteor module system now prefers the + `"module"` field in `package.json`, if defined. Additionally, npm + packages with a `"module"` entry point will now be compiled + automatically by `meteor-babel`, like application code, without any + special symlinking tricks. + [PR #10541](https://github.com/meteor/meteor/pull/10541) + ## v1.8.1, 2019-04-03 ### Breaking changes diff --git a/packages/modules-runtime/client.js b/packages/modules-runtime/client.js index e5b77fff50..c26a129da0 100644 --- a/packages/modules-runtime/client.js +++ b/packages/modules-runtime/client.js @@ -1,7 +1,8 @@ meteorInstall = makeInstaller({ // On the client, make package resolution prefer the "browser" field of - // package.json files to the "main" field. + // 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/')) { diff --git a/packages/modules-runtime/package.js b/packages/modules-runtime/package.js index 519249240a..4de28a5efe 100644 --- a/packages/modules-runtime/package.js +++ b/packages/modules-runtime/package.js @@ -1,6 +1,6 @@ Package.describe({ name: "modules-runtime", - version: "0.10.3", + version: "0.11.0", summary: "CommonJS module system", git: "https://github.com/benjamn/install", documentation: "README.md" diff --git a/tools/fs/optimistic.js b/tools/fs/optimistic.js index 4bddc674be..578479b4f0 100644 --- a/tools/fs/optimistic.js +++ b/tools/fs/optimistic.js @@ -275,6 +275,21 @@ export const optimisticReadMeteorIgnore = wrap(dir => { return null; }); +export const optimisticLookupPackageJson = wrap((absRootDir, relDir) => { + const absPkgJsonPath = pathJoin(absRootDir, relDir, "package.json"); + const pkgJson = optimisticReadJsonOrNull(absPkgJsonPath); + if (pkgJson) { + return pkgJson; + } + + const relParentDir = pathDirname(relDir); + if (relParentDir === relDir) { + return null; + } + + return optimisticLookupPackageJson(absRootDir, relParentDir); +}); + const optimisticIsSymbolicLink = wrap(path => { try { return lstat(path).isSymbolicLink(); diff --git a/tools/isobuild/linker.js b/tools/isobuild/linker.js index d02ba1a754..d09ec57aa0 100644 --- a/tools/isobuild/linker.js +++ b/tools/isobuild/linker.js @@ -299,6 +299,7 @@ _.extend(Module.prototype, { } tryMain("browser"); + tryMain("module"); tryMain("main"); stubArray.push(stub); diff --git a/tools/isobuild/package-source.js b/tools/isobuild/package-source.js index 260d6fa936..0cf365e7ed 100644 --- a/tools/isobuild/package-source.js +++ b/tools/isobuild/package-source.js @@ -34,6 +34,7 @@ import { optimisticHashOrNull, optimisticStatOrNull, optimisticReadMeteorIgnore, + optimisticLookupPackageJson, } from "../fs/optimistic.js"; // XXX: This is a medium-term hack, to avoid having the user set a package name @@ -1020,7 +1021,13 @@ _.extend(PackageSource.prototype, { if (dir === "node_modules") { fileOptions.lazy = true; - fileOptions.transpile = false; + + // We used to disable transpilation for modules within node_modules, + // mostly for build performance reasons, but now that we have a lazy + // compilation system, we no longer need to worry about build times + // for unused modules, which unlocks opportunities such as compiling + // ECMAScript import/export syntax in npm packages. + // fileOptions.transpile = false; // Return immediately so that we don't apply special meanings to // client or server directories inside node_modules directories. @@ -1089,6 +1096,7 @@ _.extend(PackageSource.prototype, { }) { const self = this; const arch = sourceArch.arch; + const isWeb = archinfo.matches(arch, "web"); const sourceReadOptions = sourceProcessorSet.appReadDirectoryOptions(arch); @@ -1262,7 +1270,12 @@ _.extend(PackageSource.prototype, { } } - const readOptions = inNodeModules + const pkgJson = optimisticLookupPackageJson(self.sourceRoot, dir); + const hasModuleEntryPoint = pkgJson && ( + isWeb ? typeof pkgJson.module === "string" : pkgJson.type === "module" + ); + + const readOptions = inNodeModules && !hasModuleEntryPoint ? nodeModulesReadOptions : sourceReadOptions; diff --git a/tools/isobuild/resolver.js b/tools/isobuild/resolver.js index bcfb717fa2..a31d0d3d85 100644 --- a/tools/isobuild/resolver.js +++ b/tools/isobuild/resolver.js @@ -83,6 +83,12 @@ export default class Resolver { this._cacheMethod("_findPkgJsonSubsetForPath"); this._cacheMethod("_getPkgJsonSubsetForDir"); + + if (archMatches(this.targetArch, "web")) { + this.mainFields = ["browser", "module", "main"]; + } else { + this.mainFields = ["main"]; + } } _cacheMethod(name) { @@ -366,11 +372,7 @@ export default class Resolver { } } - if (archMatches(this.targetArch, "web")) { - tryMain("browser"); - } - - tryMain("main"); + this.mainFields.forEach(tryMain); return { path: pkgJsonPath, diff --git a/tools/tests/apps/modules/package-lock.json b/tools/tests/apps/modules/package-lock.json index 38c8483f7b..3da6dfd40e 100644 --- a/tools/tests/apps/modules/package-lock.json +++ b/tools/tests/apps/modules/package-lock.json @@ -186,6 +186,14 @@ "to-fast-properties": "^2.0.0" } }, + "@wry/context": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/@wry/context/-/context-0.4.0.tgz", + "integrity": "sha512-rVjwzFjVYXJ8pWJ8ZRCHv6meOebQvfTlvnUYUNX93Ce0KNeMTqCkf0GiOJc6BNVB96s7qfvwoLN3nUgDnSFOOg==", + "requires": { + "tslib": "^1.9.3" + } + }, "acorn": { "version": "file:imports/links/acorn" }, @@ -1499,6 +1507,11 @@ "resolved": "https://registry.npmjs.org/trim-right/-/trim-right-1.0.1.tgz", "integrity": "sha1-yy4SAwZ+DI3h9hQJS5/kVwTqYAM=" }, + "tslib": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.9.3.tgz", + "integrity": "sha512-4krF8scpejhaOgqzBEcGM7yDIEfi0/8+8zDRZhNZZ2kjmHJ4hv3zCbQWxoJGz1iw5U0Jl0nma13xzHXcncMavQ==" + }, "typedarray": { "version": "0.0.6", "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", diff --git a/tools/tests/apps/modules/package.json b/tools/tests/apps/modules/package.json index 0fed419e6e..c7a2ff1ec6 100644 --- a/tools/tests/apps/modules/package.json +++ b/tools/tests/apps/modules/package.json @@ -8,6 +8,7 @@ "@babel/plugin-proposal-do-expressions": "^7.0.0-beta.56", "@babel/plugin-proposal-optional-chaining": "^7.0.0-beta.56", "@babel/runtime": "^7.1.2", + "@wry/context": "^0.4.0", "acorn": "file:imports/links/acorn", "aws-sdk": "^2.2.41", "cli-color": "^0.2.3", diff --git a/tools/tests/apps/modules/tests.js b/tools/tests/apps/modules/tests.js index 891091a546..99c3e03520 100644 --- a/tools/tests/apps/modules/tests.js +++ b/tools/tests/apps/modules/tests.js @@ -344,6 +344,20 @@ describe("local node_modules", () => { // module layout, so we shouldn't let this change without notice. assert.strictEqual(pkg.version, "0.2.3"); }); + + it('should prefer "module" field of package.json on client', () => { + assert.strictEqual( + require.resolve("@wry/context"), + "/node_modules/@wry/context/lib/" + ( + Meteor.isClient ? "context.esm.js" : "context.js" + ), + ); + + assert.strictEqual( + typeof require("@wry/context").Slot, + "function", + ); + }); }); describe("Meteor packages", () => { From 3fbf0619d5f50377ccf0f0ebc59b9e0c87d1791e Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Thu, 2 May 2019 18:56:21 -0400 Subject: [PATCH 037/327] Bump package versions for 1.8.2-beta.1 release. --- packages/context/package.js | 2 +- packages/meteor-tool/package.js | 2 +- packages/modules-runtime/package.js | 2 +- scripts/admin/meteor-release-experimental.json | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/context/package.js b/packages/context/package.js index 9026cc7473..7384263afb 100644 --- a/packages/context/package.js +++ b/packages/context/package.js @@ -1,6 +1,6 @@ Package.describe({ name: "context", - version: "0.4.0-beta182.0", + version: "0.4.0-beta182.1", summary: "Manage contextual information without passing objects around", documentation: "README.md" }); diff --git a/packages/meteor-tool/package.js b/packages/meteor-tool/package.js index c42d69995f..dc1c94fb44 100644 --- a/packages/meteor-tool/package.js +++ b/packages/meteor-tool/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "The Meteor command-line tool", - version: '1.8.2-beta.0' + version: '1.8.2-beta.1' }); Package.includeTool(); diff --git a/packages/modules-runtime/package.js b/packages/modules-runtime/package.js index 4de28a5efe..37eb576cc0 100644 --- a/packages/modules-runtime/package.js +++ b/packages/modules-runtime/package.js @@ -1,6 +1,6 @@ Package.describe({ name: "modules-runtime", - version: "0.11.0", + version: "0.11.0-beta182.1", summary: "CommonJS module system", git: "https://github.com/benjamn/install", documentation: "README.md" diff --git a/scripts/admin/meteor-release-experimental.json b/scripts/admin/meteor-release-experimental.json index e6ec16757b..f701e013b9 100644 --- a/scripts/admin/meteor-release-experimental.json +++ b/scripts/admin/meteor-release-experimental.json @@ -1,6 +1,6 @@ { "track": "METEOR", - "version": "1.8.2-beta.0", + "version": "1.8.2-beta.1", "recommended": false, "official": false, "description": "Meteor" From eb5c0b5eedd7daae1bbdaf0aa24cf5954d2b1219 Mon Sep 17 00:00:00 2001 From: zodern Date: Thu, 2 May 2019 18:35:44 -0500 Subject: [PATCH 038/327] Fix checking for a rerender timeout (#10523) --- tools/console/console.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/console/console.js b/tools/console/console.js index e16a891fbb..781f902af7 100644 --- a/tools/console/console.js +++ b/tools/console/console.js @@ -336,7 +336,7 @@ class ProgressDisplayFull { this._progressBarRenderer.start = startTime; } - if (!this._renderTimeout && this._lastWrittenTime) { + if (!this._rerenderTimeout && this._lastWrittenTime) { this._rerenderTimeout = setTimeout(() => { this._rerenderTimeout = null; this._render() From 5d0a1200c7321406ac53ad0bc7370c4b35041d81 Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Fri, 3 May 2019 16:33:32 -0400 Subject: [PATCH 039/327] Allow .npm/package/node_modules to be compiled in Meteor packages. When I implemented support for the "module" entry point in package.json files for client code in #10541, I modified PackageSource#_findSources to include files found in node_modules that need to be compiled, but my implementation considered only "local" node_modules directories, like the one in the application root directory, while neglecting the private .npm/package/node_modules directories that many Meteor packages have. This commit includes .npm/**/node_modules when _findSources is scanning a Meteor package, which should solve issues like #10544, where a Meteor package imports an npm package that was installed with Npm.depends, and that npm package has a "module" field in its package.json file, pointing to an ESM entry point module, but the ESM syntax was not appropriately compiled, leading to parse errors like "Unexpected token export". Before lazy compilation was introduced in Meteor 1.7 (#9983), including the node_modules directories of Meteor packages would likely have been a big problem for build performance, since there would be that many more modules to compile. It's still worth making sure this change doesn't regress build performance for other reasons, but I'm reasonably confident lazy compilation will save us here, unless there are just too many npm packages installed via Npm.depends that export ESM modules. --- tools/isobuild/import-scanner.js | 21 ++++++++ tools/isobuild/package-source.js | 51 ++++++++++++++----- tools/isobuild/unibuild.js | 32 +++++++++++- .../.npm/package/npm-shrinkwrap.json | 5 ++ .../packages/modules-test-package/common.js | 10 ++++ .../packages/modules-test-package/package.js | 1 + .../plugin/compile-arson/npm-shrinkwrap.json | 40 +++++++++------ .../packages/modules-test-plugin/package.js | 1 + .../packages/modules-test-plugin/plugin.js | 28 ++++++---- 9 files changed, 150 insertions(+), 39 deletions(-) diff --git a/tools/isobuild/import-scanner.js b/tools/isobuild/import-scanner.js index 6e4b033449..b90a175fe4 100644 --- a/tools/isobuild/import-scanner.js +++ b/tools/isobuild/import-scanner.js @@ -375,6 +375,27 @@ export default class ImportScanner { _checkSourceAndTargetPaths(file) { file.sourcePath = this._getSourcePath(file); + // If we're scanning a Meteor package (as indicated by this.name), and we + // come across a file whose sourcePath starts with .npm/, it's a file that + // was installed by Npm.depends, so we should reroot it relative to one of + // this.nodeModulesPaths, rather than preserving the .npm/ path. + if (this.name && file.sourcePath.startsWith(".npm/")) { + const parts = file.sourcePath.split("/"); + const nmi = parts.indexOf("node_modules"); + if (nmi >= 0) { + const suffix = parts.slice(nmi + 1).join("/"); + this.nodeModulesPaths.some(nodeModulesPath => { + const newAbsPath = pathJoin(nodeModulesPath, suffix); + if (optimisticStatOrNull(newAbsPath)) { + file.sourcePath = file.targetPath = + pathRelative(this.sourceRoot, newAbsPath); + return true; + } + return false; + }); + } + } + if (! isString(file.targetPath)) { return; } diff --git a/tools/isobuild/package-source.js b/tools/isobuild/package-source.js index 0cf365e7ed..9625d876a6 100644 --- a/tools/isobuild/package-source.js +++ b/tools/isobuild/package-source.js @@ -426,6 +426,9 @@ _.extend(PackageSource.prototype, { sourceRoot: self.sourceRoot, uses: _.map(options.use, splitConstraint), getFiles() { + // TODO We might want to call _findSources here, if we want plugins to + // be able to import compiled files that were not explicitly included in + // the sources array passed to Package.registerBuildPlugin. return { sources: sources } @@ -1298,10 +1301,6 @@ _.extend(PackageSource.prototype, { subdirectories.forEach(subdir => { if (/(^|\/)node_modules\/$/.test(subdir)) { - if (! inNodeModules) { - sourceArch.localNodeModulesDirs[subdir] = true; - } - // Defer handling node_modules until after we handle all other // subdirectories, so that we know whether we need to descend // further. If sources is still empty after we handle everything @@ -1309,21 +1308,29 @@ _.extend(PackageSource.prototype, { // imported by anthing outside of it, so we can ignore it. nodeModulesDir = subdir; + // A "local" node_modules directory is one that's managed by the + // application developer using npm, rather than by Meteor using + // Npm.depends, which is available only in Meteor packages, and + // installs its dependencies into .npm/*/node_modules. Local + // node_modules directories may contain other nested node_modules + // directories, but we care about recording only the top-level + // node_modules directories here (hence !inNodeModules). + if (!inNodeModules && (isApp || !subdir.startsWith(".npm/"))) { + sourceArch.localNodeModulesDirs[subdir] = true; + } + } else { sources.push(...find(subdir, depth + 1, inNodeModules)); } }); - if (isApp && - nodeModulesDir && - (! inNodeModules || sources.length > 0)) { + if (nodeModulesDir && (!inNodeModules || sources.length > 0)) { // If we found a node_modules subdirectory above, and either we // are not already inside another node_modules directory or we // found source files elsewhere in this directory or its other - // subdirectories, and we're building an app (as opposed to a - // Meteor package), continue searching this node_modules - // directory, so that any non-.js(on) files it contains can be - // imported by the app (#6037). + // subdirectories, continue searching this node_modules directory, + // so that any non-.js(on) files it contains can be imported by + // the app (#6037). sources.push(...find(nodeModulesDir, depth + 1, true)); } @@ -1336,7 +1343,27 @@ _.extend(PackageSource.prototype, { return sources; } - return files.withCache(() => find("", 0, false)); + const sources = find("", 0, false); + + if (!isApp && typeof this.npmCacheDirectory === "string") { + // If this PackageSource has an npmCacheDirectory, scan it as well for + // sources that might need to be compiled. + const stat = optimisticStatOrNull(this.npmCacheDirectory); + if (stat && stat.isDirectory()) { + const relNpmDir = files.pathRelative( + this.sourceRoot, + this.npmCacheDirectory, + ); + if (! relNpmDir.startsWith("..")) { + const relParts = relNpmDir.split("/"); + const depth = relParts.length; + const inNodeModules = relParts.indexOf("node_modules") >= 0; + sources.push(...find(relNpmDir, depth, inNodeModules)); + } + } + } + + return sources; }), _findAssets({ diff --git a/tools/isobuild/unibuild.js b/tools/isobuild/unibuild.js index d3bc27a1a4..26c09e03e4 100644 --- a/tools/isobuild/unibuild.js +++ b/tools/isobuild/unibuild.js @@ -251,6 +251,7 @@ export class Unibuild { // Figure out where the npm dependencies go. let node_modules = {}; + let nonLocalNodeModulesBundlePath; _.each(unibuild.nodeModulesDirectories, nmd => { const bundlePath = _.has(npmDirsToCopy, nmd.sourcePath) // We already have this npm directory from another unibuild. @@ -258,6 +259,9 @@ export class Unibuild { : npmDirsToCopy[nmd.sourcePath] = nmd.getPreferredBundlePath("isopack"); node_modules[bundlePath] = nmd.toJSON(); + if (!nmd.local) { + nonLocalNodeModulesBundlePath = nonLocalNodeModulesBundlePath || bundlePath; + } }); const preferredPaths = Object.keys(node_modules); @@ -315,13 +319,37 @@ export class Unibuild { }); // Output other resources each to their own file - _.each(unibuild.resources, function (resource) { + _.each(unibuild.resources, resource => { if (_.contains(["head", "body"], resource.type)) { // already did this one return; } - const generatedFilename = + let generatedFilename; + + // Although non-local npm dependencies installed by Npm.depends start + // with relative paths like .npm/**/node_modules/*, the files are stored + // in the bundle under npm/node_modules, so we need to reroot relative + // .npm/ paths against the npm/node_modules path. + if ( + unibuild.pkg.name && + typeof nonLocalNodeModulesBundlePath === "string" && + typeof resource.path === "string" && + resource.path.startsWith(".npm/") + ) { + const parts = resource.path.split("/"); + const nmi = parts.indexOf("node_modules"); + if (nmi >= 0) { + // Skip builder.writeToGeneratedFilename below since the file already + // (should) exist at this new generatedFilename path. + generatedFilename = files.pathJoin( + nonLocalNodeModulesBundlePath, + parts.slice(nmi + 1).join("/"), + ); + } + } + + generatedFilename = generatedFilename || builder.writeToGeneratedFilename( files.pathJoin( unibuildDir, diff --git a/tools/tests/apps/modules/packages/modules-test-package/.npm/package/npm-shrinkwrap.json b/tools/tests/apps/modules/packages/modules-test-package/.npm/package/npm-shrinkwrap.json index 16f2dfd3ac..9d6b263e5e 100644 --- a/tools/tests/apps/modules/packages/modules-test-package/.npm/package/npm-shrinkwrap.json +++ b/tools/tests/apps/modules/packages/modules-test-package/.npm/package/npm-shrinkwrap.json @@ -1,6 +1,11 @@ { "lockfileVersion": 1, "dependencies": { + "@wry/context": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/@wry/context/-/context-0.4.0.tgz", + "integrity": "sha512-rVjwzFjVYXJ8pWJ8ZRCHv6meOebQvfTlvnUYUNX93Ce0KNeMTqCkf0GiOJc6BNVB96s7qfvwoLN3nUgDnSFOOg==" + }, "assert": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/assert/-/assert-1.3.0.tgz", diff --git a/tools/tests/apps/modules/packages/modules-test-package/common.js b/tools/tests/apps/modules/packages/modules-test-package/common.js index b9037f6771..b271372428 100644 --- a/tools/tests/apps/modules/packages/modules-test-package/common.js +++ b/tools/tests/apps/modules/packages/modules-test-package/common.js @@ -5,6 +5,16 @@ export const ModulesTestPackage = "loaded"; import { parse } from "acorn"; assert.strictEqual(typeof parse, "function"); +// Test that an npm package with a "module" entry point in its package.json +// file can be imported. +import { Slot } from "@wry/context"; +assert.strictEqual(typeof Slot, "function"); +const idPrefix = "/node_modules/meteor/modules-test-package/node_modules/@wry/context/lib/"; +assert.strictEqual( + require.resolve("@wry/context"), + idPrefix + (Meteor.isClient ? "context.esm.js" : "context.js"), +); + export function checkWhere(where) { const { where: serverWhere } = require("./server/where.js"); const { where: clientWhere } = require("./client/where.js"); diff --git a/tools/tests/apps/modules/packages/modules-test-package/package.js b/tools/tests/apps/modules/packages/modules-test-package/package.js index 022510cd73..2e44d7459c 100644 --- a/tools/tests/apps/modules/packages/modules-test-package/package.js +++ b/tools/tests/apps/modules/packages/modules-test-package/package.js @@ -6,6 +6,7 @@ Package.describe({ }); Npm.depends({ + "@wry/context": "0.4.0", "os-browserify": "0.2.0", "assert": "1.3.0", "cheerio": "0.22.0" diff --git a/tools/tests/apps/modules/packages/modules-test-plugin/.npm/plugin/compile-arson/npm-shrinkwrap.json b/tools/tests/apps/modules/packages/modules-test-plugin/.npm/plugin/compile-arson/npm-shrinkwrap.json index c019a5183d..ec85e9fa6b 100644 --- a/tools/tests/apps/modules/packages/modules-test-plugin/.npm/plugin/compile-arson/npm-shrinkwrap.json +++ b/tools/tests/apps/modules/packages/modules-test-plugin/.npm/plugin/compile-arson/npm-shrinkwrap.json @@ -17,19 +17,19 @@ "integrity": "sha1-wM5mIMtfLB+xArIPZXQRVcq8REo=" }, "babel-runtime": { - "version": "6.23.0", - "resolved": "https://registry.npmjs.org/babel-runtime/-/babel-runtime-6.23.0.tgz", - "integrity": "sha1-CpSJ8UTecO+zzkMArM2zKeL8VDs=" + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-runtime/-/babel-runtime-6.26.0.tgz", + "integrity": "sha1-llxwWGaOgrVde/4E/yM3vItWR/4=" }, "babel-types": { - "version": "6.25.0", - "resolved": "https://registry.npmjs.org/babel-types/-/babel-types-6.25.0.tgz", - "integrity": "sha1-cK+ySNVmDl0Y+BHZHIMDtUE0oY4=" + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-types/-/babel-types-6.26.0.tgz", + "integrity": "sha1-o7Bz+Uq0nrb6Vc1lInozQ4BjJJc=" }, "core-js": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.4.1.tgz", - "integrity": "sha1-TekR5mew6ukSTjQlS1OupvxhjT4=" + "version": "2.6.5", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.5.tgz", + "integrity": "sha512-klh/kDpwX8hryYL14M9w/xei6vrv6sE8gTHDG7/T/+SEovB/G4ejwcfE/CBzO6Edsu+OETZMZ3wcX/EjUkrl5A==" }, "esutils": { "version": "2.0.2", @@ -37,19 +37,29 @@ "integrity": "sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs=" }, "lodash": { - "version": "4.17.4", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.4.tgz", - "integrity": "sha1-eCA6TRwyiuHYbcpkYONptX9AVa4=" + "version": "4.17.11", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.11.tgz", + "integrity": "sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg==" }, "regenerator-runtime": { - "version": "0.10.5", - "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.10.5.tgz", - "integrity": "sha1-M2w+/BIgrc7dosn6tntaeVWjNlg=" + "version": "0.11.1", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz", + "integrity": "sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg==" }, "to-fast-properties": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-1.0.3.tgz", "integrity": "sha1-uDVx+k2MJbguIxsG46MFXeTKGkc=" + }, + "ts-invariant": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/ts-invariant/-/ts-invariant-0.4.1.tgz", + "integrity": "sha512-fdL8AZinDiVKMsOI0cOWHLprS85LWy2p/eVSctVe6fpZF9BAvO59sQYMEWQ37yybBtlKU2zkmILYmy1jrOf6+g==" + }, + "tslib": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.9.3.tgz", + "integrity": "sha512-4krF8scpejhaOgqzBEcGM7yDIEfi0/8+8zDRZhNZZ2kjmHJ4hv3zCbQWxoJGz1iw5U0Jl0nma13xzHXcncMavQ==" } } } diff --git a/tools/tests/apps/modules/packages/modules-test-plugin/package.js b/tools/tests/apps/modules/packages/modules-test-plugin/package.js index 3810cecf88..6a48b83086 100644 --- a/tools/tests/apps/modules/packages/modules-test-plugin/package.js +++ b/tools/tests/apps/modules/packages/modules-test-plugin/package.js @@ -14,6 +14,7 @@ Package.registerBuildPlugin({ npmDependencies: { // TODO Figure out what to do about the duplication between this list // and the Npm.depends list below. + "ts-invariant": "0.4.1", "babel-plugin-transform-class-properties": "6.9.0", "babel-plugin-transform-strict-mode": "6.8.0" } diff --git a/tools/tests/apps/modules/packages/modules-test-plugin/plugin.js b/tools/tests/apps/modules/packages/modules-test-plugin/plugin.js index e9f0d5313a..bfc6c8bfb3 100644 --- a/tools/tests/apps/modules/packages/modules-test-plugin/plugin.js +++ b/tools/tests/apps/modules/packages/modules-test-plugin/plugin.js @@ -1,4 +1,14 @@ -import assert from "assert"; +import { invariant } from "ts-invariant"; + +invariant( + typeof process.versions.node === "string", + "Meteor plugins should only run in Node.js", +); + +invariant( + require.resolve("ts-invariant"), + "/node_modules/meteor/meteor-test-plugin/node_modules/ts-invariant/lib/invariant.js", +); // This verifies that babel-plugin-transform-strict-mode is enabled. let expected; @@ -7,8 +17,8 @@ try { } catch (e) { expected = e; } -assert.ok(expected instanceof TypeError); -assert.ok(/callee/.test(expected.message)); +invariant(expected instanceof TypeError); +invariant(/callee/.test(expected.message), expected.message); Plugin.registerCompiler({ extensions: ["arson"] @@ -20,8 +30,8 @@ class ArsonCompiler { expectedName = "compile-arson"; processFilesForTarget(inputFiles) { - assert.strictEqual(this.expectedName, "compile-arson"); - assert.ok(inputFiles.length > 0); + invariant(this.expectedName === "compile-arson", this.expectedName); + invariant(inputFiles.length > 0); let vueCheckCount = 0; @@ -47,14 +57,12 @@ class ArsonCompiler { const vueCompilerId = file.resolve("vue-template-compiler"); // Make sure resolution does not use the "browser" field of // vue-template-compiler/package.json. - assert.strictEqual( - vueCompilerId.split("/").pop(), - "index.js" - ); + const base = vueCompilerId.split("/").pop(); + invariant(base === "index.js", base); ++vueCheckCount; } }); - assert.ok(vueCheckCount > 0); + invariant(vueCheckCount > 0); } } From 683d23cdee8ceea96219adb0ec0e41f2c8ade0bd Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Fri, 3 May 2019 18:01:50 -0400 Subject: [PATCH 040/327] Bump compiler.BUILT_BY and LINKER_CACHE_SALT to force rebuild. --- tools/isobuild/compiler-plugin.js | 2 +- tools/isobuild/compiler.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/isobuild/compiler-plugin.js b/tools/isobuild/compiler-plugin.js index 0ae055c57f..726cb34f4d 100644 --- a/tools/isobuild/compiler-plugin.js +++ b/tools/isobuild/compiler-plugin.js @@ -65,7 +65,7 @@ const hasOwn = Object.prototype.hasOwnProperty; // Cache the (slightly post-processed) results of linker.fullLink. const CACHE_SIZE = process.env.METEOR_LINKER_CACHE_SIZE || 1024*1024*100; const CACHE_DEBUG = !! process.env.METEOR_TEST_PRINT_LINKER_CACHE_DEBUG; -const LINKER_CACHE_SALT = 22; // Increment this number to force relinking. +const LINKER_CACHE_SALT = 23; // Increment this number to force relinking. const LINKER_CACHE = new LRU({ max: CACHE_SIZE, // Cache is measured in bytes. We don't care about servePath. diff --git a/tools/isobuild/compiler.js b/tools/isobuild/compiler.js index 4f8c5a2ca3..086310dc60 100644 --- a/tools/isobuild/compiler.js +++ b/tools/isobuild/compiler.js @@ -34,7 +34,7 @@ var compiler = exports; // dependencies. (At least for now, packages only used in target creation (eg // minifiers) don't require you to update BUILT_BY, though you will need to quit // and rerun "meteor run".) -compiler.BUILT_BY = 'meteor/32'; +compiler.BUILT_BY = 'meteor/33'; // This is a list of all possible architectures that a build can target. (Client // is expanded into 'web.browser' and 'web.cordova') From 43d72af0f0676e0979cc325cad63fd4084ce974c Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Sat, 4 May 2019 18:57:36 -0400 Subject: [PATCH 041/327] Bump package versions for 1.8.2-beta.2 release. --- packages/context/package.js | 2 +- packages/meteor-tool/package.js | 2 +- packages/modules-runtime/package.js | 2 +- scripts/admin/meteor-release-experimental.json | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/context/package.js b/packages/context/package.js index 7384263afb..fee432b805 100644 --- a/packages/context/package.js +++ b/packages/context/package.js @@ -1,6 +1,6 @@ Package.describe({ name: "context", - version: "0.4.0-beta182.1", + version: "0.4.0-beta182.2", summary: "Manage contextual information without passing objects around", documentation: "README.md" }); diff --git a/packages/meteor-tool/package.js b/packages/meteor-tool/package.js index dc1c94fb44..ed524bf713 100644 --- a/packages/meteor-tool/package.js +++ b/packages/meteor-tool/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "The Meteor command-line tool", - version: '1.8.2-beta.1' + version: '1.8.2-beta.2' }); Package.includeTool(); diff --git a/packages/modules-runtime/package.js b/packages/modules-runtime/package.js index 37eb576cc0..5903e64b71 100644 --- a/packages/modules-runtime/package.js +++ b/packages/modules-runtime/package.js @@ -1,6 +1,6 @@ Package.describe({ name: "modules-runtime", - version: "0.11.0-beta182.1", + version: "0.11.0-beta182.2", summary: "CommonJS module system", git: "https://github.com/benjamn/install", documentation: "README.md" diff --git a/scripts/admin/meteor-release-experimental.json b/scripts/admin/meteor-release-experimental.json index f701e013b9..b93e72570c 100644 --- a/scripts/admin/meteor-release-experimental.json +++ b/scripts/admin/meteor-release-experimental.json @@ -1,6 +1,6 @@ { "track": "METEOR", - "version": "1.8.2-beta.1", + "version": "1.8.2-beta.2", "recommended": false, "official": false, "description": "Meteor" From da323022b1be2c4142365e0f9fb5b7fa83617014 Mon Sep 17 00:00:00 2001 From: zodern Date: Sun, 5 May 2019 15:23:13 -0500 Subject: [PATCH 042/327] Do not remove source map url comments in public files (#10525) --- tools/isobuild/bundler.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tools/isobuild/bundler.js b/tools/isobuild/bundler.js index 53f0ff2748..267e1ee60b 100644 --- a/tools/isobuild/bundler.js +++ b/tools/isobuild/bundler.js @@ -1722,7 +1722,9 @@ class ClientTarget extends Target { manifestItem.sri = file.sri(); if (! file.targetPath.startsWith("dynamic/")) { - writeFile(file, builder); + writeFile(file, builder, { + leaveSourceMapUrls: type === 'asset' + }); manifest.push(manifestItem); return; } @@ -2768,7 +2770,7 @@ var writeFile = Profile("bundler writeFile", function (file, builder, options) { if (options && options.sourceMapUrl) { data = addSourceMappingURL(data, options.sourceMapUrl); - } else { + } else if (!options || !options.leaveSourceMapUrls) { // If we do not have an options.sourceMapUrl to append, then we still // want to remove any existing //# sourceMappingURL comments. // https://github.com/meteor/meteor/issues/9894 From 72c704bcaebea393f7cef2a7ece98b4be2094692 Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Sun, 5 May 2019 11:32:12 -0400 Subject: [PATCH 043/327] Revert using _findSources to scan .npm/package/node_modules. After much thought, I believe this implementation (#10545) would have caused severe compatibility problems when using packages published with earlier versions of Meteor in a Meteor 1.8.2 app, or when publishing packages with Meteor 1.8.2 for use with earlier Meteor versions. Specifically, this implementation relied on writing the additional .npm/package/node_modules resources found by _findSources into the unibuild JSON file(s), and there just wasn't any good way to make sure the new JSON format could be safely consumed by previous Meteor versions. Even if we found a way to hide the new resources from older versions of Meteor, perhaps by putting them in a new/different property of the unibuild JSON file, packages published with older Meteor versions might try to load an npm package with a "module" field without realizing the code must be compiled, which would likely cause a syntax error in Meteor 1.8.2, since the "module" field always gets preference over the "main" field of package.json (in Meteor 1.8.2). --- tools/isobuild/import-scanner.js | 21 --------------------- tools/isobuild/package-source.js | 22 +--------------------- tools/isobuild/unibuild.js | 32 ++------------------------------ 3 files changed, 3 insertions(+), 72 deletions(-) diff --git a/tools/isobuild/import-scanner.js b/tools/isobuild/import-scanner.js index b90a175fe4..6e4b033449 100644 --- a/tools/isobuild/import-scanner.js +++ b/tools/isobuild/import-scanner.js @@ -375,27 +375,6 @@ export default class ImportScanner { _checkSourceAndTargetPaths(file) { file.sourcePath = this._getSourcePath(file); - // If we're scanning a Meteor package (as indicated by this.name), and we - // come across a file whose sourcePath starts with .npm/, it's a file that - // was installed by Npm.depends, so we should reroot it relative to one of - // this.nodeModulesPaths, rather than preserving the .npm/ path. - if (this.name && file.sourcePath.startsWith(".npm/")) { - const parts = file.sourcePath.split("/"); - const nmi = parts.indexOf("node_modules"); - if (nmi >= 0) { - const suffix = parts.slice(nmi + 1).join("/"); - this.nodeModulesPaths.some(nodeModulesPath => { - const newAbsPath = pathJoin(nodeModulesPath, suffix); - if (optimisticStatOrNull(newAbsPath)) { - file.sourcePath = file.targetPath = - pathRelative(this.sourceRoot, newAbsPath); - return true; - } - return false; - }); - } - } - if (! isString(file.targetPath)) { return; } diff --git a/tools/isobuild/package-source.js b/tools/isobuild/package-source.js index 9625d876a6..210f6d03e8 100644 --- a/tools/isobuild/package-source.js +++ b/tools/isobuild/package-source.js @@ -1343,27 +1343,7 @@ _.extend(PackageSource.prototype, { return sources; } - const sources = find("", 0, false); - - if (!isApp && typeof this.npmCacheDirectory === "string") { - // If this PackageSource has an npmCacheDirectory, scan it as well for - // sources that might need to be compiled. - const stat = optimisticStatOrNull(this.npmCacheDirectory); - if (stat && stat.isDirectory()) { - const relNpmDir = files.pathRelative( - this.sourceRoot, - this.npmCacheDirectory, - ); - if (! relNpmDir.startsWith("..")) { - const relParts = relNpmDir.split("/"); - const depth = relParts.length; - const inNodeModules = relParts.indexOf("node_modules") >= 0; - sources.push(...find(relNpmDir, depth, inNodeModules)); - } - } - } - - return sources; + return files.withCache(() => find("", 0, false)); }), _findAssets({ diff --git a/tools/isobuild/unibuild.js b/tools/isobuild/unibuild.js index 26c09e03e4..d3bc27a1a4 100644 --- a/tools/isobuild/unibuild.js +++ b/tools/isobuild/unibuild.js @@ -251,7 +251,6 @@ export class Unibuild { // Figure out where the npm dependencies go. let node_modules = {}; - let nonLocalNodeModulesBundlePath; _.each(unibuild.nodeModulesDirectories, nmd => { const bundlePath = _.has(npmDirsToCopy, nmd.sourcePath) // We already have this npm directory from another unibuild. @@ -259,9 +258,6 @@ export class Unibuild { : npmDirsToCopy[nmd.sourcePath] = nmd.getPreferredBundlePath("isopack"); node_modules[bundlePath] = nmd.toJSON(); - if (!nmd.local) { - nonLocalNodeModulesBundlePath = nonLocalNodeModulesBundlePath || bundlePath; - } }); const preferredPaths = Object.keys(node_modules); @@ -319,37 +315,13 @@ export class Unibuild { }); // Output other resources each to their own file - _.each(unibuild.resources, resource => { + _.each(unibuild.resources, function (resource) { if (_.contains(["head", "body"], resource.type)) { // already did this one return; } - let generatedFilename; - - // Although non-local npm dependencies installed by Npm.depends start - // with relative paths like .npm/**/node_modules/*, the files are stored - // in the bundle under npm/node_modules, so we need to reroot relative - // .npm/ paths against the npm/node_modules path. - if ( - unibuild.pkg.name && - typeof nonLocalNodeModulesBundlePath === "string" && - typeof resource.path === "string" && - resource.path.startsWith(".npm/") - ) { - const parts = resource.path.split("/"); - const nmi = parts.indexOf("node_modules"); - if (nmi >= 0) { - // Skip builder.writeToGeneratedFilename below since the file already - // (should) exist at this new generatedFilename path. - generatedFilename = files.pathJoin( - nonLocalNodeModulesBundlePath, - parts.slice(nmi + 1).join("/"), - ); - } - } - - generatedFilename = generatedFilename || + const generatedFilename = builder.writeToGeneratedFilename( files.pathJoin( unibuildDir, From f4af3ab2fa02fbc14d70d499087b67ba91a97c1e Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Sat, 4 May 2019 20:45:03 -0400 Subject: [PATCH 044/327] Backstop ESM module compilation with Reify in the ImportScanner. Instead of compiling ESM syntax in node_modules using compiler plugins, the ImportScanner can provide "native" support for ESM syntax by using Reify to quickly compile just the import/export syntax in any imported modules that were not already handled by compiler plugins. Since this code runs every time the app is built, it should not matter which version of Meteor was used to publish a package. Compared to the previous implementation based on PackageSource#_findSources and unibuild JSON files (#10545), this implementation should have far fewer compatibility concerns, as well as being faster thanks to not processing or compiling modules until the ImportScanner determines that they are actually imported. Though the number of files that get compiled by this system should be relatively small for now, to maintain good performance, the results of the compilation are cached on disk and in memory. --- tools/fs/optimistic.js | 6 ++ tools/isobuild/bundler.js | 11 ++- tools/isobuild/compiler-plugin.js | 16 +++- tools/isobuild/import-scanner.js | 153 ++++++++++++++++++++++-------- 4 files changed, 144 insertions(+), 42 deletions(-) diff --git a/tools/fs/optimistic.js b/tools/fs/optimistic.js index 578479b4f0..b65776367f 100644 --- a/tools/fs/optimistic.js +++ b/tools/fs/optimistic.js @@ -5,6 +5,7 @@ import { watch } from "./safe-watcher.js"; import { sha1 } from "./watch.js"; import { pathSep, + pathBasename, pathDirname, pathIsAbsolute, pathJoin, @@ -287,6 +288,11 @@ export const optimisticLookupPackageJson = wrap((absRootDir, relDir) => { return null; } + // Stop searching if an ancestor node_modules directory is encountered. + if (pathBasename(relParentDir) === "node_modules") { + return null; + } + return optimisticLookupPackageJson(absRootDir, relParentDir); }); diff --git a/tools/isobuild/bundler.js b/tools/isobuild/bundler.js index 267e1ee60b..1f7fd85365 100644 --- a/tools/isobuild/bundler.js +++ b/tools/isobuild/bundler.js @@ -1078,13 +1078,20 @@ class Target { } const target = this; + + const linkerCacheDir = this.bundlerCacheDir && + files.pathJoin(this.bundlerCacheDir, "linker"); + + const scannerCacheDir = this.bundlerCacheDir && + files.pathJoin(this.bundlerCacheDir, "scanner"); + const processor = new compilerPluginModule.CompilerPluginProcessor({ unibuilds: this.unibuilds, arch: this.arch, sourceRoot: this.sourceRoot, isopackCache: this.isopackCache, - linkerCacheDir: this.bundlerCacheDir && - files.pathJoin(this.bundlerCacheDir, 'linker'), + linkerCacheDir, + scannerCacheDir, // Takes a CssOutputResource and returns a string of minified CSS, // or null to indicate no minification occurred. diff --git a/tools/isobuild/compiler-plugin.js b/tools/isobuild/compiler-plugin.js index 726cb34f4d..a9ae6d485f 100644 --- a/tools/isobuild/compiler-plugin.js +++ b/tools/isobuild/compiler-plugin.js @@ -110,6 +110,7 @@ export class CompilerPluginProcessor { sourceRoot, isopackCache, linkerCacheDir, + scannerCacheDir, minifyCssResource, }) { Object.assign(this, { @@ -118,11 +119,16 @@ export class CompilerPluginProcessor { sourceRoot, isopackCache, linkerCacheDir, + scannerCacheDir, minifyCssResource, }); - if (this.linkerCacheDir) { - files.mkdir_p(this.linkerCacheDir); + if (linkerCacheDir) { + files.mkdir_p(linkerCacheDir); + } + + if (scannerCacheDir) { + files.mkdir_p(scannerCacheDir); } } @@ -141,7 +147,8 @@ export class CompilerPluginProcessor { return new PackageSourceBatch(unibuild, self, { sourceRoot, - linkerCacheDir: self.linkerCacheDir + linkerCacheDir: self.linkerCacheDir, + scannerCacheDir: self.scannerCacheDir, }); }); @@ -1036,6 +1043,7 @@ export class PackageSourceBatch { constructor(unibuild, processor, { sourceRoot, linkerCacheDir, + scannerCacheDir, }) { const self = this; buildmessage.assertInJob(); @@ -1044,6 +1052,7 @@ export class PackageSourceBatch { self.processor = processor; self.sourceRoot = sourceRoot; self.linkerCacheDir = linkerCacheDir; + self.scannerCacheDir = scannerCacheDir; self.importExtensions = [".js", ".json"]; self._nodeModulesPaths = null; @@ -1293,6 +1302,7 @@ export class PackageSourceBatch { sourceRoot: batch.sourceRoot, nodeModulesPaths, watchSet: batch.unibuild.watchSet, + cacheDir: batch.scannerCacheDir, }); scanner.addInputFiles(map.get(name).files); diff --git a/tools/isobuild/import-scanner.js b/tools/isobuild/import-scanner.js index 6e4b033449..37d7c9a31b 100644 --- a/tools/isobuild/import-scanner.js +++ b/tools/isobuild/import-scanner.js @@ -23,6 +23,7 @@ import { convertToOSPath, convertToPosixPath, realpathOrNull, + writeFileAtomically, } from "../fs/files.js"; const { @@ -34,11 +35,15 @@ const { import { optimisticReadFile, optimisticStatOrNull, + optimisticLookupPackageJson, optimisticLStatOrNull, optimisticHashOrNull, shouldWatch, } from "../fs/optimistic.js"; +import { wrap } from "optimism"; +import { compile as reifyCompile } from "reify/lib/compiler"; + import Resolver from "./resolver.js"; const fakeFileStat = { @@ -55,24 +60,91 @@ const fakeFileStat = { // to prevent them from being added to scanner.outputFiles. const fakeSymbol = Symbol("fake"); -// Default handlers for well-known file extensions. -// Note that these function expect strings, not Buffer objects. -const defaultExtensionHandlers = { - ".js"(dataString) { - // Strip any #! line from the beginning of the file. - return dataString.replace(/^#![^\n]*/, ""); - }, +function stripHashBang(dataString) { + return dataString.replace(/^#![^\n]*/, ""); +} - ".json"(dataString) { - const file = this; - file.jsonData = JSON.parse(dataString); +const reifyCompileWithCache = wrap(function ({ dataString }) { + return reifyCompile(stripHashBang(dataString)).code; +}, { + makeCacheKey({ hash }) { + return hash; + } +}); + +class DefaultHandlers { + constructor({ + bundleArch, + sourceRoot, + cacheDir, + }) { + Object.assign(this, { + isWeb: ! archMatches(bundleArch, "os"), + sourceRoot, + cacheDir, + }); + } + + lookupPackageJson(file) { + const relDir = pathRelative( + this.sourceRoot, + pathDirname(file.absPath), + ); + + if (relDir.startsWith("..")) { + const absParts = file.absPath.split("/"); + absParts.pop(); // Get rid of base filename. + const nmi = absParts.lastIndexOf("node_modules"); + return optimisticLookupPackageJson( + absParts.slice(0, nmi + 1).join("/"), + absParts.slice(nmi + 1).join("/"), + ); + } + + return optimisticLookupPackageJson(this.sourceRoot, relDir); + } + + js(file) { + const pkgJson = this.lookupPackageJson(file); + + // Similar to logic in PackageSource#_findSources. + const hasModuleEntryPoint = pkgJson && ( + this.isWeb + ? typeof pkgJson.module === "string" + : pkgJson.type === "module" + ); + + if (! hasModuleEntryPoint) { + return stripHashBang(file.dataString); + } + + if (this.cacheDir) { + const cacheFileName = pathJoin( + this.cacheDir, + "reify-" + file.hash + ".js", + ); + try { + return optimisticReadFile(cacheFileName, "utf8"); + } catch (e) { + if (e.code !== "ENOENT") throw e; + const code = reifyCompileWithCache(file); + process.nextTick(writeFileAtomically, cacheFileName, code); + return code; + } + } else { + return reifyCompileWithCache(file); + } + } + + json(file) { + file.jsonData = JSON.parse(file.dataString); return jsonDataToCommonJS(file.jsonData); - }, + } - ".css"(dataString, hash) { + css({ dataString, hash }) { return cssToCommonJS(dataString, hash); } -}; +} function jsonDataToCommonJS(data) { return "module.exports = " + @@ -184,6 +256,7 @@ export default class ImportScanner { sourceRoot, nodeModulesPaths = [], watchSet, + cacheDir, }) { assert.ok(isString(sourceRoot)); @@ -192,11 +265,17 @@ export default class ImportScanner { this.sourceRoot = sourceRoot; this.nodeModulesPaths = nodeModulesPaths; this.watchSet = watchSet; + this.cacheDir = cacheDir; this.absPathToOutputIndex = Object.create(null); this.realPathToFiles = Object.create(null); this.realPathCache = Object.create(null); this.allMissingModules = Object.create(null); this.outputFiles = []; + this.defaultHandlers = new DefaultHandlers({ + bundleArch, + sourceRoot, + cacheDir, + }); this.resolver = Resolver.getOrCreate({ caller: "ImportScanner#constructor", @@ -274,21 +353,22 @@ export default class ImportScanner { // system, but any import statements or require calls in file.data // will be interpreted relative to this path, so it needs to be // something plausible. #6411 #6383 - const absPath = pathJoin(this.sourceRoot, file.sourcePath); + file.absPath = pathJoin(this.sourceRoot, file.sourcePath); // This property can have values false, true, "dynamic" (which // indicates that the file has been imported, but only dynamically). file.imported = false; - file.absModuleId = file.absModuleId || this._getAbsModuleId(absPath); + file.absModuleId = file.absModuleId || + this._getAbsModuleId(file.absPath); - if (! this._addFile(absPath, file)) { + if (! this._addFile(file.absPath, file)) { // Collisions can happen if a compiler plugin calls addJavaScript // multiple times with the same sourcePath. #6422 - this._combineFiles(this._getFile(absPath), file); + this._combineFiles(this._getFile(file.absPath), file); } - this._addFileByRealPath(file, this._realPath(absPath)); + this._addFileByRealPath(file, this._realPath(file.absPath)); }); return this; @@ -936,16 +1016,18 @@ export default class ImportScanner { return file.dataString; } - const dotExt = "." + file.type; - const dataString = file.data.toString("utf8"); - file.dataString = defaultExtensionHandlers[dotExt].call( - file, - dataString, - file.hash, - ); + const rawDataString = file.data.toString("utf8"); + if (file.type === "js") { + // Avoid compiling .js file with Reify when all we want is a string + // version of file.data. + file.dataString = stripHashBang(rawDataString); + } else { + file.dataString = rawDataString; + file.dataString = this.defaultHandlers[file.type](file); + } if (! (file.data instanceof Buffer) || - file.dataString !== dataString) { + file.dataString !== rawDataString) { file.data = Buffer.from(file.dataString, "utf8"); } @@ -954,6 +1036,7 @@ export default class ImportScanner { _readFile(absPath) { const info = { + absPath, data: optimisticReadFile(absPath), hash: optimisticHashOrNull(absPath), }; @@ -1004,9 +1087,9 @@ export default class ImportScanner { } _readModule(absPath) { - let ext = pathExtname(absPath).toLowerCase(); + const dotExt = pathExtname(absPath).toLowerCase(); - if (ext === ".node") { + if (dotExt === ".node") { const dataString = "throw new Error(" + JSON.stringify( this.isWeb() ? "cannot load native .node modules on the client" @@ -1016,7 +1099,7 @@ export default class ImportScanner { const data = Buffer.from(dataString, "utf8"); const hash = sha1(data); - return { data, dataString, hash }; + return { absPath, data, dataString, hash }; } try { @@ -1028,20 +1111,16 @@ export default class ImportScanner { const dataString = info.dataString; - if (! has(defaultExtensionHandlers, ext)) { + let ext = dotExt.slice(1); + if (! has(DefaultHandlers.prototype, ext)) { if (canBeParsedAsPlainJS(dataString)) { - ext = ".js"; + ext = "js"; } else { return null; } } - info.dataString = defaultExtensionHandlers[ext].call( - info, - info.dataString, - info.hash, - ); - + info.dataString = this.defaultHandlers[ext](info); if (info.dataString !== dataString) { info.data = Buffer.from(info.dataString, "utf8"); } From d9fd447e6f0773069d376a48d710265f55b38e6d Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Sun, 5 May 2019 19:33:38 -0400 Subject: [PATCH 045/327] Avoid using fs.unlinkSync on directories. Should help with #10549. --- tools/cli/dev-bundle-links.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/cli/dev-bundle-links.js b/tools/cli/dev-bundle-links.js index 5327c2d02c..717dcff306 100644 --- a/tools/cli/dev-bundle-links.js +++ b/tools/cli/dev-bundle-links.js @@ -17,7 +17,7 @@ exports.makeLink = function (target, linkPath) { fs.renameSync(tempPath, linkPath); } catch (e) { // If renaming fails, try unlinking first. - fs.unlinkSync(linkPath); + require("rimraf").sync(linkPath); fs.renameSync(tempPath, linkPath); } }; From e94d5d3237aec7a433b0f2f68292bc503509924f Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Sun, 5 May 2019 19:39:22 -0400 Subject: [PATCH 046/327] Bump package versions for 1.8.2-beta.3 release. --- packages/context/package.js | 2 +- packages/meteor-tool/package.js | 2 +- packages/modules-runtime/package.js | 2 +- scripts/admin/meteor-release-experimental.json | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/context/package.js b/packages/context/package.js index fee432b805..491d08ba02 100644 --- a/packages/context/package.js +++ b/packages/context/package.js @@ -1,6 +1,6 @@ Package.describe({ name: "context", - version: "0.4.0-beta182.2", + version: "0.4.0-beta182.3", summary: "Manage contextual information without passing objects around", documentation: "README.md" }); diff --git a/packages/meteor-tool/package.js b/packages/meteor-tool/package.js index ed524bf713..0764f16349 100644 --- a/packages/meteor-tool/package.js +++ b/packages/meteor-tool/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "The Meteor command-line tool", - version: '1.8.2-beta.2' + version: '1.8.2-beta.3' }); Package.includeTool(); diff --git a/packages/modules-runtime/package.js b/packages/modules-runtime/package.js index 5903e64b71..1cafd428eb 100644 --- a/packages/modules-runtime/package.js +++ b/packages/modules-runtime/package.js @@ -1,6 +1,6 @@ Package.describe({ name: "modules-runtime", - version: "0.11.0-beta182.2", + version: "0.11.0-beta182.3", summary: "CommonJS module system", git: "https://github.com/benjamn/install", documentation: "README.md" diff --git a/scripts/admin/meteor-release-experimental.json b/scripts/admin/meteor-release-experimental.json index b93e72570c..a57cfc36b0 100644 --- a/scripts/admin/meteor-release-experimental.json +++ b/scripts/admin/meteor-release-experimental.json @@ -1,6 +1,6 @@ { "track": "METEOR", - "version": "1.8.2-beta.2", + "version": "1.8.2-beta.3", "recommended": false, "official": false, "description": "Meteor" From 646fa4e3ee6baea585766807bc930123ba4d03f7 Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Mon, 6 May 2019 17:23:06 -0400 Subject: [PATCH 047/327] Consider only named packages in optimisticLookupPackageJson. Sometimes (very rarely) an npm package may contain package.json files other than the one found in the root package directory. For example, the date-fns@2.0.0-alpha.27 package includes a small package.json file for each of its functions (date-fns/someDateFn/package.json) that contains only { sideEffects, typings }, for whatever reason. These package.json files clearly do not serve the same purpose as date-fns/package.json, and it would be convenient to ignore them in optimisticLookupPackageJson. The easiest way I can see to accomplish that is to ignore package.json files that do not have a "name" property, since any package.json file that governs an actual package must have a name. Should fix #10547. --- tools/fs/optimistic.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/fs/optimistic.js b/tools/fs/optimistic.js index b65776367f..6fab675f2f 100644 --- a/tools/fs/optimistic.js +++ b/tools/fs/optimistic.js @@ -279,7 +279,7 @@ export const optimisticReadMeteorIgnore = wrap(dir => { export const optimisticLookupPackageJson = wrap((absRootDir, relDir) => { const absPkgJsonPath = pathJoin(absRootDir, relDir, "package.json"); const pkgJson = optimisticReadJsonOrNull(absPkgJsonPath); - if (pkgJson) { + if (pkgJson && typeof pkgJson.name === "string") { return pkgJson; } From d5d7413a38580a4edc3511e2f519e2d3067a8888 Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Fri, 10 May 2019 15:43:48 -0400 Subject: [PATCH 048/327] Compile all unhandled node_modules client JS with Reify. Although I hoped we could be clever about which npm packages we compiled, there are already too many exceptions to the rules (for example, not all npm packages that contain ESM code have a "module" entry point in package.json). It seems safer simply to compile all modules imported from node_modules that have not already been handled by compiler plugins, and trust that our disk+memory caching system will provide acceptable build performance. Should help with #10547, #10544, and #10546. --- tools/isobuild/import-scanner.js | 67 ++++++++++++++------------------ 1 file changed, 30 insertions(+), 37 deletions(-) diff --git a/tools/isobuild/import-scanner.js b/tools/isobuild/import-scanner.js index 37d7c9a31b..917b65edee 100644 --- a/tools/isobuild/import-scanner.js +++ b/tools/isobuild/import-scanner.js @@ -13,6 +13,7 @@ import LRU from "lru-cache"; import {Profile} from "../tool-env/profile.js"; import {SourceNode, SourceMapConsumer} from "source-map"; import { + mkdir_p, pathJoin, pathRelative, pathNormalize, @@ -74,55 +75,32 @@ const reifyCompileWithCache = wrap(function ({ dataString }) { class DefaultHandlers { constructor({ - bundleArch, - sourceRoot, cacheDir, + bundleArch, }) { Object.assign(this, { - isWeb: ! archMatches(bundleArch, "os"), - sourceRoot, cacheDir, + isWeb: ! archMatches(bundleArch, "os"), }); } - lookupPackageJson(file) { - const relDir = pathRelative( - this.sourceRoot, - pathDirname(file.absPath), + getCacheFileName(file) { + return pathJoin( + this.cacheDir, + "reify-" + file.hash + ".js", ); - - if (relDir.startsWith("..")) { - const absParts = file.absPath.split("/"); - absParts.pop(); // Get rid of base filename. - const nmi = absParts.lastIndexOf("node_modules"); - return optimisticLookupPackageJson( - absParts.slice(0, nmi + 1).join("/"), - absParts.slice(nmi + 1).join("/"), - ); - } - - return optimisticLookupPackageJson(this.sourceRoot, relDir); } js(file) { - const pkgJson = this.lookupPackageJson(file); - - // Similar to logic in PackageSource#_findSources. - const hasModuleEntryPoint = pkgJson && ( - this.isWeb - ? typeof pkgJson.module === "string" - : pkgJson.type === "module" - ); - - if (! hasModuleEntryPoint) { + if (!this.isWeb) { + // Since we don't use the "module" entry point in package.json for + // server packages yet, we don't need to compile ESM syntax on the + // server yet. return stripHashBang(file.dataString); } if (this.cacheDir) { - const cacheFileName = pathJoin( - this.cacheDir, - "reify-" + file.hash + ".js", - ); + const cacheFileName = this.getCacheFileName(file); try { return optimisticReadFile(cacheFileName, "utf8"); } catch (e) { @@ -146,6 +124,14 @@ class DefaultHandlers { } } +[ + "js", + "json", + "css", +].forEach(function (type) { + this[type] = Profile("DefaultHandlers." + type, this[type]); +}, DefaultHandlers.prototype); + function jsonDataToCommonJS(data) { return "module.exports = " + JSON.stringify(data, null, 2) + ";\n"; @@ -265,16 +251,23 @@ export default class ImportScanner { this.sourceRoot = sourceRoot; this.nodeModulesPaths = nodeModulesPaths; this.watchSet = watchSet; - this.cacheDir = cacheDir; this.absPathToOutputIndex = Object.create(null); this.realPathToFiles = Object.create(null); this.realPathCache = Object.create(null); this.allMissingModules = Object.create(null); this.outputFiles = []; + + if (cacheDir) { + mkdir_p(cacheDir = pathJoin( + cacheDir, + bundleArch, + )); + } + this.cacheDir = cacheDir; + this.defaultHandlers = new DefaultHandlers({ - bundleArch, - sourceRoot, cacheDir, + bundleArch, }); this.resolver = Resolver.getOrCreate({ From 4155a01e57ca85dfb9f8edd7c67405abd8218499 Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Wed, 15 May 2019 19:06:23 -0400 Subject: [PATCH 049/327] Update meteor-babel and reify versions in dev bundle. --- scripts/dev-bundle-tool-package.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/dev-bundle-tool-package.js b/scripts/dev-bundle-tool-package.js index 6129b9f1b6..fb2880013a 100644 --- a/scripts/dev-bundle-tool-package.js +++ b/scripts/dev-bundle-tool-package.js @@ -14,11 +14,11 @@ var packageJson = { pacote: "https://github.com/meteor/pacote/tarball/c5043daa1b768594e01d76275e3854fc19f038f9", "node-gyp": "3.7.0", "node-pre-gyp": "0.10.3", - "meteor-babel": "7.4.5", + "meteor-babel": "7.4.6", // Keep the versions of these packages consistent with the versions // found in dev-bundle-server-package.js. "meteor-promise": "0.8.7", - reify: "0.18.1", + reify: "0.19.0", fibers: "3.1.1", // So that Babel can emit require("@babel/runtime/helpers/...") calls. "@babel/runtime": "7.4.3", From 7185137ce7aef1f13f21e9933b1fec9353441cfd Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Wed, 15 May 2019 19:07:56 -0400 Subject: [PATCH 050/327] Bump $BUNDLE_VERSION to 8.16.0.3 before rebuilding dev bundle. --- meteor | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meteor b/meteor index f68c762c03..0a6854905f 100755 --- a/meteor +++ b/meteor @@ -1,6 +1,6 @@ #!/usr/bin/env bash -BUNDLE_VERSION=8.16.0.2 +BUNDLE_VERSION=8.16.0.3 # OS Check. Put here because here is where we download the precompiled # bundles that are arch specific. From 28d74dcc9f2faa16c8cd65e0e86bc28dbbac4b00 Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Wed, 15 May 2019 19:12:09 -0400 Subject: [PATCH 051/327] Use Reify to compile dynamic import(...). --- tools/isobuild/import-scanner.js | 4 +++- tools/static-assets/server/runtime.js | 5 +++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/tools/isobuild/import-scanner.js b/tools/isobuild/import-scanner.js index 917b65edee..323e2eaac5 100644 --- a/tools/isobuild/import-scanner.js +++ b/tools/isobuild/import-scanner.js @@ -66,7 +66,9 @@ function stripHashBang(dataString) { } const reifyCompileWithCache = wrap(function ({ dataString }) { - return reifyCompile(stripHashBang(dataString)).code; + return reifyCompile(stripHashBang(dataString), { + dynamicImport: true, + }).code; }, { makeCacheKey({ hash }) { return hash; diff --git a/tools/static-assets/server/runtime.js b/tools/static-assets/server/runtime.js index 3d521e57d0..7faf43f6e6 100644 --- a/tools/static-assets/server/runtime.js +++ b/tools/static-assets/server/runtime.js @@ -18,3 +18,8 @@ Mp.load = function (filename) { } return result; }; + +const resolved = Promise.resolve(); +Mp.dynamicImport = function (id) { + return resolved.then(() => require(id)); +}; From c73ac1c84434fb90a7e34c478bc6d2e4d8c50562 Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Thu, 16 May 2019 12:56:00 -0400 Subject: [PATCH 052/327] Update reify and @babel/runtime to latest versions in dev bundle. We ended up with two different versions of the reify package (0.19.0 and 0.19.1) in the last build of the dev bundle, which seems to have caused the test failures. --- scripts/dev-bundle-tool-package.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/dev-bundle-tool-package.js b/scripts/dev-bundle-tool-package.js index fb2880013a..b752a790b8 100644 --- a/scripts/dev-bundle-tool-package.js +++ b/scripts/dev-bundle-tool-package.js @@ -18,10 +18,10 @@ var packageJson = { // Keep the versions of these packages consistent with the versions // found in dev-bundle-server-package.js. "meteor-promise": "0.8.7", - reify: "0.19.0", + reify: "0.19.1", fibers: "3.1.1", // So that Babel can emit require("@babel/runtime/helpers/...") calls. - "@babel/runtime": "7.4.3", + "@babel/runtime": "7.4.4", // For backwards compatibility with isopackets that still depend on // babel-runtime rather than @babel/runtime. "babel-runtime": "7.0.0-beta.3", From 4b518d56e24fd3acacc711e5897a030ffaf8e806 Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Thu, 16 May 2019 12:57:00 -0400 Subject: [PATCH 053/327] Bump $BUNDLE_VERSION to 8.16.0.4 before rebuilding dev bundle. --- meteor | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meteor b/meteor index 0a6854905f..67741276fd 100755 --- a/meteor +++ b/meteor @@ -1,6 +1,6 @@ #!/usr/bin/env bash -BUNDLE_VERSION=8.16.0.3 +BUNDLE_VERSION=8.16.0.4 # OS Check. Put here because here is where we download the precompiled # bundles that are arch specific. From 6d3386d77d749a9547af329585e6b79b3009184e Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Thu, 16 May 2019 13:27:56 -0400 Subject: [PATCH 054/327] Bump package versions for 1.8.2-beta.4 release. --- packages/context/package.js | 2 +- packages/meteor-tool/package.js | 2 +- packages/modules-runtime/package.js | 2 +- scripts/admin/meteor-release-experimental.json | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/context/package.js b/packages/context/package.js index 491d08ba02..1d52949972 100644 --- a/packages/context/package.js +++ b/packages/context/package.js @@ -1,6 +1,6 @@ Package.describe({ name: "context", - version: "0.4.0-beta182.3", + version: "0.4.0-beta182.4", summary: "Manage contextual information without passing objects around", documentation: "README.md" }); diff --git a/packages/meteor-tool/package.js b/packages/meteor-tool/package.js index 0764f16349..e7a8ec06ea 100644 --- a/packages/meteor-tool/package.js +++ b/packages/meteor-tool/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "The Meteor command-line tool", - version: '1.8.2-beta.3' + version: '1.8.2-beta.4' }); Package.includeTool(); diff --git a/packages/modules-runtime/package.js b/packages/modules-runtime/package.js index 1cafd428eb..aa4cb050cd 100644 --- a/packages/modules-runtime/package.js +++ b/packages/modules-runtime/package.js @@ -1,6 +1,6 @@ Package.describe({ name: "modules-runtime", - version: "0.11.0-beta182.3", + version: "0.11.0-beta182.4", summary: "CommonJS module system", git: "https://github.com/benjamn/install", documentation: "README.md" diff --git a/scripts/admin/meteor-release-experimental.json b/scripts/admin/meteor-release-experimental.json index a57cfc36b0..8078d329ca 100644 --- a/scripts/admin/meteor-release-experimental.json +++ b/scripts/admin/meteor-release-experimental.json @@ -1,6 +1,6 @@ { "track": "METEOR", - "version": "1.8.2-beta.3", + "version": "1.8.2-beta.4", "recommended": false, "official": false, "description": "Meteor" From 9fc6642f5a9a2baeb6f83892fb780081f73bc7ca Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Fri, 17 May 2019 10:59:17 -0400 Subject: [PATCH 055/327] Compile unhandled JS imports for server bundles, too. --- tools/isobuild/import-scanner.js | 31 ++++++++----------------------- 1 file changed, 8 insertions(+), 23 deletions(-) diff --git a/tools/isobuild/import-scanner.js b/tools/isobuild/import-scanner.js index 323e2eaac5..738d6b19ec 100644 --- a/tools/isobuild/import-scanner.js +++ b/tools/isobuild/import-scanner.js @@ -80,27 +80,19 @@ class DefaultHandlers { cacheDir, bundleArch, }) { - Object.assign(this, { - cacheDir, - isWeb: ! archMatches(bundleArch, "os"), - }); + if (cacheDir) { + mkdir_p(this.cacheDir = pathJoin( + cacheDir, + bundleArch, + )); + } } getCacheFileName(file) { - return pathJoin( - this.cacheDir, - "reify-" + file.hash + ".js", - ); + return pathJoin(this.cacheDir, "reify-" + file.hash + ".js"); } js(file) { - if (!this.isWeb) { - // Since we don't use the "module" entry point in package.json for - // server packages yet, we don't need to compile ESM syntax on the - // server yet. - return stripHashBang(file.dataString); - } - if (this.cacheDir) { const cacheFileName = this.getCacheFileName(file); try { @@ -253,20 +245,13 @@ export default class ImportScanner { this.sourceRoot = sourceRoot; this.nodeModulesPaths = nodeModulesPaths; this.watchSet = watchSet; + this.cacheDir = cacheDir; this.absPathToOutputIndex = Object.create(null); this.realPathToFiles = Object.create(null); this.realPathCache = Object.create(null); this.allMissingModules = Object.create(null); this.outputFiles = []; - if (cacheDir) { - mkdir_p(cacheDir = pathJoin( - cacheDir, - bundleArch, - )); - } - this.cacheDir = cacheDir; - this.defaultHandlers = new DefaultHandlers({ cacheDir, bundleArch, From f0d39b86e61390677254834730dc08390620dfd1 Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Fri, 17 May 2019 11:22:23 -0400 Subject: [PATCH 056/327] Avoid module.useNode() for packages with "module" entry points. --- tools/isobuild/import-scanner.js | 38 +++++++++++++++++++++++++++++++- 1 file changed, 37 insertions(+), 1 deletion(-) diff --git a/tools/isobuild/import-scanner.js b/tools/isobuild/import-scanner.js index 738d6b19ec..ec9b843b55 100644 --- a/tools/isobuild/import-scanner.js +++ b/tools/isobuild/import-scanner.js @@ -1129,7 +1129,15 @@ export default class ImportScanner { // raw version found in node_modules. See also: // https://github.com/meteor/meteor-feature-requests/issues/6 - } else if (this._shouldUseNode(absModuleId)) { + } else if ( + this._shouldUseNode(absModuleId) && + // If the package has a "module" entry point in its package.json file, + // there's a chance someone might import an ESM module from the package + // on the server (without going through package.json), so to be safe we + // need to compile ESM syntax for any modules imported from the package, + // instead of just calling module.useNode() and hoping for the best. + ! this._hasModuleEntryPoint(absPath) + ) { // On the server, modules in node_modules directories will be // handled natively by Node, so we just need to generate a stub // module that calls module.useNode(), rather than calling @@ -1176,6 +1184,34 @@ export default class ImportScanner { return depFile; } + _hasModuleEntryPoint(absPath) { + const pkgJson = this._lookupPackageJson(absPath); + // Similar to logic in PackageSource#_findSources. + return pkgJson && ( + typeof pkgJson.module === "string" || + pkgJson.type === "module" + ); + } + + _lookupPackageJson(absPath) { + const relDir = pathRelative( + this.sourceRoot, + pathDirname(absPath), + ); + + if (relDir.startsWith("..")) { + const absParts = absPath.split("/"); + absParts.pop(); // Get rid of base filename. + const nmi = absParts.lastIndexOf("node_modules"); + return optimisticLookupPackageJson( + absParts.slice(0, nmi + 1).join("/"), + absParts.slice(nmi + 1).join("/"), + ); + } + + return optimisticLookupPackageJson(this.sourceRoot, relDir); + } + // Similar to logic in Module.prototype.useNode as defined in // packages/modules-runtime/server.js. Introduced to fix issue #10122. _shouldUseNode(absModuleId) { From ee09e22bded757ba44be9d17607b1ddec0672476 Mon Sep 17 00:00:00 2001 From: Timo Schneider Date: Mon, 17 Jun 2019 18:38:05 +0200 Subject: [PATCH 057/327] Add missing dot in query parameter (#10581) So that emails from other users are not exposed. --- packages/accounts-google/google.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/accounts-google/google.js b/packages/accounts-google/google.js index 7f2b0b0c51..4cb72d3b23 100644 --- a/packages/accounts-google/google.js +++ b/packages/accounts-google/google.js @@ -50,7 +50,7 @@ if (Meteor.isClient) { Google.whitelistedFields.filter( field => field !== 'email' && field !== 'verified_email' ).map( - subfield => `services.google${subfield}` + subfield => `services.google.${subfield}` ), }); } From d0de6e1176a33f32983a5020665c6a82c0d73027 Mon Sep 17 00:00:00 2001 From: zodern Date: Mon, 17 Jun 2019 09:51:33 -0700 Subject: [PATCH 058/327] Add assets to watchSet, again (#10565) Follow-up to #10452. --- tools/isobuild/compiler.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tools/isobuild/compiler.js b/tools/isobuild/compiler.js index 086310dc60..78b76ac119 100644 --- a/tools/isobuild/compiler.js +++ b/tools/isobuild/compiler.js @@ -479,8 +479,9 @@ var compileUnibuild = Profile(function (options) { const relPath = asset.relPath; const absPath = files.pathResolve(inputSourceArch.sourceRoot, relPath); - const hash = optimisticHashOrNull(absPath) - const contents = optimisticReadFile(absPath) + const hash = optimisticHashOrNull(absPath); + const contents = optimisticReadFile(absPath); + watchSet.addFile(absPath, hash); addAsset(contents, relPath, hash); }); From ce14282304fb2c575bd85ab8c4083380868e268b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Filipe=20N=C3=A9vola?= Date: Wed, 19 Jun 2019 19:07:26 +0200 Subject: [PATCH 059/327] Enable running multiple Cordova apps from same application source (#10577) Fixes #10576. --- History.md | 13 +++++++++++++ tools/cli/commands.js | 29 +++++++++++++++++++++++------ tools/cli/help.txt | 15 +++++++++++++++ tools/cordova/builder.js | 22 +++++++++++++--------- tools/cordova/project.js | 2 ++ tools/tests/cordova-run.js | 7 +++++++ 6 files changed, 73 insertions(+), 15 deletions(-) diff --git a/History.md b/History.md index c415b5d0ea..601f174a4e 100644 --- a/History.md +++ b/History.md @@ -1,5 +1,18 @@ ## v.NEXT +### Breaking changes +N/A + +### Migration Steps +N/A + +### Changes + +* Add `--cordova-server-port` option to override local port where Cordova will + serve static resources, which is useful when multiple Cordova apps are built + from the same application source code, since by default the port is generated + using the ID from the application's `.meteor/.id` file. + ## v1.8.1, 2019-04-03 ### Breaking changes diff --git a/tools/cli/commands.js b/tools/cli/commands.js index 8b7b18c65d..d43ccbf07d 100644 --- a/tools/cli/commands.js +++ b/tools/cli/commands.js @@ -82,7 +82,9 @@ export function parseServerOptionsForRunCommand(options, runTargets) { isRunOnDeviceRequested); } - return { parsedServerUrl, parsedMobileServerUrl }; + const parsedCordovaServerPort = parseCordovaServerPortOption(options); + + return { parsedServerUrl, parsedMobileServerUrl, parsedCordovaServerPort }; } function parsePortOption(portOption) { @@ -110,6 +112,11 @@ function parseMobileServerOption(mobileServerOption, return parsedMobileServerUrl; } +function parseCordovaServerPortOption(options = {}) { + const cordovaServerPortOption = options['cordova-server-port']; + return cordovaServerPortOption ? parseInt(cordovaServerPortOption, 10) : null; +} + function detectMobileServerUrl(parsedServerUrl, isRunOnDeviceRequested) { // Always try to use an auto-detected IP first try { @@ -290,6 +297,7 @@ var runCommandOptions = { options: { port: { type: String, short: "p", default: DEFAULT_PORT }, 'mobile-server': { type: String }, + 'cordova-server-port': { type: String }, // XXX COMPAT WITH 0.9.2.2 'mobile-port': { type: String }, 'app-port': { type: String }, @@ -326,7 +334,7 @@ function doRunCommand(options) { // Additional args are interpreted as run targets const runTargets = parseRunTargets(options.args); - const { parsedServerUrl, parsedMobileServerUrl } = + const { parsedServerUrl, parsedMobileServerUrl, parsedCordovaServerPort } = parseServerOptionsForRunCommand(options, runTargets); var includePackages = []; @@ -401,7 +409,8 @@ function doRunCommand(options) { main.captureAndExit('', 'preparing Cordova project', () => { const cordovaProject = new CordovaProject(projectContext, { settingsFile: options.settings, - mobileServerUrl: utils.formatUrl(parsedMobileServerUrl) }); + mobileServerUrl: utils.formatUrl(parsedMobileServerUrl), + cordovaServerPort: parsedCordovaServerPort }); if (buildmessage.jobHasMessages()) return; cordovaRunner = new CordovaRunner(cordovaProject, runTargets); @@ -431,6 +440,7 @@ function doRunCommand(options) { mongoUrl: process.env.MONGO_URL, oplogUrl: process.env.MONGO_OPLOG_URL, mobileServerUrl: utils.formatUrl(parsedMobileServerUrl), + cordovaServerPort: parsedCordovaServerPort, once: options.once, noReleaseCheck: options['no-release-check'] || process.env.METEOR_NO_RELEASE_CHECK, cordovaRunner: cordovaRunner @@ -888,6 +898,7 @@ var buildCommands = { "server-only": { type: Boolean }, 'mobile-settings': { type: String }, server: { type: String }, + "cordova-server-port": { type: String }, // XXX COMPAT WITH 0.9.2.2 "mobile-port": { type: String }, // Indicates whether these build is running headless, e.g. in a @@ -986,6 +997,7 @@ var buildCommand = function (options) { let cordovaPlatforms; let parsedMobileServerUrl; + let parsedCordovaServerPort; if (!serverOnly) { cordovaPlatforms = projectContext.platformList.getCordovaPlatforms(); @@ -1008,6 +1020,7 @@ on an OS X system."); } parsedMobileServerUrl = parseMobileServerOption(mobileServerOption, 'server'); + parsedCordovaServerPort = parseCordovaServerPortOption(options); } } else { cordovaPlatforms = []; @@ -1096,7 +1109,8 @@ ${Console.command("meteor build ../output")}`, cordovaProject = new CordovaProject(projectContext, { settingsFile: options.settings, - mobileServerUrl: utils.formatUrl(parsedMobileServerUrl) }); + mobileServerUrl: utils.formatUrl(parsedMobileServerUrl), + cordovaServerPort: parsedCordovaServerPort }); if (buildmessage.jobHasMessages()) return; const pluginVersions = pluginVersionsFromStarManifest( @@ -1550,6 +1564,7 @@ testCommandOptions = { options: { port: { type: String, short: "p", default: DEFAULT_PORT }, 'mobile-server': { type: String }, + 'cordova-server-port': { type: String }, // XXX COMPAT WITH 0.9.2.2 'mobile-port': { type: String }, 'debug-port': { type: String }, @@ -1648,7 +1663,7 @@ function doTestCommand(options) { const runTargets = parseRunTargets(_.intersection( Object.keys(options), ['ios', 'ios-device', 'android', 'android-device'])); - const { parsedServerUrl, parsedMobileServerUrl } = + const { parsedServerUrl, parsedMobileServerUrl, parsedCordovaServerPort } = parseServerOptionsForRunCommand(options, runTargets); // Make a temporary app dir (based on the test runner app). This will be @@ -1865,7 +1880,8 @@ function doTestCommand(options) { const cordovaProject = new CordovaProject(projectContext, { settingsFile: options.settings, - mobileServerUrl: utils.formatUrl(parsedMobileServerUrl) }); + mobileServerUrl: utils.formatUrl(parsedMobileServerUrl), + cordovaServerPort: parsedCordovaServerPort }); if (buildmessage.jobHasMessages()) return; cordovaRunner = new CordovaRunner(cordovaProject, runTargets); @@ -1884,6 +1900,7 @@ function doTestCommand(options) { options, { mobileServerUrl: utils.formatUrl(parsedMobileServerUrl), + cordovaServerPort: parsedCordovaServerPort, proxyPort: parsedServerUrl.port, proxyHost: parsedServerUrl.hostname, } diff --git a/tools/cli/help.txt b/tools/cli/help.txt index d359e87cae..300f04e704 100644 --- a/tools/cli/help.txt +++ b/tools/cli/help.txt @@ -83,6 +83,11 @@ Options: Defaults to your local IP and the port that the Meteor server binds to. Can include a URL scheme (for example, --mobile-server=https://example.com:443). + --cordova-server-port + Local port where Cordova will serve the content. It's + important when multiple Cordova apps are build from the same + Meteor app source code as by default the port is generated + using the id inside .meteor/.id file. --production Simulate production mode. Minify and bundle CSS and JS files. --raw-logs Run without parsing logs from stdout and stderr. --settings, -s Set optional data for Meteor.settings on the server. @@ -598,6 +603,11 @@ Options: port that the Meteor server binds to. Can include a URL scheme (for example, --mobile-server=https://example.com:443). + --cordova-server-port + Local port where Cordova will serve the content. It's + important when multiple Cordova apps are build from the same + Meteor app source code as by default the port is generated + using the id inside .meteor/.id file. --production Simulate production mode. Minify and bundle CSS, JS files. --settings, -s Set optional data for Meteor.settings on the server @@ -682,6 +692,11 @@ Options: port that the Meteor server binds to. Can include a URL scheme (for example, --mobile-server=https://example.com:443). + --cordova-server-port + Local port where Cordova will serve the content. It's + important when multiple Cordova apps are build from the same + Meteor app source code as by default the port is generated + using the id inside .meteor/.id file. --raw-logs Run without parsing logs from stdout and stderr. --settings, -s Set optional data for Meteor.settings on the server diff --git a/tools/cordova/builder.js b/tools/cordova/builder.js index 1c77569b20..8de83b8180 100644 --- a/tools/cordova/builder.js +++ b/tools/cordova/builder.js @@ -91,14 +91,18 @@ export class CordovaBuilder { } initalizeDefaults() { - // Convert the appId (a base 36 string) to a number - const appIdAsNumber = parseInt(this.projectContext.appIdentifier, 36); - // We use the appId to choose a local server port between 12000-13000. - // This range should be large enough to avoid collisions with other - // Meteor apps, and has also been chosen to avoid collisions - // with other apps or services on the device (although this can never be - // guaranteed). - const localServerPort = 12000 + (appIdAsNumber % 1000); + let { cordovaServerPort } = this.options; + // if --cordova-server-port is not present on run command + if (!cordovaServerPort) { + // Convert the appId (a base 36 string) to a number + const appIdAsNumber = parseInt(this.projectContext.appIdentifier, 36); + // We use the appId to choose a local server port between 12000-13000. + // This range should be large enough to avoid collisions with other + // Meteor apps, and has also been chosen to avoid collisions + // with other apps or services on the device (although this can never be + // guaranteed). + cordovaServerPort = 12000 + (appIdAsNumber % 1000); + } this.metadata = { id: 'com.id' + this.projectContext.appIdentifier, @@ -109,7 +113,7 @@ export class CordovaBuilder { author: 'A Meteor Developer', email: 'n/a', website: 'n/a', - contentUrl: `http://localhost:${localServerPort}/` + contentUrl: `http://localhost:${cordovaServerPort}/` }; // Set some defaults different from the Cordova defaults diff --git a/tools/cordova/project.js b/tools/cordova/project.js index d543c05116..e4c106ac1a 100644 --- a/tools/cordova/project.js +++ b/tools/cordova/project.js @@ -152,6 +152,7 @@ outdated platforms`); this.projectContext, templatePath, { mobileServerUrl: this.options.mobileServerUrl, + cordovaServerPort: this.options.cordovaServerPort, settingsFile: this.options.settingsFile } ); @@ -226,6 +227,7 @@ outdated platforms`); this.projectContext, this.projectRoot, { mobileServerUrl: this.options.mobileServerUrl, + cordovaServerPort: this.options.cordovaServerPort, settingsFile: this.options.settingsFile } ); diff --git a/tools/tests/cordova-run.js b/tools/tests/cordova-run.js index e0bc2b353d..bbdeb98e69 100644 --- a/tools/tests/cordova-run.js +++ b/tools/tests/cordova-run.js @@ -44,4 +44,11 @@ selftest.define('get mobile server argument for meteor run', ['cordova'], functi port: "example.com:3000", "mobile-server": "http://example.com:4000" }).parsedMobileServerUrl, { hostname: "example.com", port: "4000", protocol: "http" }); + + // meteor run -p example.com:3000 --cordova-server-port 12500 => + // cordovaServerPort should be 12500 + selftest.expectEqual(parseServerOptionsForRunCommand({ + port: "example.com:3000", + "cordova-server-port": "12500" + }).parsedCordovaServerPort, 12500); }); From bf24ef3cb67ae05bf13b66d51ad7b72ce6c06612 Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Wed, 19 Jun 2019 13:14:01 -0400 Subject: [PATCH 060/327] Bump patch version of accounts-google package to 1.3.3. --- packages/accounts-google/package.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/accounts-google/package.js b/packages/accounts-google/package.js index 31a383a3cb..7ec6309d8c 100644 --- a/packages/accounts-google/package.js +++ b/packages/accounts-google/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Login service for Google accounts", - version: "1.3.2", + version: "1.3.3", }); Package.onUse(api => { From 830c13b28734938008219ff14ec22339800154c2 Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Wed, 19 Jun 2019 13:20:02 -0400 Subject: [PATCH 061/327] Bump package versions for 1.8.2-beta.5 release. --- packages/context/package.js | 2 +- packages/meteor-tool/package.js | 2 +- packages/modules-runtime/package.js | 2 +- scripts/admin/meteor-release-experimental.json | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/context/package.js b/packages/context/package.js index 1d52949972..fa5dee1fb7 100644 --- a/packages/context/package.js +++ b/packages/context/package.js @@ -1,6 +1,6 @@ Package.describe({ name: "context", - version: "0.4.0-beta182.4", + version: "0.4.0-beta182.5", summary: "Manage contextual information without passing objects around", documentation: "README.md" }); diff --git a/packages/meteor-tool/package.js b/packages/meteor-tool/package.js index e7a8ec06ea..b1ae510a21 100644 --- a/packages/meteor-tool/package.js +++ b/packages/meteor-tool/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "The Meteor command-line tool", - version: '1.8.2-beta.4' + version: '1.8.2-beta.5' }); Package.includeTool(); diff --git a/packages/modules-runtime/package.js b/packages/modules-runtime/package.js index aa4cb050cd..0746b2fb80 100644 --- a/packages/modules-runtime/package.js +++ b/packages/modules-runtime/package.js @@ -1,6 +1,6 @@ Package.describe({ name: "modules-runtime", - version: "0.11.0-beta182.4", + version: "0.11.0-beta182.5", summary: "CommonJS module system", git: "https://github.com/benjamn/install", documentation: "README.md" diff --git a/scripts/admin/meteor-release-experimental.json b/scripts/admin/meteor-release-experimental.json index 8078d329ca..f8adc50125 100644 --- a/scripts/admin/meteor-release-experimental.json +++ b/scripts/admin/meteor-release-experimental.json @@ -1,6 +1,6 @@ { "track": "METEOR", - "version": "1.8.2-beta.4", + "version": "1.8.2-beta.5", "recommended": false, "official": false, "description": "Meteor" From 330a6cfe3d9065e579c04683ffdf8c71bf197234 Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Wed, 19 Jun 2019 20:24:23 -0400 Subject: [PATCH 062/327] Update ecmascript-runtime-{client,server} to use core-js@3.1.4. (#10588) * Update ecmascript-runtime-{client,server} to core-js@3.1.4. Also added a polyfill for Symbol.asyncIterator to server, modern, and legacy, which should fix #9897. * Add a test of for-await-of async iteration. This should verify that #9897 is fixed. --- History.md | 3 + .../.npm/package/npm-shrinkwrap.json | 6 +- packages/ecmascript-runtime-client/legacy.js | 67 +++++++------------ packages/ecmascript-runtime-client/modern.js | 23 ++++--- packages/ecmascript-runtime-client/package.js | 4 +- .../.npm/package/npm-shrinkwrap.json | 6 +- packages/ecmascript-runtime-server/package.js | 4 +- packages/ecmascript-runtime-server/runtime.js | 5 +- packages/ecmascript-runtime/package.js | 2 +- packages/ecmascript-runtime/runtime-tests.js | 27 ++++++++ 10 files changed, 80 insertions(+), 67 deletions(-) diff --git a/History.md b/History.md index 6b5d482cc3..c3827515d2 100644 --- a/History.md +++ b/History.md @@ -13,6 +13,9 @@ N/A * The `meteor-babel` npm package has been updated to version 7.4.3. +* The `core-js` npm package used by `ecmascript-runtime-client` and + `ecmascript-runtime-server` has been updated to version 3.1.4. + * When bundling client code, the Meteor module system now prefers the `"module"` field in `package.json`, if defined. Additionally, npm packages with a `"module"` entry point will now be compiled diff --git a/packages/ecmascript-runtime-client/.npm/package/npm-shrinkwrap.json b/packages/ecmascript-runtime-client/.npm/package/npm-shrinkwrap.json index beaf178041..79e8c3e339 100644 --- a/packages/ecmascript-runtime-client/.npm/package/npm-shrinkwrap.json +++ b/packages/ecmascript-runtime-client/.npm/package/npm-shrinkwrap.json @@ -2,9 +2,9 @@ "lockfileVersion": 1, "dependencies": { "core-js": { - "version": "2.5.7", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.5.7.tgz", - "integrity": "sha512-RszJCAxg/PP6uzXVXL6BsxSXx/B05oJAQ2vkJRjyjrEcNVycaqOmNb5OTxZPE3xa5gwZduqza6L9JOCenh/Ecw==" + "version": "3.1.4", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.1.4.tgz", + "integrity": "sha512-YNZN8lt82XIMLnLirj9MhKDFZHalwzzrL9YLt6eb0T5D0EDl4IQ90IGkua8mHbnxNrkj1d8hbdizMc0Qmg1WnQ==" } } } diff --git a/packages/ecmascript-runtime-client/legacy.js b/packages/ecmascript-runtime-client/legacy.js index 51eded6eeb..20a6d8fb3a 100644 --- a/packages/ecmascript-runtime-client/legacy.js +++ b/packages/ecmascript-runtime-client/legacy.js @@ -1,16 +1,7 @@ try { - require("core-js/modules/es6.symbol"); - require("core-js/modules/es6.map"); - require("core-js/modules/es6.set"); - - var core = function () { - try { - return require("core-js/modules/_core"); - } catch (e) { - // Older versions of core-js had a different file layout. - return require("core-js/modules/$.core"); - } - }(); + Symbol = exports.Symbol = require("core-js/es/symbol"); + Map = exports.Map = require("core-js/es/map"); + Set = exports.Set = require("core-js/es/set"); } catch (e) { throw new Error([ @@ -22,19 +13,15 @@ try { ].join("\n")); } -Symbol = exports.Symbol = core.Symbol; -Map = exports.Map = core.Map; -Set = exports.Set = core.Set; - // ECMAScript 2015 polyfills. -require("core-js/es6/array"); -require("core-js/es6/function"); -require("core-js/es6/math"); -require("core-js/es6/object"); -require("core-js/es6/regexp"); -require("core-js/es6/string"); -require("core-js/es6/weak-map"); -require("core-js/es6/weak-set"); +require("core-js/es/array"); +require("core-js/es/function"); +require("core-js/es/math"); +require("core-js/es/object"); +require("core-js/es/regexp"); +require("core-js/es/string"); +require("core-js/es/weak-map"); +require("core-js/es/weak-set"); // If the Reflect global namespace is missing or undefined, explicitly // initialize it as undefined, so that expressions like _typeof(Reflect) @@ -43,26 +30,20 @@ if (typeof Reflect === "undefined") { global.Reflect = void 0; } -// ECMAScript 2017 polyfills. -require("core-js/es7/array"); -require("core-js/es7/object"); -require("core-js/modules/es7.string.pad-start"); -require("core-js/modules/es7.string.pad-end"); - -// We want everything from the core-js/es6/number module except -// es6.number.constructor. -require('core-js/modules/es6.number.epsilon'); -require('core-js/modules/es6.number.is-finite'); -require('core-js/modules/es6.number.is-integer'); -require('core-js/modules/es6.number.is-nan'); -require('core-js/modules/es6.number.is-safe-integer'); -require('core-js/modules/es6.number.max-safe-integer'); -require('core-js/modules/es6.number.min-safe-integer'); -require('core-js/modules/es6.number.parse-float'); -require('core-js/modules/es6.number.parse-int'); +// We want everything from the core-js/es/number module except +// es.number.constructor. +require('core-js/modules/es.number.epsilon'); +require('core-js/modules/es.number.is-finite'); +require('core-js/modules/es.number.is-integer'); +require('core-js/modules/es.number.is-nan'); +require('core-js/modules/es.number.is-safe-integer'); +require('core-js/modules/es.number.max-safe-integer'); +require('core-js/modules/es.number.min-safe-integer'); +require('core-js/modules/es.number.parse-float'); +require('core-js/modules/es.number.parse-int'); // Typed Arrays -require('core-js/modules/es6.typed.uint8-array'); -require('core-js/modules/es6.typed.uint32-array'); +require('core-js/modules/es.typed-array.uint8-array'); +require('core-js/modules/es.typed-array.uint32-array'); require("./modern.js"); diff --git a/packages/ecmascript-runtime-client/modern.js b/packages/ecmascript-runtime-client/modern.js index bab39848af..6b429bdb14 100644 --- a/packages/ecmascript-runtime-client/modern.js +++ b/packages/ecmascript-runtime-client/modern.js @@ -1,5 +1,5 @@ try { - require("core-js/modules/es7.object.get-own-property-descriptors"); + require("core-js/modules/es.object.get-own-property-descriptors"); } catch (e) { throw new Error([ "The core-js npm package could not be found in your node_modules ", @@ -10,13 +10,14 @@ try { ].join("\n")); } -require("core-js/modules/es6.object.is"); -require("core-js/modules/es6.function.name"); -require("core-js/modules/es6.number.is-finite"); -require("core-js/modules/es6.number.is-nan"); -require("core-js/modules/es7.array.flatten"); -require("core-js/modules/es7.array.flat-map"); -require("core-js/modules/es7.object.values"); -require("core-js/modules/es7.object.entries"); -require("core-js/modules/es7.string.pad-start"); -require("core-js/modules/es7.string.pad-end"); +require("core-js/modules/es.object.is"); +require("core-js/modules/es.function.name"); +require("core-js/modules/es.number.is-finite"); +require("core-js/modules/es.number.is-nan"); +require("core-js/modules/es.array.flat"); +require("core-js/modules/es.array.flat-map"); +require("core-js/modules/es.object.values"); +require("core-js/modules/es.object.entries"); +require("core-js/modules/es.string.pad-start"); +require("core-js/modules/es.string.pad-end"); +require("core-js/modules/es.symbol.async-iterator"); diff --git a/packages/ecmascript-runtime-client/package.js b/packages/ecmascript-runtime-client/package.js index 380772d47a..a84a617ebc 100644 --- a/packages/ecmascript-runtime-client/package.js +++ b/packages/ecmascript-runtime-client/package.js @@ -1,13 +1,13 @@ Package.describe({ name: "ecmascript-runtime-client", - version: "0.8.0", + version: "0.9.0", summary: "Polyfills for new ECMAScript 2015 APIs like Map and Set", git: "https://github.com/meteor/meteor/tree/devel/packages/ecmascript-runtime-client", documentation: "README.md" }); Npm.depends({ - "core-js": "2.5.7" + "core-js": "3.1.4" }); Package.onUse(function(api) { diff --git a/packages/ecmascript-runtime-server/.npm/package/npm-shrinkwrap.json b/packages/ecmascript-runtime-server/.npm/package/npm-shrinkwrap.json index beaf178041..79e8c3e339 100644 --- a/packages/ecmascript-runtime-server/.npm/package/npm-shrinkwrap.json +++ b/packages/ecmascript-runtime-server/.npm/package/npm-shrinkwrap.json @@ -2,9 +2,9 @@ "lockfileVersion": 1, "dependencies": { "core-js": { - "version": "2.5.7", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.5.7.tgz", - "integrity": "sha512-RszJCAxg/PP6uzXVXL6BsxSXx/B05oJAQ2vkJRjyjrEcNVycaqOmNb5OTxZPE3xa5gwZduqza6L9JOCenh/Ecw==" + "version": "3.1.4", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.1.4.tgz", + "integrity": "sha512-YNZN8lt82XIMLnLirj9MhKDFZHalwzzrL9YLt6eb0T5D0EDl4IQ90IGkua8mHbnxNrkj1d8hbdizMc0Qmg1WnQ==" } } } diff --git a/packages/ecmascript-runtime-server/package.js b/packages/ecmascript-runtime-server/package.js index e74d53dcd2..408e5ecd7e 100644 --- a/packages/ecmascript-runtime-server/package.js +++ b/packages/ecmascript-runtime-server/package.js @@ -1,13 +1,13 @@ Package.describe({ name: "ecmascript-runtime-server", - version: "0.7.1", + version: "0.8.0", summary: "Polyfills for new ECMAScript 2015 APIs like Map and Set", git: "https://github.com/meteor/meteor/tree/devel/packages/ecmascript-runtime-client", documentation: "README.md" }); Npm.depends({ - "core-js": "2.5.7" + "core-js": "3.1.4" }); Package.onUse(function(api) { diff --git a/packages/ecmascript-runtime-server/runtime.js b/packages/ecmascript-runtime-server/runtime.js index 692255ae78..323621e86c 100644 --- a/packages/ecmascript-runtime-server/runtime.js +++ b/packages/ecmascript-runtime-server/runtime.js @@ -21,5 +21,6 @@ // Note that the es6.reflect.* and es6.typed.* modules have been commented // out for bundle size reasons. -require("core-js/modules/es7.string.pad-start"); -require("core-js/modules/es7.string.pad-end"); +require("core-js/modules/es.string.pad-start"); +require("core-js/modules/es.string.pad-end"); +require("core-js/modules/es.symbol.async-iterator"); diff --git a/packages/ecmascript-runtime/package.js b/packages/ecmascript-runtime/package.js index 6f2e54e0f0..fd4a38be77 100644 --- a/packages/ecmascript-runtime/package.js +++ b/packages/ecmascript-runtime/package.js @@ -14,7 +14,7 @@ Package.onUse(function(api) { Package.onTest(function(api) { api.use("tinytest"); api.use("check"); + api.use("ecmascript"); api.use("es5-shim"); - api.use("ecmascript-runtime"); api.addFiles("runtime-tests.js"); }); diff --git a/packages/ecmascript-runtime/runtime-tests.js b/packages/ecmascript-runtime/runtime-tests.js index e08dd129e6..5e4c09785b 100644 --- a/packages/ecmascript-runtime/runtime-tests.js +++ b/packages/ecmascript-runtime/runtime-tests.js @@ -124,3 +124,30 @@ Tinytest.add("core-js - Function", function (test) { test.equal(Constructor[Symbol.hasInstance](new Constructor), true); test.equal(Constructor[Symbol.hasInstance]({}), false); }); + +Tinytest.addAsync("async iterators", async test => { + class Range { + constructor(limit) { + this.limit = limit; + } + + [Symbol.asyncIterator]() { + const promises = []; + for (let value = 1; value <= this.limit; ++value) { + promises.push(Promise.resolve({ value, done: false })); + } + + return { + next() { + return promises.shift() || Promise.resolve({ done: true }); + } + }; + } + } + + let sum = 0; + for await (const n of new Range(10)) { + sum += n; + } + test.equal(sum, (10 * 11) / 2); +}); From a2f5e1c3e584826bb7ef288fe193154c34efd22f Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Fri, 17 May 2019 12:27:53 -0400 Subject: [PATCH 063/327] Make PackageSourceBatch ResourceSlot creation more reusable. --- tools/isobuild/compiler-plugin.js | 106 ++++++++++++++++-------------- 1 file changed, 56 insertions(+), 50 deletions(-) diff --git a/tools/isobuild/compiler-plugin.js b/tools/isobuild/compiler-plugin.js index a9ae6d485f..4af5226d97 100644 --- a/tools/isobuild/compiler-plugin.js +++ b/tools/isobuild/compiler-plugin.js @@ -1056,42 +1056,12 @@ export class PackageSourceBatch { self.importExtensions = [".js", ".json"]; self._nodeModulesPaths = null; - var sourceProcessorSet = self._getSourceProcessorSet(); - self.resourceSlots = []; - unibuild.resources.forEach(function (resource) { - let sourceProcessor = null; - if (resource.type === "source") { - var extension = resource.extension; - if (extension === null) { - const filename = files.pathBasename(resource.path); - sourceProcessor = sourceProcessorSet.getByFilename(filename); - if (! sourceProcessor) { - buildmessage.error( - `no plugin found for ${ resource.path } in ` + - `${ unibuild.pkg.displayName() }; a plugin for ${ filename } ` + - `was active when it was published but none is now`); - return; - // recover by ignoring - } - } else { - sourceProcessor = sourceProcessorSet.getByExtension(extension); - // If resource.extension === 'js', it's ok for there to be no - // sourceProcessor, since we #HardcodeJs in ResourceSlot. - if (! sourceProcessor && extension !== 'js') { - buildmessage.error( - `no plugin found for ${ resource.path } in ` + - `${ unibuild.pkg.displayName() }; a plugin for *.${ extension } ` + - `was active when it was published but none is now`); - return; - // recover by ignoring - } - - self.addImportExtension(extension); - } + unibuild.resources.forEach(resource => { + const slot = self.makeResourceSlot(resource); + if (slot) { + self.resourceSlots.push(slot); } - - self.resourceSlots.push(new ResourceSlot(resource, sourceProcessor, self)); }); // Compute imports by merging the exports of all of the packages we @@ -1141,6 +1111,41 @@ export class PackageSourceBatch { } : null; } + makeResourceSlot(resource) { + let sourceProcessor = null; + if (resource.type === "source") { + var extension = resource.extension; + if (extension === null) { + const filename = files.pathBasename(resource.path); + sourceProcessor = this._getSourceProcessorSet().getByFilename(filename); + if (! sourceProcessor) { + buildmessage.error( + `no plugin found for ${ resource.path } in ` + + `${ this.unibuild.pkg.displayName() }; a plugin for ${ filename } ` + + `was active when it was published but none is now`); + return null; + // recover by ignoring + } + } else { + sourceProcessor = this._getSourceProcessorSet().getByExtension(extension); + // If resource.extension === 'js', it's ok for there to be no + // sourceProcessor, since we #HardcodeJs in ResourceSlot. + if (! sourceProcessor && extension !== 'js') { + buildmessage.error( + `no plugin found for ${ resource.path } in ` + + `${ this.unibuild.pkg.displayName() }; a plugin for *.${ extension } ` + + `was active when it was published but none is now`); + return null; + // recover by ignoring + } + + this.addImportExtension(extension); + } + } + + return new ResourceSlot(resource, sourceProcessor, this); + } + addImportExtension(extension) { extension = extension.toLowerCase(); @@ -1181,26 +1186,27 @@ export class PackageSourceBatch { } _getSourceProcessorSet() { - const self = this; + if (! this._sourceProcessorSet) { + buildmessage.assertInJob(); - buildmessage.assertInJob(); + const isopack = this.unibuild.pkg; + const activePluginPackages = compiler.getActivePluginPackages(isopack, { + uses: this.unibuild.uses, + isopackCache: this.processor.isopackCache + }); - var isopack = self.unibuild.pkg; - const activePluginPackages = compiler.getActivePluginPackages(isopack, { - uses: self.unibuild.uses, - isopackCache: self.processor.isopackCache - }); - const sourceProcessorSet = new buildPluginModule.SourceProcessorSet( - isopack.displayName(), { hardcodeJs: true }); + this._sourceProcessorSet = new buildPluginModule.SourceProcessorSet( + isopack.displayName(), { hardcodeJs: true }); - _.each(activePluginPackages, function (otherPkg) { - otherPkg.ensurePluginsInitialized(); + _.each(activePluginPackages, otherPkg => { + otherPkg.ensurePluginsInitialized(); + this._sourceProcessorSet.merge(otherPkg.sourceProcessors.compiler, { + arch: this.processor.arch, + }); + }); + } - sourceProcessorSet.merge( - otherPkg.sourceProcessors.compiler, {arch: self.processor.arch}); - }); - - return sourceProcessorSet; + return this._sourceProcessorSet; } // Returns a map from package names to arrays of JS output files. From 9f88fa35c3d2e66aa64e24675af49eea73d90a6c Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Sun, 16 Jun 2019 18:59:43 -0400 Subject: [PATCH 064/327] Use full power of compiler plugins to compile unanticipated modules. Instead of merely supporting ECMAScript module syntax via Reify, we should really be compiling unanticipated modules (typically within node_modules) using the same logic that the rest of the application uses. Note: this processing applies only to .js files for now, since that's what the ImportScanner works with. Should help with #10563. --- tools/isobuild/compiler-plugin.js | 56 +++++++++++++++++++++++++------ tools/isobuild/import-scanner.js | 21 ++++++++++++ 2 files changed, 67 insertions(+), 10 deletions(-) diff --git a/tools/isobuild/compiler-plugin.js b/tools/isobuild/compiler-plugin.js index 4af5226d97..be9f762546 100644 --- a/tools/isobuild/compiler-plugin.js +++ b/tools/isobuild/compiler-plugin.js @@ -288,19 +288,10 @@ class InputFile extends buildPluginModule.InputFile { } readAndWatchFileWithHash(path) { - const osPath = files.convertToOSPath(path); - const sourceRoot = this.getSourceRoot(); - const relPath = files.pathRelative(sourceRoot, osPath); - if (relPath.startsWith("..")) { - throw new Error( - `Attempting to read file outside ${ - this.getPackageName() || "the app"}: ${osPath}` - ); - } const sourceBatch = this._resourceSlot.packageSourceBatch; return readAndWatchFileWithHash( sourceBatch.unibuild.watchSet, - osPath + files.convertToOSPath(path), ); } @@ -1111,6 +1102,50 @@ export class PackageSourceBatch { } : null; } + compileOneJsResource(resource) { + const slot = this.makeResourceSlot({ + type: "source", + extension: "js", + // Need { data, path, hash } here, at least. + ...resource, + fileOptions: { + lazy: true, + ...resource.fileOptions, + } + }); + + if (slot) { + // If the resource was not handled by a source processor, it will be + // added directly to slot.jsOutputResources by makeResourceSlot, + // meaning we do not need to compile it. + if (slot.jsOutputResources.length > 0) { + return slot.jsOutputResources + } + + const inputFile = new InputFile(slot); + inputFile.supportsLazyCompilation = false; + + if (slot.sourceProcessor) { + const { userPlugin } = slot.sourceProcessor; + if (userPlugin) { + const markedMethod = buildmessage.markBoundary( + userPlugin.processFilesForTarget, + userPlugin + ); + try { + Promise.await(markedMethod([inputFile])); + } catch (e) { + buildmessage.exception(e); + } + } + } + + return slot.jsOutputResources; + } + + return []; + } + makeResourceSlot(resource) { let sourceProcessor = null; if (resource.type === "source") { @@ -1308,6 +1343,7 @@ export class PackageSourceBatch { sourceRoot: batch.sourceRoot, nodeModulesPaths, watchSet: batch.unibuild.watchSet, + compileOneJsResource: batch.compileOneJsResource.bind(batch), cacheDir: batch.scannerCacheDir, }); diff --git a/tools/isobuild/import-scanner.js b/tools/isobuild/import-scanner.js index ec9b843b55..248b62dbac 100644 --- a/tools/isobuild/import-scanner.js +++ b/tools/isobuild/import-scanner.js @@ -77,9 +77,16 @@ const reifyCompileWithCache = wrap(function ({ dataString }) { class DefaultHandlers { constructor({ + sourceRoot, cacheDir, bundleArch, + compileOneJsResource, }) { + Object.assign(this, { + sourceRoot, + compileOneJsResource, + }); + if (cacheDir) { mkdir_p(this.cacheDir = pathJoin( cacheDir, @@ -93,6 +100,17 @@ class DefaultHandlers { } js(file) { + if (this.compileOneJsResource) { + const jsOutputResources = this.compileOneJsResource({ + data: file.data, + path: pathRelative(this.sourceRoot, file.absPath), + hash: file.hash, + }); + if (jsOutputResources.length > 0) { + return jsOutputResources[0].data.toString("utf8"); + } + } + if (this.cacheDir) { const cacheFileName = this.getCacheFileName(file); try { @@ -237,6 +255,7 @@ export default class ImportScanner { nodeModulesPaths = [], watchSet, cacheDir, + compileOneJsResource, }) { assert.ok(isString(sourceRoot)); @@ -253,8 +272,10 @@ export default class ImportScanner { this.outputFiles = []; this.defaultHandlers = new DefaultHandlers({ + sourceRoot, cacheDir, bundleArch, + compileOneJsResource, }); this.resolver = Resolver.getOrCreate({ From c7b886c5d9849fe761e532ba5181018df08db06e Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Sun, 16 Jun 2019 20:22:14 -0400 Subject: [PATCH 065/327] Nest cacheOptions in scope where used. --- packages/babel-compiler/babel-compiler.js | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/packages/babel-compiler/babel-compiler.js b/packages/babel-compiler/babel-compiler.js index 05e7a4a07f..bd4d3e9124 100644 --- a/packages/babel-compiler/babel-compiler.js +++ b/packages/babel-compiler/babel-compiler.js @@ -67,12 +67,6 @@ BCp.processOneFileForTarget = function (inputFile, source) { sourceMap: null, bare: !! fileOptions.bare }; - var cacheOptions = { - cacheDirectory: this.cacheDirectory, - cacheDeps: { - sourceHash: toBeAdded.hash, - }, - }; // If you need to exclude a specific file within a package from Babel // compilation, pass the { transpile: false } options to api.addFiles @@ -106,6 +100,13 @@ BCp.processOneFileForTarget = function (inputFile, source) { var babelOptions = Babel.getDefaultOptions(extraFeatures); babelOptions.caller = { name: "meteor", arch }; + const cacheOptions = { + cacheDirectory: this.cacheDirectory, + cacheDeps: { + sourceHash: toBeAdded.hash, + }, + }; + this.inferExtraBabelOptions( inputFile, babelOptions, From d21400567f713abf3bfd8d2145cb22c46f4dc5d2 Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Sun, 16 Jun 2019 20:23:13 -0400 Subject: [PATCH 066/327] Avoid double-compilation of @babel/runtime-related packages. Now that we have the ability to invoke Babel via compiler plugins for individual modules encountered by the ImportScanner, it's possible the ImportScanner will try to compile @babel/runtime/helpers/* modules. These modules are not safe to recompile because they use native syntax (such as typeof) in ways that do not need additional transformation or simulation, and would be broken by applying the usual Babel transforms. It may bother you that this list of packages is hard-coded, or that it might grow over time. To ease those concerns, I would say: 1. We can release new versions of the babel-compiler and ecmascript packages whenever we need to. 2. These particular npm packages belong in this list because Babel itself assumes they have already been compiled, so there shouldn't be (m)any other packages that fit that narrow criterion. In other words, this is just a list of packages that must be left untouched in order to bootstrap the Babel compiler system, and the babel-compiler package is where the details of that system primarily reside, so that's where we should put this list, until/unless we find a better solution. --- packages/babel-compiler/babel-compiler.js | 33 +++++++++++++++++++++-- 1 file changed, 31 insertions(+), 2 deletions(-) diff --git a/packages/babel-compiler/babel-compiler.js b/packages/babel-compiler/babel-compiler.js index bd4d3e9124..a62e676735 100644 --- a/packages/babel-compiler/babel-compiler.js +++ b/packages/babel-compiler/babel-compiler.js @@ -77,8 +77,7 @@ BCp.processOneFileForTarget = function (inputFile, source) { ! toBeAdded.bare && // If you need to exclude a specific file within an app from Babel // compilation, give it the following file extension: .es5.js - ! excludedFileExtensionPattern.test(inputFilePath)) { - + ! isInputFilePathExcluded(inputFilePath)) { var extraFeatures = Object.assign({}, this.extraFeatures); var arch = inputFile.getArch(); @@ -166,6 +165,36 @@ BCp.processOneFileForTarget = function (inputFile, source) { return toBeAdded; }; +function isInputFilePathExcluded(path) { + if (excludedFileExtensionPattern.test(path)) { + return true; + } + + const parts = path.split("/"); + const nmi = parts.lastIndexOf("node_modules"); + if (nmi >= 0) { + const part1 = parts[nmi + 1]; + // We trust that any code related to @babel/runtime has already been + // compiled adequately. The @babel/runtime/helpers/typeof module is a + // good example of why double-compilation is risky for these packages, + // since it uses native typeof syntax to implement its polyfill for + // Symbol-aware typeof, so compiling it again would cause the + // generated code to try to require itself. In general, compiling code + // more than once with Babel should be safe (just unnecessary), except + // for code that Babel itself relies upon at runtime. Finally, if this + // hard-coded list of package names proves to be incomplete, we can + // always add to it (or even replace it completely) by releasing a new + // version of the babel-compiler package. + if (part1 === "@babel" || + part1 === "core-js" || + part1 === "regenerator-runtime") { + return true; + } + } + + return false; +} + BCp.setDiskCacheDirectory = function (cacheDir) { this.cacheDirectory = cacheDir; }; From 88004d46490cef200d2c2302ee2aa44e67335e47 Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Mon, 17 Jun 2019 13:17:53 -0400 Subject: [PATCH 067/327] Add a basic regression test of issue #10563. --- tools/tests/apps/modules/package-lock.json | 5 +++++ tools/tests/apps/modules/package.json | 1 + tools/tests/apps/modules/tests.js | 12 ++++++++++++ 3 files changed, 18 insertions(+) diff --git a/tools/tests/apps/modules/package-lock.json b/tools/tests/apps/modules/package-lock.json index 1e2ac9d470..8bacd1665f 100644 --- a/tools/tests/apps/modules/package-lock.json +++ b/tools/tests/apps/modules/package-lock.json @@ -1350,6 +1350,11 @@ "resolved": "https://registry.npmjs.org/pend/-/pend-1.2.0.tgz", "integrity": "sha1-elfrVQpng/kRUzH89GY9XI4AelA=" }, + "pify": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", + "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==" + }, "process-nextick-args": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.0.tgz", diff --git a/tools/tests/apps/modules/package.json b/tools/tests/apps/modules/package.json index 294dd791b1..71e483a11c 100644 --- a/tools/tests/apps/modules/package.json +++ b/tools/tests/apps/modules/package.json @@ -22,6 +22,7 @@ "moment": "^2.22.2", "mssql": "^3.1.1", "mysql": "^2.15.0", + "pify": "^4.0.1", "puppeteer": "^1.6.2", "regenerator-runtime": "^0.11.1", "stripe": "^4.4.0", diff --git a/tools/tests/apps/modules/tests.js b/tools/tests/apps/modules/tests.js index 3dfe131957..7d9399f12f 100644 --- a/tools/tests/apps/modules/tests.js +++ b/tools/tests/apps/modules/tests.js @@ -682,3 +682,15 @@ describe("issue #10409", () => { assert.strictEqual(typeof action, "function"); }); }); + +describe("issue #10563", () => { + it("should be able to import pify@4.0.1 in legacy browsers", () => { + const pify = require("pify"); + assert.strictEqual(typeof pify, "function"); + const code = Function.prototype.toString.call(pify); + assert.strictEqual( + /\bconst\b/.test(code), + Meteor.isModern, + ); + }); +}); From de14b380c5f62ebb0dab2025017bdff0f104ca09 Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Wed, 19 Jun 2019 10:57:31 -0400 Subject: [PATCH 068/327] Update meteor-babel and reify to latest versions. --- .../.npm/package/npm-shrinkwrap.json | 292 +++++++++--------- packages/babel-compiler/package.js | 2 +- .../modules/.npm/package/npm-shrinkwrap.json | 23 +- packages/modules/package.js | 2 +- scripts/dev-bundle-tool-package.js | 4 +- 5 files changed, 163 insertions(+), 160 deletions(-) diff --git a/packages/babel-compiler/.npm/package/npm-shrinkwrap.json b/packages/babel-compiler/.npm/package/npm-shrinkwrap.json index a927664f22..8de8561872 100644 --- a/packages/babel-compiler/.npm/package/npm-shrinkwrap.json +++ b/packages/babel-compiler/.npm/package/npm-shrinkwrap.json @@ -7,9 +7,9 @@ "integrity": "sha512-OfC2uemaknXr87bdLUkWog7nYuliM9Ij5HUcajsVcMCpQrcLmtxRbVFTIqmcSkSeYRBFBRxs2FiUqFJDLdiebA==" }, "@babel/core": { - "version": "7.3.4", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.3.4.tgz", - "integrity": "sha512-jRsuseXBo9pN197KnDwhhaaBzyZr2oIcLHHTt2oDdQrej5Qp57dCCJafWx5ivU8/alEYDpssYqv1MUqcxwQlrA==", + "version": "7.4.5", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.4.5.tgz", + "integrity": "sha512-OvjIh6aqXtlsA8ujtGKfC7LYWksYSX8yQcM8Ay3LuvVeQ63lcOKgoZWVqcpFwkd29aYU9rVx7jxhfhiEDV9MZA==", "dependencies": { "json5": { "version": "2.1.0", @@ -19,9 +19,9 @@ } }, "@babel/generator": { - "version": "7.3.4", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.3.4.tgz", - "integrity": "sha512-8EXhHRFqlVVWXPezBW5keTiQi/rJMQTg/Y9uVCEZ0CAF3PKtCCaVRnp64Ii1ujhkoDhhF1fVsImoN4yJ2uz4Wg==" + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.4.4.tgz", + "integrity": "sha512-53UOLK6TVNqKxf7RUh8NE851EHRxOOeVXKbK2bivdb+iziMyk03Sr4eaE9OELCbyZAAafAKPDwF2TPUES5QbxQ==" }, "@babel/helper-annotate-as-pure": { "version": "7.0.0", @@ -39,19 +39,19 @@ "integrity": "sha512-MjA9KgwCuPEkQd9ncSXvSyJ5y+j2sICHyrI0M3L+6fnS4wMSNDc1ARXsbTfbb2cXHn17VisSnU/sHFTCxVxSMw==" }, "@babel/helper-call-delegate": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@babel/helper-call-delegate/-/helper-call-delegate-7.1.0.tgz", - "integrity": "sha512-YEtYZrw3GUK6emQHKthltKNZwszBcHK58Ygcis+gVUrF4/FmTVr5CCqQNSfmvg2y+YDEANyYoaLz/SHsnusCwQ==" + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@babel/helper-call-delegate/-/helper-call-delegate-7.4.4.tgz", + "integrity": "sha512-l79boDFJ8S1c5hvQvG+rc+wHw6IuH7YldmRKsYtpbawsxURu/paVy57FZMomGK22/JckepaikOkY0MoAmdyOlQ==" }, "@babel/helper-create-class-features-plugin": { - "version": "7.3.4", - "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.3.4.tgz", - "integrity": "sha512-uFpzw6L2omjibjxa8VGZsJUPL5wJH0zzGKpoz0ccBkzIa6C8kWNUbiBmQ0rgOKWlHJ6qzmfa6lTiGchiV8SC+g==" + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.4.4.tgz", + "integrity": "sha512-UbBHIa2qeAGgyiNR9RszVF7bUHEdgS4JAUNT8SiqrAN6YJVxlOxeLr5pBzb5kan302dejJ9nla4RyKcR1XT6XA==" }, "@babel/helper-define-map": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@babel/helper-define-map/-/helper-define-map-7.1.0.tgz", - "integrity": "sha512-yPPcW8dc3gZLN+U1mhYV91QU3n5uTbx7DUdf8NnPbjS0RMwBuHi9Xt2MUgppmNz7CJxTBWsGczTiEp1CSOTPRg==" + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@babel/helper-define-map/-/helper-define-map-7.4.4.tgz", + "integrity": "sha512-IX3Ln8gLhZpSuqHJSnTNBWGDE9kdkTEWl21A/K7PQ00tseBwbqCHTvNLHSBd9M0R5rER4h5Rsvj9vw0R5SieBg==" }, "@babel/helper-explode-assignable-expression": { "version": "7.1.0", @@ -69,9 +69,9 @@ "integrity": "sha512-r2DbJeg4svYvt3HOS74U4eWKsUAMRH01Z1ds1zx8KNTPtpTL5JAsdFv8BNyOpVqdFhHkkRDIg5B4AsxmkjAlmQ==" }, "@babel/helper-hoist-variables": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.0.0.tgz", - "integrity": "sha512-Ggv5sldXUeSKsuzLkddtyhyHe2YantsxWKNi7A+7LeD12ExRDWTRk29JCXpaHPAbMaIPZSil7n+lq78WY2VY7w==" + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.4.4.tgz", + "integrity": "sha512-VYk2/H/BnYbZDDg39hr3t2kKyifAm1W6zHRfhx8jGjIHpQEBv9dry7oQ2f3+J703TLu69nYdxsovl0XYfcnK4w==" }, "@babel/helper-member-expression-to-functions": { "version": "7.0.0", @@ -84,9 +84,9 @@ "integrity": "sha512-aP/hlLq01DWNEiDg4Jn23i+CXxW/owM4WpDLFUbpjxe4NS3BhLVZQ5i7E0ZrxuQ/vwekIeciyamgB1UIYxxM6A==" }, "@babel/helper-module-transforms": { - "version": "7.2.2", - "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.2.2.tgz", - "integrity": "sha512-YRD7I6Wsv+IHuTPkAmAS4HhY0dkPobgLftHp0cRGZSdrRvmZY8rFvae/GVu3bD00qscuvK3WPHB3YdNpBXUqrA==" + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.4.4.tgz", + "integrity": "sha512-3Z1yp8TVQf+B4ynN7WoHPKS8EkdTbgAEy0nU0rs/1Kw4pDgmvYH3rz3aI11KgxKCba2cn7N+tqzV1mY2HMN96w==" }, "@babel/helper-optimise-call-expression": { "version": "7.0.0", @@ -99,9 +99,9 @@ "integrity": "sha512-CYAOUCARwExnEixLdB6sDm2dIJ/YgEAKDM1MOeMeZu9Ld/bDgVo8aiWrXwcY7OBh+1Ea2uUcVRcxKk0GJvW7QA==" }, "@babel/helper-regex": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/@babel/helper-regex/-/helper-regex-7.0.0.tgz", - "integrity": "sha512-TR0/N0NDCcUIUEbqV6dCO+LptmmSQFQ7q70lfcEB4URsjD0E1HzicrwUH+ap6BAQ2jhCX9Q4UqZy4wilujWlkg==" + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@babel/helper-regex/-/helper-regex-7.4.4.tgz", + "integrity": "sha512-Y5nuB/kESmR3tKjU8Nkn1wMGEx1tjJX076HBMeL3XLQCu6vA/YRzuTW0bbb+qRnXvQGn+d6Rx953yffl8vEy7Q==" }, "@babel/helper-remap-async-to-generator": { "version": "7.1.0", @@ -109,9 +109,9 @@ "integrity": "sha512-3fOK0L+Fdlg8S5al8u/hWE6vhufGSn0bN09xm2LXMy//REAF8kDCrYoOBKYmA8m5Nom+sV9LyLCwrFynA8/slg==" }, "@babel/helper-replace-supers": { - "version": "7.3.4", - "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.3.4.tgz", - "integrity": "sha512-pvObL9WVf2ADs+ePg0jrqlhHoxRXlOa+SHRHzAXIz2xkYuOHfGl+fKxPMaS4Fq+uje8JQPobnertBBvyrWnQ1A==" + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.4.4.tgz", + "integrity": "sha512-04xGEnd+s01nY1l15EuMS1rfKktNF+1CkKmHoErDppjAAZL+IUBZpzT748x262HF7fibaQPhbvWUl5HeSt1EXg==" }, "@babel/helper-simple-access": { "version": "7.1.0", @@ -119,9 +119,9 @@ "integrity": "sha512-Vk+78hNjRbsiu49zAPALxTb+JUQCz1aolpd8osOF16BGnLtseD21nbHgLPGUwrXEurZgiCOUmvs3ExTu4F5x6w==" }, "@babel/helper-split-export-declaration": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.0.0.tgz", - "integrity": "sha512-MXkOJqva62dfC0w85mEf/LucPPS/1+04nmmRMPEBUB++hiiThQ2zPtX/mEWQ3mtzCEjIJvPY8nuwxXtQeQwUag==" + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.4.4.tgz", + "integrity": "sha512-Ro/XkzLf3JFITkW6b+hNxzZ1n5OQ80NvIUdmHspih1XAhtN3vPTuUFT4eQnela+2MaZ5ulH+iyP513KJrxbN7Q==" }, "@babel/helper-wrap-function": { "version": "7.2.0", @@ -129,9 +129,9 @@ "integrity": "sha512-o9fP1BZLLSrYlxYEYyl2aS+Flun5gtjTIG8iln+XuEzQTs0PLagAGSXUcqruJwD5fM48jzIEggCKpIfWTcR7pQ==" }, "@babel/helpers": { - "version": "7.3.1", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.3.1.tgz", - "integrity": "sha512-Q82R3jKsVpUV99mgX50gOPCWwco9Ec5Iln/8Vyu4osNIOQgSrd9RFrQeUvmvddFNoLwMyOUWU+5ckioEKpDoGA==" + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.4.4.tgz", + "integrity": "sha512-igczbR/0SeuPR8RFfC7tGrbdTbFL3QTvH6D+Z6zNxnTe//GyqmtHmDkzrqDmyZ3eSwPqB/LhyKoU5DXsp+Vp2A==" }, "@babel/highlight": { "version": "7.0.0", @@ -139,9 +139,9 @@ "integrity": "sha512-UFMC4ZeFC48Tpvj7C8UgLvtkaUuovQX+5xNWrsIoMG8o2z+XFKjKaN9iVmS84dPwVN00W4wPmqvYoZF3EGAsfw==" }, "@babel/parser": { - "version": "7.3.4", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.3.4.tgz", - "integrity": "sha512-tXZCqWtlOOP4wgCp6RjRvLmfuhnqTLy9VHwRochJBCP2nDm27JnnuFEnXFASVyQNHk36jD1tAammsCEEqgscIQ==" + "version": "7.4.5", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.4.5.tgz", + "integrity": "sha512-9mUqkL1FF5T7f0WDFfAoDdiMVPWsdD1gZYzSnaXsxUCUqzuch/8of9G3VUSNiZmMBoRxT3neyVsqeiL/ZPcjew==" }, "@babel/plugin-proposal-async-generator-functions": { "version": "7.2.0", @@ -149,14 +149,14 @@ "integrity": "sha512-+Dfo/SCQqrwx48ptLVGLdE39YtWRuKc/Y9I5Fy0P1DDBB9lsAHpjcEJQt+4IifuSOSTLBKJObJqMvaO1pIE8LQ==" }, "@babel/plugin-proposal-class-properties": { - "version": "7.3.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.3.4.tgz", - "integrity": "sha512-lUf8D3HLs4yYlAo8zjuneLvfxN7qfKv1Yzbj5vjqaqMJxgJA3Ipwp4VUJ+OrOdz53Wbww6ahwB8UhB2HQyLotA==" + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.4.4.tgz", + "integrity": "sha512-WjKTI8g8d5w1Bc9zgwSz2nfrsNQsXcCf9J9cdCvrJV6RF56yztwm4TmJC0MgJ9tvwO9gUA/mcYe89bLdGfiXFg==" }, "@babel/plugin-proposal-object-rest-spread": { - "version": "7.3.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.3.4.tgz", - "integrity": "sha512-j7VQmbbkA+qrzNqbKHrBsW3ddFnOeva6wzSe/zB7T+xaxGc+RCpwo44wCmRixAIGRoIpmVgvzFzNJqQcO3/9RA==" + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.4.4.tgz", + "integrity": "sha512-dMBG6cSPBbHeEBdFXeQ2QLc5gUpg4Vkaz8octD4aoW/ISO+jBOcsuxYL7bsb5WSu8RLP6boxrBIALEHgoHtO9g==" }, "@babel/plugin-syntax-async-generators": { "version": "7.2.0", @@ -194,9 +194,9 @@ "integrity": "sha512-ER77Cax1+8/8jCB9fo4Ud161OZzWN5qawi4GusDuRLcDbDG+bIGYY20zb2dfAFdTRGzrfq2xZPvF0R64EHnimg==" }, "@babel/plugin-transform-async-to-generator": { - "version": "7.3.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.3.4.tgz", - "integrity": "sha512-Y7nCzv2fw/jEZ9f678MuKdMo99MFDJMT/PvD9LisrR5JDFcJH6vYeH6RnjVt3p5tceyGRvTtEN0VOlU+rgHZjA==" + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.4.4.tgz", + "integrity": "sha512-YiqW2Li8TXmzgbXw+STsSqPBPFnGviiaSp6CYOq55X8GQ2SGVLrXB6pNid8HkqkZAzOH6knbai3snhP7v0fNwA==" }, "@babel/plugin-transform-block-scoped-functions": { "version": "7.2.0", @@ -204,14 +204,14 @@ "integrity": "sha512-ntQPR6q1/NKuphly49+QiQiTN0O63uOwjdD6dhIjSWBI5xlrbUFh720TIpzBhpnrLfv2tNH/BXvLIab1+BAI0w==" }, "@babel/plugin-transform-block-scoping": { - "version": "7.3.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.3.4.tgz", - "integrity": "sha512-blRr2O8IOZLAOJklXLV4WhcEzpYafYQKSGT3+R26lWG41u/FODJuBggehtOwilVAcFu393v3OFj+HmaE6tVjhA==" + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.4.4.tgz", + "integrity": "sha512-jkTUyWZcTrwxu5DD4rWz6rDB5Cjdmgz6z7M7RLXOJyCUkFBawssDGcGh8M/0FTSB87avyJI1HsTwUXp9nKA1PA==" }, "@babel/plugin-transform-classes": { - "version": "7.3.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.3.4.tgz", - "integrity": "sha512-J9fAvCFBkXEvBimgYxCjvaVDzL6thk0j0dBvCeZmIUDBwyt+nv6HfbImsSrWsYXfDNDivyANgJlFXDUWRTZBuA==" + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.4.4.tgz", + "integrity": "sha512-/e44eFLImEGIpL9qPxSRat13I5QNRgBLu2hOQJCF7VLy/otSM/sypV1+XaIw5+502RX/+6YaSAPmldk+nhHDPw==" }, "@babel/plugin-transform-computed-properties": { "version": "7.2.0", @@ -219,9 +219,9 @@ "integrity": "sha512-kP/drqTxY6Xt3NNpKiMomfgkNn4o7+vKxK2DDKcBG9sHj51vHqMBGy8wbDS/J4lMxnqs153/T3+DmCEAkC5cpA==" }, "@babel/plugin-transform-destructuring": { - "version": "7.3.2", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.3.2.tgz", - "integrity": "sha512-Lrj/u53Ufqxl/sGxyjsJ2XNtNuEjDyjpqdhMNh5aZ+XFOdThL46KBj27Uem4ggoezSYBxKWAil6Hu8HtwqesYw==" + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.4.4.tgz", + "integrity": "sha512-/aOx+nW0w8eHiEHm+BTERB2oJn5D127iye/SUQl7NjHy0lf+j7h4MKMMSOwdazGq9OxgiNADncE+SRJkCxjZpQ==" }, "@babel/plugin-transform-exponentiation-operator": { "version": "7.2.0", @@ -229,14 +229,14 @@ "integrity": "sha512-umh4hR6N7mu4Elq9GG8TOu9M0bakvlsREEC+ialrQN6ABS4oDQ69qJv1VtR3uxlKMCQMCvzk7vr17RHKcjx68A==" }, "@babel/plugin-transform-flow-strip-types": { - "version": "7.3.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-flow-strip-types/-/plugin-transform-flow-strip-types-7.3.4.tgz", - "integrity": "sha512-PmQC9R7DwpBFA+7ATKMyzViz3zCaMNouzZMPZN2K5PnbBbtL3AXFYTkDk+Hey5crQq2A90UG5Uthz0mel+XZrA==" + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-flow-strip-types/-/plugin-transform-flow-strip-types-7.4.4.tgz", + "integrity": "sha512-WyVedfeEIILYEaWGAUWzVNyqG4sfsNooMhXWsu/YzOvVGcsnPb5PguysjJqI3t3qiaYj0BR8T2f5njdjTGe44Q==" }, "@babel/plugin-transform-for-of": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.2.0.tgz", - "integrity": "sha512-Kz7Mt0SsV2tQk6jG5bBv5phVbkd0gd27SgYD4hH1aLMJRchM0dzHaXvrWhVZ+WxAlDoAKZ7Uy3jVTW2mKXQ1WQ==" + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.4.4.tgz", + "integrity": "sha512-9T/5Dlr14Z9TIEXLXkt8T1DU7F24cbhwhMNUziN3hB1AXoZcdzPcTiKGRn/6iOymDqtTKWnr/BtRKN9JwbKtdQ==" }, "@babel/plugin-transform-literals": { "version": "7.2.0", @@ -244,9 +244,9 @@ "integrity": "sha512-2ThDhm4lI4oV7fVQ6pNNK+sx+c/GM5/SaML0w/r4ZB7sAneD/piDJtwdKlNckXeyGK7wlwg2E2w33C/Hh+VFCg==" }, "@babel/plugin-transform-modules-commonjs": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.2.0.tgz", - "integrity": "sha512-V6y0uaUQrQPXUrmj+hgnks8va2L0zcZymeU7TtWEgdRLNkceafKXEduv7QzgQAE4lT+suwooG9dC7LFhdRAbVQ==" + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.4.4.tgz", + "integrity": "sha512-4sfBOJt58sEo9a2BQXnZq+Q3ZTSAUXyK3E30o36BOGnJ+tvJ6YSxF0PG6kERvbeISgProodWuI9UVG3/FMY6iw==" }, "@babel/plugin-transform-object-super": { "version": "7.2.0", @@ -254,9 +254,9 @@ "integrity": "sha512-VMyhPYZISFZAqAPVkiYb7dUe2AsVi2/wCT5+wZdsNO31FojQJa9ns40hzZ6U9f50Jlq4w6qwzdBB2uwqZ00ebg==" }, "@babel/plugin-transform-parameters": { - "version": "7.3.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.3.3.tgz", - "integrity": "sha512-IrIP25VvXWu/VlBWTpsjGptpomtIkYrN/3aDp4UKm7xK6UxZY88kcJ1UwETbzHAlwN21MnNfwlar0u8y3KpiXw==" + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.4.4.tgz", + "integrity": "sha512-oMh5DUO1V63nZcu/ZVLQFqiihBGo4OpxJxR1otF50GMeCLiRx5nUdtokd+u9SuVJrvvuIh9OosRFPP4pIPnwmw==" }, "@babel/plugin-transform-property-literals": { "version": "7.2.0", @@ -284,14 +284,14 @@ "integrity": "sha512-A32OkKTp4i5U6aE88GwwcuV4HAprUgHcTq0sSafLxjr6AW0QahrCRCjxogkbbcdtpbXkuTOlgpjophCxb6sh5g==" }, "@babel/plugin-transform-regenerator": { - "version": "7.3.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.3.4.tgz", - "integrity": "sha512-hvJg8EReQvXT6G9H2MvNPXkv9zK36Vxa1+csAVTpE1J3j0zlHplw76uudEbJxgvqZzAq9Yh45FLD4pk5mKRFQA==" + "version": "7.4.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.4.5.tgz", + "integrity": "sha512-gBKRh5qAaCWntnd09S8QC7r3auLCqq5DI6O0DlfoyDjslSBVqBibrMdsqO+Uhmx3+BlOmE/Kw1HFxmGbv0N9dA==" }, "@babel/plugin-transform-runtime": { - "version": "7.3.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-runtime/-/plugin-transform-runtime-7.3.4.tgz", - "integrity": "sha512-PaoARuztAdd5MgeVjAxnIDAIUet5KpogqaefQvPOmPYCxYoaPhautxDh3aO8a4xHsKgT/b9gSxR0BKK1MIewPA==" + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-runtime/-/plugin-transform-runtime-7.4.4.tgz", + "integrity": "sha512-aMVojEjPszvau3NRg+TIH14ynZLvPewH4xhlCW1w6A3rkxTS1m4uwzRclYR9oS+rl/dr+kT+pzbfHuAWP/lc7Q==" }, "@babel/plugin-transform-shorthand-properties": { "version": "7.2.0", @@ -309,9 +309,9 @@ "integrity": "sha512-KKYCoGaRAf+ckH8gEL3JHUaFVyNHKe3ASNsZ+AlktgHevvxGigoIttrEJb8iKN03Q7Eazlv1s6cx2B2cQ3Jabw==" }, "@babel/plugin-transform-template-literals": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.2.0.tgz", - "integrity": "sha512-FkPix00J9A/XWXv4VoKJBMeSkyY9x/TqIh76wzcdfl57RJJcf8CehQ08uwfhCDNtRQYtHQKBTwKZDEyjE13Lwg==" + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.4.4.tgz", + "integrity": "sha512-mQrEC4TWkhLN0z8ygIvEL9ZEToPhG5K7KDW3pzGqOfIGZ28Jb0POUkeWcoz8HnHvhFy6dwAT1j8OzqN8s804+g==" }, "@babel/plugin-transform-typeof-symbol": { "version": "7.2.0", @@ -319,44 +319,54 @@ "integrity": "sha512-2LNhETWYxiYysBtrBTqL8+La0jIoQQnIScUJc74OYvUGRmkskNY4EzLCnjHBzdmb38wqtTaixpo1NctEcvMDZw==" }, "@babel/plugin-transform-typescript": { - "version": "7.3.2", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.3.2.tgz", - "integrity": "sha512-Pvco0x0ZSCnexJnshMfaibQ5hnK8aUHSvjCQhC1JR8eeg+iBwt0AtCO7gWxJ358zZevuf9wPSO5rv+WJcbHPXQ==" + "version": "7.4.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.4.5.tgz", + "integrity": "sha512-RPB/YeGr4ZrFKNwfuQRlMf2lxoCUaU01MTw39/OFE/RiL8HDjtn68BwEPft1P7JN4akyEmjGWAMNldOV7o9V2g==" }, "@babel/plugin-transform-unicode-regex": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.2.0.tgz", - "integrity": "sha512-m48Y0lMhrbXEJnVUaYly29jRXbQ3ksxPrS1Tg8t+MHqzXhtBYAvI51euOBaoAlZLPHsieY9XPVMf80a5x0cPcA==" + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.4.4.tgz", + "integrity": "sha512-il+/XdNw01i93+M9J9u4T7/e/Ue/vWfNZE4IRUQjplu2Mqb/AFTDimkw2tdEdSH50wuQXZAbXSql0UphQke+vA==" }, "@babel/preset-react": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/@babel/preset-react/-/preset-react-7.0.0.tgz", "integrity": "sha512-oayxyPS4Zj+hF6Et11BwuBkmpgT/zMxyuZgFrMeZID6Hdh3dGlk4sHCAhdBCpuCKW2ppBfl2uCCetlrUIJRY3w==" }, + "@babel/preset-typescript": { + "version": "7.3.3", + "resolved": "https://registry.npmjs.org/@babel/preset-typescript/-/preset-typescript-7.3.3.tgz", + "integrity": "sha512-mzMVuIP4lqtn4du2ynEfdO0+RYcslwrZiJHXu4MGaC1ctJiW2fyaeDrtjJGs7R/KebZ1sgowcIoWf4uRpEfKEg==" + }, "@babel/runtime": { - "version": "7.3.4", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.3.4.tgz", - "integrity": "sha512-IvfvnMdSaLBateu0jfsYIpZTxAc2cKEXEMiezGGN75QcBcecDUKd3PgLAncT0oOgxKy8dd8hrJKj9MfzgfZd6g==" + "version": "7.4.5", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.4.5.tgz", + "integrity": "sha512-TuI4qpWZP6lGOGIuGWtp9sPluqYICmbk8T/1vpSysqJxRPkudh/ofFWyqdcMsDf2s7KvDL4/YHgKyvcS3g9CJQ==" }, "@babel/template": { - "version": "7.2.2", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.2.2.tgz", - "integrity": "sha512-zRL0IMM02AUDwghf5LMSSDEz7sBCO2YnNmpg3uWTZj/v1rcG2BmQUvaGU8GhU8BvfMh1k2KIAYZ7Ji9KXPUg7g==" + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.4.4.tgz", + "integrity": "sha512-CiGzLN9KgAvgZsnivND7rkA+AeJ9JB0ciPOD4U59GKbQP2iQl+olF1l76kJOupqidozfZ32ghwBEJDhnk9MEcw==" }, "@babel/traverse": { - "version": "7.3.4", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.3.4.tgz", - "integrity": "sha512-TvTHKp6471OYEcE/91uWmhR6PrrYywQntCHSaZ8CM8Vmp+pjAusal4nGB2WCCQd0rvI7nOMKn9GnbcvTUz3/ZQ==" + "version": "7.4.5", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.4.5.tgz", + "integrity": "sha512-Vc+qjynwkjRmIFGxy0KYoPj4FdVDxLej89kMHFsWScq999uX+pwcX4v9mWRjW0KcAYTPAuVQl2LKP1wEVLsp+A==" }, "@babel/types": { - "version": "7.3.4", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.3.4.tgz", - "integrity": "sha512-WEkp8MsLftM7O/ty580wAmZzN1nDmCACc5+jFzUt+GUFNNIi3LdRlueYz0YIlmJhlZx1QYDMZL5vdWCL0fNjFQ==" + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.4.4.tgz", + "integrity": "sha512-dOllgYdnEFOebhkKCjzSVFqw/PmmB8pH6RGOWkY4GsboQNd47b1fBThBSwlHAq9alF9vc1M3+6oqR47R50L0tQ==" }, "acorn": { - "version": "5.7.3", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-5.7.3.tgz", - "integrity": "sha512-T/zvzYRfbVojPWahDsE5evJdHb3oJoQfFbsrKM7w5Zcs++Tr257tia3BmMP8XYVjp1S9RZXQMh7gao96BlqZOw==" + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.1.1.tgz", + "integrity": "sha512-jPTiwtOxaHNaAPg/dmrJ/beuzLRnXtB0kQPQ8JpotKJgTB6rX6c8mlf315941pyjBSaPg8NHXS9fhP4u17DpGA==" + }, + "acorn-dynamic-import": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/acorn-dynamic-import/-/acorn-dynamic-import-4.0.0.tgz", + "integrity": "sha512-d3OEjQV4ROpoflsnUA8HozoIR504TFxNivYEUi6uwz0IYhBkTDXGuWlNdMtybRt3nqVx/L6XqMt0FxkXuWKZhw==" }, "ansi-styles": { "version": "3.2.1", @@ -453,18 +463,6 @@ "resolved": "https://registry.npmjs.org/babel-plugin-minify-type-constructors/-/babel-plugin-minify-type-constructors-0.4.3.tgz", "integrity": "sha1-G8bxW4f3qxCF1CszC3F2V6IVZQA=" }, - "babel-plugin-transform-es2015-modules-reify": { - "version": "0.18.0", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-modules-reify/-/babel-plugin-transform-es2015-modules-reify-0.18.0.tgz", - "integrity": "sha512-bwbrF9cAsMvZamg+tkfN1fazGj5uiTxhaL5fRfR5xDp2JELgY8yrEhq42czar39EBvWscX0DA6dLSeCdY+4Xuw==", - "dependencies": { - "reify": { - "version": "0.18.1", - "resolved": "https://registry.npmjs.org/reify/-/reify-0.18.1.tgz", - "integrity": "sha512-eNiNGxo5Cz/s/7DOeQW5+lTAxMexZPFA8XW/ef6f8WBLtQfYAhDNXxva7ROFC/Wa3q91usYzqJYwC85OXaWUzA==" - } - } - }, "babel-plugin-transform-inline-consecutive-adds": { "version": "0.4.3", "resolved": "https://registry.npmjs.org/babel-plugin-transform-inline-consecutive-adds/-/babel-plugin-transform-inline-consecutive-adds-0.4.3.tgz", @@ -521,9 +519,9 @@ "integrity": "sha1-viQcqBQEAwZ4t0hxcyK4nQyP4oA=" }, "babel-preset-meteor": { - "version": "7.3.4", - "resolved": "https://registry.npmjs.org/babel-preset-meteor/-/babel-preset-meteor-7.3.4.tgz", - "integrity": "sha512-5S95oZLKn1RZexBCs3tPjjYXf2rJ8rBjkvJGkD9Bhut7XEGxDMMt1S+hhhGYo4ZwqOTmIeHv0EMppMWVxa7Lbg==" + "version": "7.4.3", + "resolved": "https://registry.npmjs.org/babel-preset-meteor/-/babel-preset-meteor-7.4.3.tgz", + "integrity": "sha512-0nxAvTPAQMMIRM64KcQN3sLgQQSjM41vFZY4lqpAc1vZ9SA3UeYbmMaZ6tqONveiQ09IwTukkVIiAeQd5/mw1Q==" }, "babel-preset-minify": { "version": "0.5.0", @@ -566,9 +564,9 @@ "integrity": "sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs=" }, "globals": { - "version": "11.11.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-11.11.0.tgz", - "integrity": "sha512-WHq43gS+6ufNOEqlrDBxVEbb8ntfXrfAUU2ZOpCxrBdGKW3gyv8mCxAfIBD0DroPKGrJ2eSsXsLtY9MPntsyTw==" + "version": "11.12.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", + "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==" }, "has-flag": { "version": "3.0.0", @@ -606,9 +604,9 @@ "integrity": "sha1-G7nzFO9ri63tE7VJFpsqlF62jk0=" }, "meteor-babel": { - "version": "7.3.4", - "resolved": "https://registry.npmjs.org/meteor-babel/-/meteor-babel-7.3.4.tgz", - "integrity": "sha512-5aVvIa9yGRq2WlkO8tThWhc3f07escWb0t93KRYM0EnsUbv2rDmrAir0P+e+4rpyDDz7utOpIfuO1dT1F8SCSA==" + "version": "7.4.8", + "resolved": "https://registry.npmjs.org/meteor-babel/-/meteor-babel-7.4.8.tgz", + "integrity": "sha512-Z0M97Aq6TtXjDYehg5ejoO4oMEBCRYuOwfnGn++FlanUnkNBLyq0NuiDPrtX7p3ZG3qVaOczg7AUZj7nkFdY1g==" }, "meteor-babel-helpers": { "version": "0.0.3", @@ -621,9 +619,9 @@ "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=" }, "ms": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", - "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==" + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" }, "path-parse": { "version": "1.0.6", @@ -641,24 +639,24 @@ "integrity": "sha512-1G6jJVDWrt0rK99kBjvEtziZNCICAuvIPkSiUFIQxVP06RCVpq3dmDo2oi6ABpYaDYaTRr67BEhL8r1wgEZZKg==" }, "regenerate-unicode-properties": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/regenerate-unicode-properties/-/regenerate-unicode-properties-7.0.0.tgz", - "integrity": "sha512-s5NGghCE4itSlUS+0WUj88G6cfMVMmH8boTPNvABf8od+2dhT9WDlWu8n01raQAJZMOK8Ch6jSexaRO7swd6aw==" + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/regenerate-unicode-properties/-/regenerate-unicode-properties-8.1.0.tgz", + "integrity": "sha512-LGZzkgtLY79GeXLm8Dp0BVLdQlWICzBnJz/ipWUgo59qBaZ+BHtq51P2q1uVZlppMuUAT37SDk39qUbjTWB7bA==" }, "regenerator-runtime": { - "version": "0.12.1", - "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.12.1.tgz", - "integrity": "sha512-odxIc1/vDlo4iZcfXqRYFj0vpXFNoGdKMAUieAlFYO6m/nl5e9KR/beGf41z4a1FI+aQgtjhuaSlDxQ0hmkrHg==" + "version": "0.13.2", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.2.tgz", + "integrity": "sha512-S/TQAZJO+D3m9xeN1WTI8dLKBBiRgXBlTJvbWjCThHWZj9EvHK70Ff50/tYj2J/fvBY6JtFVwRuazHN2E7M9BA==" }, "regenerator-transform": { - "version": "0.13.4", - "resolved": "https://registry.npmjs.org/regenerator-transform/-/regenerator-transform-0.13.4.tgz", - "integrity": "sha512-T0QMBjK3J0MtxjPmdIMXm72Wvj2Abb0Bd4HADdfijwMdoIsyQZ6fWC7kDFhk2YinBBEMZDL7Y7wh0J1sGx3S4A==" + "version": "0.14.0", + "resolved": "https://registry.npmjs.org/regenerator-transform/-/regenerator-transform-0.14.0.tgz", + "integrity": "sha512-rtOelq4Cawlbmq9xuMR5gdFmv7ku/sFoB7sRiywx7aq53bc52b4j6zvH7Te1Vt/X2YveDKnCGUbioieU7FEL3w==" }, "regexpu-core": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-4.4.0.tgz", - "integrity": "sha512-eDDWElbwwI3K0Lo6CqbQbA6FwgtCz4kYTarrri1okfkRLZAqstU+B3voZBCjg8Fl6iq0gXrJG6MvRgLthfvgOA==" + "version": "4.5.4", + "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-4.5.4.tgz", + "integrity": "sha512-BtizvGtFQKGPUcTy56o3nk1bGRp4SZOTYrDtGNlqCQufptV5IkkLN6Emw+yunAJjzf+C9FQFtvq7IoA3+oMYHQ==" }, "regjsgen": { "version": "0.5.0", @@ -678,14 +676,14 @@ } }, "reify": { - "version": "0.17.3", - "resolved": "https://registry.npmjs.org/reify/-/reify-0.17.3.tgz", - "integrity": "sha512-i0t837UYnWyJPCeesupZjmpThIppOPSs4I/uHmsWzQaiGQqtsYlbeJNN5i+61fe6UEA3Famc3IHnlm511poMnA==" + "version": "0.20.1", + "resolved": "https://registry.npmjs.org/reify/-/reify-0.20.1.tgz", + "integrity": "sha512-Z3BD00rtG8QusNLSwgfQ6sRr4N4cwHKKury7FohWtFGs7X1ANlR/qlncn3v+UQgI6BNb5fgC41dxLZCTQq3ywg==" }, "resolve": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.10.0.tgz", - "integrity": "sha512-3sUr9aq5OfSg2S9pNtPA9hL1FVEAjvfOC4leW0SNf/mpnaakz2a9femSd6LqAww2RaFctwyf1lCqnTHuF1rxDg==" + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.11.0.tgz", + "integrity": "sha512-WL2pBDjqT6pGUNSUzMw00o4T7If+z4H2x3Gz893WoUQ5KW8Vr9txp00ykiP16VBaZF5+j/OcXJHZ9+PCvdiDKw==" }, "safe-buffer": { "version": "5.1.2", @@ -693,9 +691,9 @@ "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" }, "semver": { - "version": "5.6.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.6.0.tgz", - "integrity": "sha512-RS9R6R35NYgQn++fkDWaOmqGoj4Ek9gGs+DPxNUZKuwE183xjJroKvyo1IzVFeXvUrvmALy6FWD5xrdJT25gMg==" + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.0.tgz", + "integrity": "sha512-Ya52jSX2u7QKghxeoFGpLwCtGlt7j0oY9DYb5apt9nPlJ42ID+ulTXESnt/qAQcoSERyZ5sl3LDIOw0nAn/5DA==" }, "source-map": { "version": "0.5.7", @@ -728,14 +726,14 @@ "integrity": "sha512-L4Qoh15vTfntsn4P1zqnHulG0LdXgjSO035fEpdtp6YxXhMT51Q6vgM5lYdG/5X3MjS+k/Y9Xw4SFCY9IkR0rg==" }, "unicode-match-property-value-ecmascript": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/unicode-match-property-value-ecmascript/-/unicode-match-property-value-ecmascript-1.0.2.tgz", - "integrity": "sha512-Rx7yODZC1L/T8XKo/2kNzVAQaRE88AaMvI1EF/Xnj3GW2wzN6fop9DDWuFAKUVFH7vozkz26DzP0qyWLKLIVPQ==" + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/unicode-match-property-value-ecmascript/-/unicode-match-property-value-ecmascript-1.1.0.tgz", + "integrity": "sha512-hDTHvaBk3RmFzvSl0UVrUmC3PuW9wKVnpoUDYH0JDkSIovzw+J5viQmeYHxVSBptubnr7PbH2e0fnpDRQnQl5g==" }, "unicode-property-aliases-ecmascript": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/unicode-property-aliases-ecmascript/-/unicode-property-aliases-ecmascript-1.0.4.tgz", - "integrity": "sha512-2WSLa6OdYd2ng8oqiGIWnJqyFArvhn+5vgx5GTxMbUYjCYKUcuKS62YLFF0R/BDGlB1yzXjQOLtPAfHsgirEpg==" + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/unicode-property-aliases-ecmascript/-/unicode-property-aliases-ecmascript-1.0.5.tgz", + "integrity": "sha512-L5RAqCfXqAwR3RriF8pM0lU0w4Ryf/GgzONwi6KnL1taJQa7x1TCxdJnILX59WIGOwR57IVxn7Nej0fz1Ny6fw==" } } } diff --git a/packages/babel-compiler/package.js b/packages/babel-compiler/package.js index 0fc349846d..540a631f82 100644 --- a/packages/babel-compiler/package.js +++ b/packages/babel-compiler/package.js @@ -10,7 +10,7 @@ Package.describe({ }); Npm.depends({ - 'meteor-babel': '7.3.4', + 'meteor-babel': '7.4.8', 'json5': '2.1.0' }); diff --git a/packages/modules/.npm/package/npm-shrinkwrap.json b/packages/modules/.npm/package/npm-shrinkwrap.json index f5dfbc8ff2..84e2c39d3e 100644 --- a/packages/modules/.npm/package/npm-shrinkwrap.json +++ b/packages/modules/.npm/package/npm-shrinkwrap.json @@ -2,19 +2,24 @@ "lockfileVersion": 1, "dependencies": { "acorn": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-5.7.1.tgz", - "integrity": "sha512-d+nbxBUGKg7Arpsvbnlq61mc12ek3EY8EQldM3GPAhWJ1UVxC6TDGbIvUMNU6obBX3i1+ptCIzV4vq0gFPEGVQ==" + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.1.1.tgz", + "integrity": "sha512-jPTiwtOxaHNaAPg/dmrJ/beuzLRnXtB0kQPQ8JpotKJgTB6rX6c8mlf315941pyjBSaPg8NHXS9fhP4u17DpGA==" + }, + "acorn-dynamic-import": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/acorn-dynamic-import/-/acorn-dynamic-import-4.0.0.tgz", + "integrity": "sha512-d3OEjQV4ROpoflsnUA8HozoIR504TFxNivYEUi6uwz0IYhBkTDXGuWlNdMtybRt3nqVx/L6XqMt0FxkXuWKZhw==" }, "reify": { - "version": "0.17.3", - "resolved": "https://registry.npmjs.org/reify/-/reify-0.17.3.tgz", - "integrity": "sha512-i0t837UYnWyJPCeesupZjmpThIppOPSs4I/uHmsWzQaiGQqtsYlbeJNN5i+61fe6UEA3Famc3IHnlm511poMnA==" + "version": "0.20.1", + "resolved": "https://registry.npmjs.org/reify/-/reify-0.20.1.tgz", + "integrity": "sha512-Z3BD00rtG8QusNLSwgfQ6sRr4N4cwHKKury7FohWtFGs7X1ANlR/qlncn3v+UQgI6BNb5fgC41dxLZCTQq3ywg==" }, "semver": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.5.0.tgz", - "integrity": "sha512-4SJ3dm0WAwWy/NVeioZh5AntkdJoWKxHxcmyP622fOkgHa4z3R0TdBJICINyaSDE6uNwVc8gZr+ZinwZAH4xIA==" + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.0.tgz", + "integrity": "sha512-Ya52jSX2u7QKghxeoFGpLwCtGlt7j0oY9DYb5apt9nPlJ42ID+ulTXESnt/qAQcoSERyZ5sl3LDIOw0nAn/5DA==" } } } diff --git a/packages/modules/package.js b/packages/modules/package.js index e60ea87c48..596468c75c 100644 --- a/packages/modules/package.js +++ b/packages/modules/package.js @@ -6,7 +6,7 @@ Package.describe({ }); Npm.depends({ - reify: "0.17.3" + reify: "0.20.1" }); Package.onUse(function(api) { diff --git a/scripts/dev-bundle-tool-package.js b/scripts/dev-bundle-tool-package.js index b752a790b8..b03d4537f9 100644 --- a/scripts/dev-bundle-tool-package.js +++ b/scripts/dev-bundle-tool-package.js @@ -14,11 +14,11 @@ var packageJson = { pacote: "https://github.com/meteor/pacote/tarball/c5043daa1b768594e01d76275e3854fc19f038f9", "node-gyp": "3.7.0", "node-pre-gyp": "0.10.3", - "meteor-babel": "7.4.6", + "meteor-babel": "7.4.8", // Keep the versions of these packages consistent with the versions // found in dev-bundle-server-package.js. "meteor-promise": "0.8.7", - reify: "0.19.1", + reify: "0.20.1", fibers: "3.1.1", // So that Babel can emit require("@babel/runtime/helpers/...") calls. "@babel/runtime": "7.4.4", From 7d3e7ab1891552d6576b1d5a5c201ec547d1999a Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Mon, 17 Jun 2019 12:01:44 -0400 Subject: [PATCH 069/327] Bump minor versions of babel-compiler, ecmascript, and modules. --- packages/babel-compiler/package.js | 2 +- packages/ecmascript/package.js | 2 +- packages/modules/package.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/babel-compiler/package.js b/packages/babel-compiler/package.js index 540a631f82..78d79ad075 100644 --- a/packages/babel-compiler/package.js +++ b/packages/babel-compiler/package.js @@ -6,7 +6,7 @@ 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.3.4' + version: '7.4.0' }); Npm.depends({ diff --git a/packages/ecmascript/package.js b/packages/ecmascript/package.js index c64429cb37..5faccec9e6 100644 --- a/packages/ecmascript/package.js +++ b/packages/ecmascript/package.js @@ -1,6 +1,6 @@ Package.describe({ name: 'ecmascript', - version: '0.12.7', + version: '0.13.0', summary: 'Compiler plugin that supports ES2015+ in all .js files', documentation: 'README.md' }); diff --git a/packages/modules/package.js b/packages/modules/package.js index 596468c75c..4a8923a24a 100644 --- a/packages/modules/package.js +++ b/packages/modules/package.js @@ -1,6 +1,6 @@ Package.describe({ name: "modules", - version: "0.13.0", + version: "0.14.0", summary: "CommonJS module system", documentation: "README.md" }); From 26d4cb33c685af9a1faac66bb437d434bbd649cb Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Wed, 19 Jun 2019 10:59:12 -0400 Subject: [PATCH 070/327] Bump $BUNDLE_VERSION to 8.16.0.5 before rebuilding dev bundle. --- meteor | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meteor b/meteor index 67741276fd..8eed60fdd9 100755 --- a/meteor +++ b/meteor @@ -1,6 +1,6 @@ #!/usr/bin/env bash -BUNDLE_VERSION=8.16.0.4 +BUNDLE_VERSION=8.16.0.5 # OS Check. Put here because here is where we download the precompiled # bundles that are arch specific. From a4586e43320676cb8ee314ef289244f643d4b6da Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Wed, 19 Jun 2019 11:06:12 -0400 Subject: [PATCH 071/327] Compile import/export syntax in @babel/runtime-related modules. Case in point: @babel/runtime/helpers/esm/typeof.js uses ECMAScript module syntax (import, export), but must not be compiled with transforms like @babel/plugin-transform-typeof-symbol, since it's part of the runtime library depended upon by that transform. This logic is an extreme implementation detail for sure, but at least babel-compiler is the only code that needs to know about this complexity. --- packages/babel-compiler/babel-compiler.js | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/packages/babel-compiler/babel-compiler.js b/packages/babel-compiler/babel-compiler.js index a62e676735..f93790fc18 100644 --- a/packages/babel-compiler/babel-compiler.js +++ b/packages/babel-compiler/babel-compiler.js @@ -77,9 +77,10 @@ BCp.processOneFileForTarget = function (inputFile, source) { ! toBeAdded.bare && // If you need to exclude a specific file within an app from Babel // compilation, give it the following file extension: .es5.js - ! isInputFilePathExcluded(inputFilePath)) { - var extraFeatures = Object.assign({}, this.extraFeatures); - var arch = inputFile.getArch(); + ! excludedFileExtensionPattern.test(inputFilePath)) { + + const extraFeatures = { ...this.extraFeatures }; + const arch = inputFile.getArch(); if (arch.startsWith("os.")) { // Start with a much simpler set of Babel presets and plugins if @@ -96,6 +97,14 @@ BCp.processOneFileForTarget = function (inputFile, source) { extraFeatures.jscript = true; } + if (shouldCompileModulesOnly(inputFilePath)) { + // Modules like @babel/runtime/helpers/esm/typeof.js need to be + // compiled to support ECMAScript modules syntax, but should *not* + // be compiled in any other way (for more explanation, see my longer + // comment in shouldCompileModulesOnly). + extraFeatures.compileModulesOnly = true; + } + var babelOptions = Babel.getDefaultOptions(extraFeatures); babelOptions.caller = { name: "meteor", arch }; @@ -165,11 +174,7 @@ BCp.processOneFileForTarget = function (inputFile, source) { return toBeAdded; }; -function isInputFilePathExcluded(path) { - if (excludedFileExtensionPattern.test(path)) { - return true; - } - +function shouldCompileModulesOnly(path) { const parts = path.split("/"); const nmi = parts.lastIndexOf("node_modules"); if (nmi >= 0) { From 4c097321ca889f45d7bc4f4c4ad951a37496e03f Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Wed, 19 Jun 2019 12:20:37 -0400 Subject: [PATCH 072/327] Update meteor-babel and reify to latest versions, again. --- History.md | 4 +++- .../babel-compiler/.npm/package/npm-shrinkwrap.json | 12 ++++++------ packages/babel-compiler/package.js | 2 +- packages/modules/.npm/package/npm-shrinkwrap.json | 6 +++--- packages/modules/package.js | 2 +- scripts/dev-bundle-tool-package.js | 4 ++-- 6 files changed, 16 insertions(+), 14 deletions(-) diff --git a/History.md b/History.md index c3827515d2..f2588c90af 100644 --- a/History.md +++ b/History.md @@ -11,7 +11,9 @@ N/A * Node has been updated to version [8.16.0](https://nodejs.org/en/blog/release/v8.16.0/). -* The `meteor-babel` npm package has been updated to version 7.4.3. +* The `meteor-babel` npm package has been updated to version 7.4.10. + +* The `reify` npm package has been updated to version 0.20.3. * The `core-js` npm package used by `ecmascript-runtime-client` and `ecmascript-runtime-server` has been updated to version 3.1.4. diff --git a/packages/babel-compiler/.npm/package/npm-shrinkwrap.json b/packages/babel-compiler/.npm/package/npm-shrinkwrap.json index 8de8561872..f84c0c4bab 100644 --- a/packages/babel-compiler/.npm/package/npm-shrinkwrap.json +++ b/packages/babel-compiler/.npm/package/npm-shrinkwrap.json @@ -604,9 +604,9 @@ "integrity": "sha1-G7nzFO9ri63tE7VJFpsqlF62jk0=" }, "meteor-babel": { - "version": "7.4.8", - "resolved": "https://registry.npmjs.org/meteor-babel/-/meteor-babel-7.4.8.tgz", - "integrity": "sha512-Z0M97Aq6TtXjDYehg5ejoO4oMEBCRYuOwfnGn++FlanUnkNBLyq0NuiDPrtX7p3ZG3qVaOczg7AUZj7nkFdY1g==" + "version": "7.4.10", + "resolved": "https://registry.npmjs.org/meteor-babel/-/meteor-babel-7.4.10.tgz", + "integrity": "sha512-LkqP9fJAh8tL3TJ2NE83dk5kCa2Q+RiumzK/jmzLnqGup9Ztw6UdsQcPI+k8I0rl9vZcN4/+NvOEE+keroD7zQ==" }, "meteor-babel-helpers": { "version": "0.0.3", @@ -676,9 +676,9 @@ } }, "reify": { - "version": "0.20.1", - "resolved": "https://registry.npmjs.org/reify/-/reify-0.20.1.tgz", - "integrity": "sha512-Z3BD00rtG8QusNLSwgfQ6sRr4N4cwHKKury7FohWtFGs7X1ANlR/qlncn3v+UQgI6BNb5fgC41dxLZCTQq3ywg==" + "version": "0.20.3", + "resolved": "https://registry.npmjs.org/reify/-/reify-0.20.3.tgz", + "integrity": "sha512-WoI/Z6XXJniegpwITbUoQ7HQCtCnEmH6Od3nd8ko1KKE9g60UOJVoxEzInP2Bg9faXoocB3bAWY8YaFovA1ABg==" }, "resolve": { "version": "1.11.0", diff --git a/packages/babel-compiler/package.js b/packages/babel-compiler/package.js index 78d79ad075..163eb0b396 100644 --- a/packages/babel-compiler/package.js +++ b/packages/babel-compiler/package.js @@ -10,7 +10,7 @@ Package.describe({ }); Npm.depends({ - 'meteor-babel': '7.4.8', + 'meteor-babel': '7.4.10', 'json5': '2.1.0' }); diff --git a/packages/modules/.npm/package/npm-shrinkwrap.json b/packages/modules/.npm/package/npm-shrinkwrap.json index 84e2c39d3e..4eb7c80989 100644 --- a/packages/modules/.npm/package/npm-shrinkwrap.json +++ b/packages/modules/.npm/package/npm-shrinkwrap.json @@ -12,9 +12,9 @@ "integrity": "sha512-d3OEjQV4ROpoflsnUA8HozoIR504TFxNivYEUi6uwz0IYhBkTDXGuWlNdMtybRt3nqVx/L6XqMt0FxkXuWKZhw==" }, "reify": { - "version": "0.20.1", - "resolved": "https://registry.npmjs.org/reify/-/reify-0.20.1.tgz", - "integrity": "sha512-Z3BD00rtG8QusNLSwgfQ6sRr4N4cwHKKury7FohWtFGs7X1ANlR/qlncn3v+UQgI6BNb5fgC41dxLZCTQq3ywg==" + "version": "0.20.3", + "resolved": "https://registry.npmjs.org/reify/-/reify-0.20.3.tgz", + "integrity": "sha512-WoI/Z6XXJniegpwITbUoQ7HQCtCnEmH6Od3nd8ko1KKE9g60UOJVoxEzInP2Bg9faXoocB3bAWY8YaFovA1ABg==" }, "semver": { "version": "5.7.0", diff --git a/packages/modules/package.js b/packages/modules/package.js index 4a8923a24a..241bd2d8a8 100644 --- a/packages/modules/package.js +++ b/packages/modules/package.js @@ -6,7 +6,7 @@ Package.describe({ }); Npm.depends({ - reify: "0.20.1" + reify: "0.20.3" }); Package.onUse(function(api) { diff --git a/scripts/dev-bundle-tool-package.js b/scripts/dev-bundle-tool-package.js index b03d4537f9..10c9027024 100644 --- a/scripts/dev-bundle-tool-package.js +++ b/scripts/dev-bundle-tool-package.js @@ -14,11 +14,11 @@ var packageJson = { pacote: "https://github.com/meteor/pacote/tarball/c5043daa1b768594e01d76275e3854fc19f038f9", "node-gyp": "3.7.0", "node-pre-gyp": "0.10.3", - "meteor-babel": "7.4.8", + "meteor-babel": "7.4.10", // Keep the versions of these packages consistent with the versions // found in dev-bundle-server-package.js. "meteor-promise": "0.8.7", - reify: "0.20.1", + reify: "0.20.3", fibers: "3.1.1", // So that Babel can emit require("@babel/runtime/helpers/...") calls. "@babel/runtime": "7.4.4", From ad47129b607660b0a3278a3e9569de410e68b921 Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Wed, 19 Jun 2019 12:39:49 -0400 Subject: [PATCH 073/327] Bump $BUNDLE_VERSION to 8.16.0.6 before rebuilding dev bundle. --- meteor | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meteor b/meteor index 8eed60fdd9..6dc3f6aa88 100755 --- a/meteor +++ b/meteor @@ -1,6 +1,6 @@ #!/usr/bin/env bash -BUNDLE_VERSION=8.16.0.5 +BUNDLE_VERSION=8.16.0.6 # OS Check. Put here because here is where we download the precompiled # bundles that are arch specific. From 67c6d2cdd312a9284939cd7135fa974fbcfa23bf Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Thu, 20 Jun 2019 13:24:39 -0400 Subject: [PATCH 074/327] Update meteor-babel and reify to latest versions, again. --- History.md | 4 ++-- .../babel-compiler/.npm/package/npm-shrinkwrap.json | 12 ++++++------ packages/babel-compiler/package.js | 2 +- packages/modules/.npm/package/npm-shrinkwrap.json | 6 +++--- packages/modules/package.js | 2 +- scripts/dev-bundle-tool-package.js | 4 ++-- 6 files changed, 15 insertions(+), 15 deletions(-) diff --git a/History.md b/History.md index f2588c90af..c59662b340 100644 --- a/History.md +++ b/History.md @@ -11,9 +11,9 @@ N/A * Node has been updated to version [8.16.0](https://nodejs.org/en/blog/release/v8.16.0/). -* The `meteor-babel` npm package has been updated to version 7.4.10. +* The `meteor-babel` npm package has been updated to version 7.4.11. -* The `reify` npm package has been updated to version 0.20.3. +* The `reify` npm package has been updated to version 0.20.4. * The `core-js` npm package used by `ecmascript-runtime-client` and `ecmascript-runtime-server` has been updated to version 3.1.4. diff --git a/packages/babel-compiler/.npm/package/npm-shrinkwrap.json b/packages/babel-compiler/.npm/package/npm-shrinkwrap.json index f84c0c4bab..2309051a65 100644 --- a/packages/babel-compiler/.npm/package/npm-shrinkwrap.json +++ b/packages/babel-compiler/.npm/package/npm-shrinkwrap.json @@ -604,9 +604,9 @@ "integrity": "sha1-G7nzFO9ri63tE7VJFpsqlF62jk0=" }, "meteor-babel": { - "version": "7.4.10", - "resolved": "https://registry.npmjs.org/meteor-babel/-/meteor-babel-7.4.10.tgz", - "integrity": "sha512-LkqP9fJAh8tL3TJ2NE83dk5kCa2Q+RiumzK/jmzLnqGup9Ztw6UdsQcPI+k8I0rl9vZcN4/+NvOEE+keroD7zQ==" + "version": "7.4.11", + "resolved": "https://registry.npmjs.org/meteor-babel/-/meteor-babel-7.4.11.tgz", + "integrity": "sha512-WWqdJpy65+tvLZ9yxwutvFunHr+il5kMsq/yCljiix/482L1YZb0GPPVH5MuSQ9IAGO30RPNr6M1PVqMco7STQ==" }, "meteor-babel-helpers": { "version": "0.0.3", @@ -676,9 +676,9 @@ } }, "reify": { - "version": "0.20.3", - "resolved": "https://registry.npmjs.org/reify/-/reify-0.20.3.tgz", - "integrity": "sha512-WoI/Z6XXJniegpwITbUoQ7HQCtCnEmH6Od3nd8ko1KKE9g60UOJVoxEzInP2Bg9faXoocB3bAWY8YaFovA1ABg==" + "version": "0.20.4", + "resolved": "https://registry.npmjs.org/reify/-/reify-0.20.4.tgz", + "integrity": "sha512-uE8mYe+JsW9C7Cuaweo9bMRSx3+nNHUSFkJkT1kLogJnhtSENqqmm9D4J9EqTKsApqLSczl7vYKG6Kn4/3Kcqw==" }, "resolve": { "version": "1.11.0", diff --git a/packages/babel-compiler/package.js b/packages/babel-compiler/package.js index 163eb0b396..2a7905cbe2 100644 --- a/packages/babel-compiler/package.js +++ b/packages/babel-compiler/package.js @@ -10,7 +10,7 @@ Package.describe({ }); Npm.depends({ - 'meteor-babel': '7.4.10', + 'meteor-babel': '7.4.11', 'json5': '2.1.0' }); diff --git a/packages/modules/.npm/package/npm-shrinkwrap.json b/packages/modules/.npm/package/npm-shrinkwrap.json index 4eb7c80989..a7259c0b92 100644 --- a/packages/modules/.npm/package/npm-shrinkwrap.json +++ b/packages/modules/.npm/package/npm-shrinkwrap.json @@ -12,9 +12,9 @@ "integrity": "sha512-d3OEjQV4ROpoflsnUA8HozoIR504TFxNivYEUi6uwz0IYhBkTDXGuWlNdMtybRt3nqVx/L6XqMt0FxkXuWKZhw==" }, "reify": { - "version": "0.20.3", - "resolved": "https://registry.npmjs.org/reify/-/reify-0.20.3.tgz", - "integrity": "sha512-WoI/Z6XXJniegpwITbUoQ7HQCtCnEmH6Od3nd8ko1KKE9g60UOJVoxEzInP2Bg9faXoocB3bAWY8YaFovA1ABg==" + "version": "0.20.4", + "resolved": "https://registry.npmjs.org/reify/-/reify-0.20.4.tgz", + "integrity": "sha512-uE8mYe+JsW9C7Cuaweo9bMRSx3+nNHUSFkJkT1kLogJnhtSENqqmm9D4J9EqTKsApqLSczl7vYKG6Kn4/3Kcqw==" }, "semver": { "version": "5.7.0", diff --git a/packages/modules/package.js b/packages/modules/package.js index 241bd2d8a8..cce21d1370 100644 --- a/packages/modules/package.js +++ b/packages/modules/package.js @@ -6,7 +6,7 @@ Package.describe({ }); Npm.depends({ - reify: "0.20.3" + reify: "0.20.4" }); Package.onUse(function(api) { diff --git a/scripts/dev-bundle-tool-package.js b/scripts/dev-bundle-tool-package.js index 10c9027024..840919d660 100644 --- a/scripts/dev-bundle-tool-package.js +++ b/scripts/dev-bundle-tool-package.js @@ -14,11 +14,11 @@ var packageJson = { pacote: "https://github.com/meteor/pacote/tarball/c5043daa1b768594e01d76275e3854fc19f038f9", "node-gyp": "3.7.0", "node-pre-gyp": "0.10.3", - "meteor-babel": "7.4.10", + "meteor-babel": "7.4.11", // Keep the versions of these packages consistent with the versions // found in dev-bundle-server-package.js. "meteor-promise": "0.8.7", - reify: "0.20.3", + reify: "0.20.4", fibers: "3.1.1", // So that Babel can emit require("@babel/runtime/helpers/...") calls. "@babel/runtime": "7.4.4", From 16518dac52badd9bc22eb015c187e70b60d6be76 Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Thu, 20 Jun 2019 13:29:02 -0400 Subject: [PATCH 075/327] Bump $BUNDLE_VERSION to 8.16.0.7 before rebuilding dev bundle. --- meteor | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meteor b/meteor index 6dc3f6aa88..9548a30dae 100755 --- a/meteor +++ b/meteor @@ -1,6 +1,6 @@ #!/usr/bin/env bash -BUNDLE_VERSION=8.16.0.6 +BUNDLE_VERSION=8.16.0.7 # OS Check. Put here because here is where we download the precompiled # bundles that are arch specific. From 5c701daba713683689b831a90c07770a712b75f1 Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Thu, 20 Jun 2019 17:04:49 -0400 Subject: [PATCH 076/327] Update meteor-babel to latest version (7.4.12), again. --- History.md | 2 +- packages/babel-compiler/.npm/package/npm-shrinkwrap.json | 6 +++--- packages/babel-compiler/package.js | 2 +- scripts/dev-bundle-tool-package.js | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/History.md b/History.md index c59662b340..4120e19cbd 100644 --- a/History.md +++ b/History.md @@ -11,7 +11,7 @@ N/A * Node has been updated to version [8.16.0](https://nodejs.org/en/blog/release/v8.16.0/). -* The `meteor-babel` npm package has been updated to version 7.4.11. +* The `meteor-babel` npm package has been updated to version 7.4.12. * The `reify` npm package has been updated to version 0.20.4. diff --git a/packages/babel-compiler/.npm/package/npm-shrinkwrap.json b/packages/babel-compiler/.npm/package/npm-shrinkwrap.json index 2309051a65..f2975a45c5 100644 --- a/packages/babel-compiler/.npm/package/npm-shrinkwrap.json +++ b/packages/babel-compiler/.npm/package/npm-shrinkwrap.json @@ -604,9 +604,9 @@ "integrity": "sha1-G7nzFO9ri63tE7VJFpsqlF62jk0=" }, "meteor-babel": { - "version": "7.4.11", - "resolved": "https://registry.npmjs.org/meteor-babel/-/meteor-babel-7.4.11.tgz", - "integrity": "sha512-WWqdJpy65+tvLZ9yxwutvFunHr+il5kMsq/yCljiix/482L1YZb0GPPVH5MuSQ9IAGO30RPNr6M1PVqMco7STQ==" + "version": "7.4.12", + "resolved": "https://registry.npmjs.org/meteor-babel/-/meteor-babel-7.4.12.tgz", + "integrity": "sha512-G405OBkupPl7fOQYhzfTBFrk4FCJ801fwYH9CLN0uerfiwx1mm8tufXB98gjXlxg6EgaQ2TKH0+XwWwLkCVrgQ==" }, "meteor-babel-helpers": { "version": "0.0.3", diff --git a/packages/babel-compiler/package.js b/packages/babel-compiler/package.js index 2a7905cbe2..af61513199 100644 --- a/packages/babel-compiler/package.js +++ b/packages/babel-compiler/package.js @@ -10,7 +10,7 @@ Package.describe({ }); Npm.depends({ - 'meteor-babel': '7.4.11', + 'meteor-babel': '7.4.12', 'json5': '2.1.0' }); diff --git a/scripts/dev-bundle-tool-package.js b/scripts/dev-bundle-tool-package.js index 840919d660..001103fcf0 100644 --- a/scripts/dev-bundle-tool-package.js +++ b/scripts/dev-bundle-tool-package.js @@ -14,7 +14,7 @@ var packageJson = { pacote: "https://github.com/meteor/pacote/tarball/c5043daa1b768594e01d76275e3854fc19f038f9", "node-gyp": "3.7.0", "node-pre-gyp": "0.10.3", - "meteor-babel": "7.4.11", + "meteor-babel": "7.4.12", // Keep the versions of these packages consistent with the versions // found in dev-bundle-server-package.js. "meteor-promise": "0.8.7", From 13048740c8eecc66afaa2944d73fd127a4281162 Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Sun, 23 Jun 2019 11:10:51 -0400 Subject: [PATCH 077/327] Update meteor-babel and reify to latest versions, again. --- History.md | 4 ++-- .../.npm/package/npm-shrinkwrap.json | 18 +++++++++--------- packages/babel-compiler/package.js | 2 +- .../modules/.npm/package/npm-shrinkwrap.json | 6 +++--- packages/modules/package.js | 2 +- scripts/dev-bundle-tool-package.js | 4 ++-- 6 files changed, 18 insertions(+), 18 deletions(-) diff --git a/History.md b/History.md index 4120e19cbd..9e7c2c54fb 100644 --- a/History.md +++ b/History.md @@ -11,9 +11,9 @@ N/A * Node has been updated to version [8.16.0](https://nodejs.org/en/blog/release/v8.16.0/). -* The `meteor-babel` npm package has been updated to version 7.4.12. +* The `meteor-babel` npm package has been updated to version 7.4.13. -* The `reify` npm package has been updated to version 0.20.4. +* The `reify` npm package has been updated to version 0.20.5. * The `core-js` npm package used by `ecmascript-runtime-client` and `ecmascript-runtime-server` has been updated to version 3.1.4. diff --git a/packages/babel-compiler/.npm/package/npm-shrinkwrap.json b/packages/babel-compiler/.npm/package/npm-shrinkwrap.json index f2975a45c5..611862437e 100644 --- a/packages/babel-compiler/.npm/package/npm-shrinkwrap.json +++ b/packages/babel-compiler/.npm/package/npm-shrinkwrap.json @@ -604,9 +604,9 @@ "integrity": "sha1-G7nzFO9ri63tE7VJFpsqlF62jk0=" }, "meteor-babel": { - "version": "7.4.12", - "resolved": "https://registry.npmjs.org/meteor-babel/-/meteor-babel-7.4.12.tgz", - "integrity": "sha512-G405OBkupPl7fOQYhzfTBFrk4FCJ801fwYH9CLN0uerfiwx1mm8tufXB98gjXlxg6EgaQ2TKH0+XwWwLkCVrgQ==" + "version": "7.4.13", + "resolved": "https://registry.npmjs.org/meteor-babel/-/meteor-babel-7.4.13.tgz", + "integrity": "sha512-NAOh0UOzFd1rs3HmyerYlIWo6LyExqXwgn/hom1ZYCyd0ytL1Pm9dH7AZiM1gOiV50tjBWdMxx08fM5B5ScZDA==" }, "meteor-babel-helpers": { "version": "0.0.3", @@ -676,14 +676,14 @@ } }, "reify": { - "version": "0.20.4", - "resolved": "https://registry.npmjs.org/reify/-/reify-0.20.4.tgz", - "integrity": "sha512-uE8mYe+JsW9C7Cuaweo9bMRSx3+nNHUSFkJkT1kLogJnhtSENqqmm9D4J9EqTKsApqLSczl7vYKG6Kn4/3Kcqw==" + "version": "0.20.5", + "resolved": "https://registry.npmjs.org/reify/-/reify-0.20.5.tgz", + "integrity": "sha512-Pk4eu8KcVdIzZHT5Uviax2hUDcGp7lS6/VZuWEtPhy0hkXMSegi/uZKKEMV6PcpjpCBVgwyw7KgCHaUy5uJkeQ==" }, "resolve": { - "version": "1.11.0", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.11.0.tgz", - "integrity": "sha512-WL2pBDjqT6pGUNSUzMw00o4T7If+z4H2x3Gz893WoUQ5KW8Vr9txp00ykiP16VBaZF5+j/OcXJHZ9+PCvdiDKw==" + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.11.1.tgz", + "integrity": "sha512-vIpgF6wfuJOZI7KKKSP+HmiKggadPQAdsp5HiC1mvqnfp0gF1vdwgBWZIdrVft9pgqoMFQN+R7BSWZiBxx+BBw==" }, "safe-buffer": { "version": "5.1.2", diff --git a/packages/babel-compiler/package.js b/packages/babel-compiler/package.js index af61513199..2a95260005 100644 --- a/packages/babel-compiler/package.js +++ b/packages/babel-compiler/package.js @@ -10,7 +10,7 @@ Package.describe({ }); Npm.depends({ - 'meteor-babel': '7.4.12', + 'meteor-babel': '7.4.13', 'json5': '2.1.0' }); diff --git a/packages/modules/.npm/package/npm-shrinkwrap.json b/packages/modules/.npm/package/npm-shrinkwrap.json index a7259c0b92..5929deeeea 100644 --- a/packages/modules/.npm/package/npm-shrinkwrap.json +++ b/packages/modules/.npm/package/npm-shrinkwrap.json @@ -12,9 +12,9 @@ "integrity": "sha512-d3OEjQV4ROpoflsnUA8HozoIR504TFxNivYEUi6uwz0IYhBkTDXGuWlNdMtybRt3nqVx/L6XqMt0FxkXuWKZhw==" }, "reify": { - "version": "0.20.4", - "resolved": "https://registry.npmjs.org/reify/-/reify-0.20.4.tgz", - "integrity": "sha512-uE8mYe+JsW9C7Cuaweo9bMRSx3+nNHUSFkJkT1kLogJnhtSENqqmm9D4J9EqTKsApqLSczl7vYKG6Kn4/3Kcqw==" + "version": "0.20.5", + "resolved": "https://registry.npmjs.org/reify/-/reify-0.20.5.tgz", + "integrity": "sha512-Pk4eu8KcVdIzZHT5Uviax2hUDcGp7lS6/VZuWEtPhy0hkXMSegi/uZKKEMV6PcpjpCBVgwyw7KgCHaUy5uJkeQ==" }, "semver": { "version": "5.7.0", diff --git a/packages/modules/package.js b/packages/modules/package.js index cce21d1370..a629a54569 100644 --- a/packages/modules/package.js +++ b/packages/modules/package.js @@ -6,7 +6,7 @@ Package.describe({ }); Npm.depends({ - reify: "0.20.4" + reify: "0.20.5" }); Package.onUse(function(api) { diff --git a/scripts/dev-bundle-tool-package.js b/scripts/dev-bundle-tool-package.js index 001103fcf0..fc920e3ba1 100644 --- a/scripts/dev-bundle-tool-package.js +++ b/scripts/dev-bundle-tool-package.js @@ -14,11 +14,11 @@ var packageJson = { pacote: "https://github.com/meteor/pacote/tarball/c5043daa1b768594e01d76275e3854fc19f038f9", "node-gyp": "3.7.0", "node-pre-gyp": "0.10.3", - "meteor-babel": "7.4.12", + "meteor-babel": "7.4.13", // Keep the versions of these packages consistent with the versions // found in dev-bundle-server-package.js. "meteor-promise": "0.8.7", - reify: "0.20.4", + reify: "0.20.5", fibers: "3.1.1", // So that Babel can emit require("@babel/runtime/helpers/...") calls. "@babel/runtime": "7.4.4", From f214eba7d9de4beb524ad088d091dccf64bb292d Mon Sep 17 00:00:00 2001 From: Robert Lowe Date: Sun, 23 Jun 2019 11:54:48 -0400 Subject: [PATCH 078/327] Allow for METEOR_GIT_COMMIT_HASH in lieu of findGitCommitHash's execFile (#10586) --- tools/cordova/builder.js | 2 +- tools/isobuild/bundler.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/cordova/builder.js b/tools/cordova/builder.js index 8de83b8180..48bde099d8 100644 --- a/tools/cordova/builder.js +++ b/tools/cordova/builder.js @@ -488,7 +488,7 @@ export class CordovaBuilder { const runtimeConfig = { meteorRelease: meteorRelease, - gitCommitHash: files.findGitCommitHash(applicationPath), + gitCommitHash: process.env.METEOR_GIT_COMMIT_HASH || files.findGitCommitHash(applicationPath), ROOT_URL: mobileServerUrl, // XXX propagate it from this.options? ROOT_URL_PATH_PREFIX: '', diff --git a/tools/isobuild/bundler.js b/tools/isobuild/bundler.js index 1f7fd85365..01e94e5a2d 100644 --- a/tools/isobuild/bundler.js +++ b/tools/isobuild/bundler.js @@ -2943,7 +2943,7 @@ var writeSiteArchive = Profile("bundler writeSiteArchive", function ( meteorRelease: releaseName, nodeVersion: process.versions.node, npmVersion: meteorNpm.npmVersion, - gitCommitHash: files.findGitCommitHash(sourceRoot), + gitCommitHash: process.env.METEOR_GIT_COMMIT_HASH || files.findGitCommitHash(sourceRoot), }; // Tell the deploy server what version of the dependency kit we're using, so From a872401b09aabe4cc368c122a5f99f49fe540840 Mon Sep 17 00:00:00 2001 From: Konstantin Date: Sun, 23 Jun 2019 19:35:54 +0300 Subject: [PATCH 079/327] Update dev-bundle-tool-package.js (#10592) Need to update version "node-gyp" to "5.0.1", due to deprecated packages into 3.7.0 --- scripts/dev-bundle-tool-package.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/dev-bundle-tool-package.js b/scripts/dev-bundle-tool-package.js index fc920e3ba1..661e2a958b 100644 --- a/scripts/dev-bundle-tool-package.js +++ b/scripts/dev-bundle-tool-package.js @@ -12,7 +12,7 @@ var packageJson = { // and we want to make sure there are no dependencies on a higher version npm: "6.9.0", pacote: "https://github.com/meteor/pacote/tarball/c5043daa1b768594e01d76275e3854fc19f038f9", - "node-gyp": "3.7.0", + "node-gyp": "5.0.1", "node-pre-gyp": "0.10.3", "meteor-babel": "7.4.13", // Keep the versions of these packages consistent with the versions From a797bf3e67b792de86656b37e05e21359c9ab0ad Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Sun, 23 Jun 2019 12:37:46 -0400 Subject: [PATCH 080/327] Bump $BUNDLE_VERSION to 8.16.0.8 before rebuilding dev bundle. --- meteor | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meteor b/meteor index 9548a30dae..e658a6e30f 100755 --- a/meteor +++ b/meteor @@ -1,6 +1,6 @@ #!/usr/bin/env bash -BUNDLE_VERSION=8.16.0.7 +BUNDLE_VERSION=8.16.0.8 # OS Check. Put here because here is where we download the precompiled # bundles that are arch specific. From 168468dce360bdf93052ea7b5c7b2faeddd9efc9 Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Sun, 23 Jun 2019 14:55:43 -0400 Subject: [PATCH 081/327] Update meteor-babel to latest version (7.4.14). --- History.md | 2 +- packages/babel-compiler/.npm/package/npm-shrinkwrap.json | 6 +++--- packages/babel-compiler/package.js | 2 +- scripts/dev-bundle-tool-package.js | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/History.md b/History.md index 9e7c2c54fb..138acdcf71 100644 --- a/History.md +++ b/History.md @@ -11,7 +11,7 @@ N/A * Node has been updated to version [8.16.0](https://nodejs.org/en/blog/release/v8.16.0/). -* The `meteor-babel` npm package has been updated to version 7.4.13. +* The `meteor-babel` npm package has been updated to version 7.4.14. * The `reify` npm package has been updated to version 0.20.5. diff --git a/packages/babel-compiler/.npm/package/npm-shrinkwrap.json b/packages/babel-compiler/.npm/package/npm-shrinkwrap.json index 611862437e..dabcf839c8 100644 --- a/packages/babel-compiler/.npm/package/npm-shrinkwrap.json +++ b/packages/babel-compiler/.npm/package/npm-shrinkwrap.json @@ -604,9 +604,9 @@ "integrity": "sha1-G7nzFO9ri63tE7VJFpsqlF62jk0=" }, "meteor-babel": { - "version": "7.4.13", - "resolved": "https://registry.npmjs.org/meteor-babel/-/meteor-babel-7.4.13.tgz", - "integrity": "sha512-NAOh0UOzFd1rs3HmyerYlIWo6LyExqXwgn/hom1ZYCyd0ytL1Pm9dH7AZiM1gOiV50tjBWdMxx08fM5B5ScZDA==" + "version": "7.4.14", + "resolved": "https://registry.npmjs.org/meteor-babel/-/meteor-babel-7.4.14.tgz", + "integrity": "sha512-o2kRrgj2OTHxnQVEOKKAX9c5IPoUGiHFo57HkPwndqS6SOVqe8RcxVPlrB/aAvtC8VaIXH/FKLIstYd/usndEQ==" }, "meteor-babel-helpers": { "version": "0.0.3", diff --git a/packages/babel-compiler/package.js b/packages/babel-compiler/package.js index 2a95260005..b5a77b7298 100644 --- a/packages/babel-compiler/package.js +++ b/packages/babel-compiler/package.js @@ -10,7 +10,7 @@ Package.describe({ }); Npm.depends({ - 'meteor-babel': '7.4.13', + 'meteor-babel': '7.4.14', 'json5': '2.1.0' }); diff --git a/scripts/dev-bundle-tool-package.js b/scripts/dev-bundle-tool-package.js index 661e2a958b..02ec11603e 100644 --- a/scripts/dev-bundle-tool-package.js +++ b/scripts/dev-bundle-tool-package.js @@ -14,7 +14,7 @@ var packageJson = { pacote: "https://github.com/meteor/pacote/tarball/c5043daa1b768594e01d76275e3854fc19f038f9", "node-gyp": "5.0.1", "node-pre-gyp": "0.10.3", - "meteor-babel": "7.4.13", + "meteor-babel": "7.4.14", // Keep the versions of these packages consistent with the versions // found in dev-bundle-server-package.js. "meteor-promise": "0.8.7", From f259d553be288c3b495768d5eab65356d24b5db9 Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Sun, 23 Jun 2019 15:03:08 -0400 Subject: [PATCH 082/327] Update @wry/context to version 0.4.4. --- .../context/.npm/package/npm-shrinkwrap.json | 17 +++++++++++------ packages/context/package.js | 2 +- scripts/dev-bundle-tool-package.js | 2 +- 3 files changed, 13 insertions(+), 8 deletions(-) diff --git a/packages/context/.npm/package/npm-shrinkwrap.json b/packages/context/.npm/package/npm-shrinkwrap.json index 93b5b96251..daca025675 100644 --- a/packages/context/.npm/package/npm-shrinkwrap.json +++ b/packages/context/.npm/package/npm-shrinkwrap.json @@ -1,15 +1,20 @@ { "lockfileVersion": 1, "dependencies": { + "@types/node": { + "version": "12.0.10", + "resolved": "https://registry.npmjs.org/@types/node/-/node-12.0.10.tgz", + "integrity": "sha512-LcsGbPomWsad6wmMNv7nBLw7YYYyfdYcz6xryKYQhx89c3XXan+8Q6AJ43G5XDIaklaVkK3mE4fCb0SBvMiPSQ==" + }, "@wry/context": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/@wry/context/-/context-0.4.0.tgz", - "integrity": "sha512-rVjwzFjVYXJ8pWJ8ZRCHv6meOebQvfTlvnUYUNX93Ce0KNeMTqCkf0GiOJc6BNVB96s7qfvwoLN3nUgDnSFOOg==" + "version": "0.4.4", + "resolved": "https://registry.npmjs.org/@wry/context/-/context-0.4.4.tgz", + "integrity": "sha512-LrKVLove/zw6h2Md/KZyWxIkFM6AoyKp71OqpH9Hiip1csjPVoD3tPxlbQUNxEnHENks3UGgNpSBCAfq9KWuag==" }, "tslib": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.9.3.tgz", - "integrity": "sha512-4krF8scpejhaOgqzBEcGM7yDIEfi0/8+8zDRZhNZZ2kjmHJ4hv3zCbQWxoJGz1iw5U0Jl0nma13xzHXcncMavQ==" + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.10.0.tgz", + "integrity": "sha512-qOebF53frne81cf0S9B41ByenJ3/IuH8yJKngAX35CmiZySA0khhkovshKK+jGCaMnVomla7gVlIcc3EvKPbTQ==" } } } diff --git a/packages/context/package.js b/packages/context/package.js index fa5dee1fb7..b5bfcb1cad 100644 --- a/packages/context/package.js +++ b/packages/context/package.js @@ -6,7 +6,7 @@ Package.describe({ }); Npm.depends({ - "@wry/context": "0.4.0" + "@wry/context": "0.4.4" }); Package.onUse(function(api) { diff --git a/scripts/dev-bundle-tool-package.js b/scripts/dev-bundle-tool-package.js index 02ec11603e..00503e3748 100644 --- a/scripts/dev-bundle-tool-package.js +++ b/scripts/dev-bundle-tool-package.js @@ -58,7 +58,7 @@ var packageJson = { // The @wry/context package version must be compatible with the // version constraint imposed by optimism/package.json. optimism: "0.9.5", - "@wry/context": "0.4.0", + "@wry/context": "0.4.4", 'lru-cache': '4.1.3' } }; From 6afc82b48dead65a1538a56e2a89a8c61591f8f9 Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Sun, 23 Jun 2019 14:56:46 -0400 Subject: [PATCH 083/327] Bump $BUNDLE_VERSION to 8.16.0.9 before rebuilding dev bundle. --- meteor | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meteor b/meteor index e658a6e30f..64a815fad4 100755 --- a/meteor +++ b/meteor @@ -1,6 +1,6 @@ #!/usr/bin/env bash -BUNDLE_VERSION=8.16.0.8 +BUNDLE_VERSION=8.16.0.9 # OS Check. Put here because here is where we download the precompiled # bundles that are arch specific. From e70e1cda79902d87928c86f4e68395eb26603305 Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Sun, 23 Jun 2019 14:57:03 -0400 Subject: [PATCH 084/327] Bump package versions for 1.8.2-beta.6 release. --- packages/babel-compiler/package.js | 2 +- packages/context/package.js | 2 +- packages/ecmascript-runtime-client/package.js | 2 +- packages/ecmascript-runtime-server/package.js | 2 +- packages/ecmascript/package.js | 2 +- packages/meteor-tool/package.js | 2 +- packages/modules-runtime/package.js | 2 +- packages/modules/package.js | 2 +- scripts/admin/meteor-release-experimental.json | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/packages/babel-compiler/package.js b/packages/babel-compiler/package.js index b5a77b7298..ffd0800ea4 100644 --- a/packages/babel-compiler/package.js +++ b/packages/babel-compiler/package.js @@ -6,7 +6,7 @@ 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.4.0' + version: '7.4.0-beta182.6' }); Npm.depends({ diff --git a/packages/context/package.js b/packages/context/package.js index b5bfcb1cad..1337fed075 100644 --- a/packages/context/package.js +++ b/packages/context/package.js @@ -1,6 +1,6 @@ Package.describe({ name: "context", - version: "0.4.0-beta182.5", + version: "0.4.0-beta182.6", summary: "Manage contextual information without passing objects around", documentation: "README.md" }); diff --git a/packages/ecmascript-runtime-client/package.js b/packages/ecmascript-runtime-client/package.js index a84a617ebc..1a56783167 100644 --- a/packages/ecmascript-runtime-client/package.js +++ b/packages/ecmascript-runtime-client/package.js @@ -1,6 +1,6 @@ Package.describe({ name: "ecmascript-runtime-client", - version: "0.9.0", + version: "0.9.0-beta182.6", summary: "Polyfills for new ECMAScript 2015 APIs like Map and Set", git: "https://github.com/meteor/meteor/tree/devel/packages/ecmascript-runtime-client", documentation: "README.md" diff --git a/packages/ecmascript-runtime-server/package.js b/packages/ecmascript-runtime-server/package.js index 408e5ecd7e..8e717dc91c 100644 --- a/packages/ecmascript-runtime-server/package.js +++ b/packages/ecmascript-runtime-server/package.js @@ -1,6 +1,6 @@ Package.describe({ name: "ecmascript-runtime-server", - version: "0.8.0", + version: "0.8.0-beta182.6", summary: "Polyfills for new ECMAScript 2015 APIs like Map and Set", git: "https://github.com/meteor/meteor/tree/devel/packages/ecmascript-runtime-client", documentation: "README.md" diff --git a/packages/ecmascript/package.js b/packages/ecmascript/package.js index 5faccec9e6..c8bf25d517 100644 --- a/packages/ecmascript/package.js +++ b/packages/ecmascript/package.js @@ -1,6 +1,6 @@ Package.describe({ name: 'ecmascript', - version: '0.13.0', + version: '0.13.0-beta182.6', summary: 'Compiler plugin that supports ES2015+ in all .js files', documentation: 'README.md' }); diff --git a/packages/meteor-tool/package.js b/packages/meteor-tool/package.js index b1ae510a21..84f38cc126 100644 --- a/packages/meteor-tool/package.js +++ b/packages/meteor-tool/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "The Meteor command-line tool", - version: '1.8.2-beta.5' + version: '1.8.2-beta.6' }); Package.includeTool(); diff --git a/packages/modules-runtime/package.js b/packages/modules-runtime/package.js index 0746b2fb80..e32eb926b5 100644 --- a/packages/modules-runtime/package.js +++ b/packages/modules-runtime/package.js @@ -1,6 +1,6 @@ Package.describe({ name: "modules-runtime", - version: "0.11.0-beta182.5", + version: "0.11.0-beta182.6", summary: "CommonJS module system", git: "https://github.com/benjamn/install", documentation: "README.md" diff --git a/packages/modules/package.js b/packages/modules/package.js index a629a54569..a2546e8bfd 100644 --- a/packages/modules/package.js +++ b/packages/modules/package.js @@ -1,6 +1,6 @@ Package.describe({ name: "modules", - version: "0.14.0", + version: "0.14.0-beta182.6", summary: "CommonJS module system", documentation: "README.md" }); diff --git a/scripts/admin/meteor-release-experimental.json b/scripts/admin/meteor-release-experimental.json index f8adc50125..9f0980dc44 100644 --- a/scripts/admin/meteor-release-experimental.json +++ b/scripts/admin/meteor-release-experimental.json @@ -1,6 +1,6 @@ { "track": "METEOR", - "version": "1.8.2-beta.5", + "version": "1.8.2-beta.6", "recommended": false, "official": false, "description": "Meteor" From b17dd0d3e1303a19530529dee5ae448edcd5e598 Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Sun, 23 Jun 2019 17:49:00 -0400 Subject: [PATCH 085/327] Update mongodb npm package to version 3.2.7. --- History.md | 3 ++ .../.npm/package/npm-shrinkwrap.json | 30 +++++++++---------- packages/npm-mongo/package.js | 4 +-- 3 files changed, 20 insertions(+), 17 deletions(-) diff --git a/History.md b/History.md index 138acdcf71..c6f46fb3cc 100644 --- a/History.md +++ b/History.md @@ -11,6 +11,9 @@ N/A * Node has been updated to version [8.16.0](https://nodejs.org/en/blog/release/v8.16.0/). +* The `mongodb` npm package used by the `npm-mongo` Meteor package has + been updated to version 3.2.7. + * The `meteor-babel` npm package has been updated to version 7.4.14. * The `reify` npm package has been updated to version 0.20.5. diff --git a/packages/npm-mongo/.npm/package/npm-shrinkwrap.json b/packages/npm-mongo/.npm/package/npm-shrinkwrap.json index 83cc9f223b..e8d5467c68 100644 --- a/packages/npm-mongo/.npm/package/npm-shrinkwrap.json +++ b/packages/npm-mongo/.npm/package/npm-shrinkwrap.json @@ -2,9 +2,9 @@ "lockfileVersion": 1, "dependencies": { "bson": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/bson/-/bson-1.1.0.tgz", - "integrity": "sha512-9Aeai9TacfNtWXOYarkFJRW2CWo+dRon+fuLZYJmvLV3+MiUp0bEI6IAZfXEIg7/Pl/7IWlLaDnhzTsD81etQA==" + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/bson/-/bson-1.1.1.tgz", + "integrity": "sha512-jCGVYLoYMHDkOsbwJZBCqwMHyH4c+wzgI9hG7Z6SZJRXWr+x58pdIbm2i9a/jFGCkRJqRUr8eoI7lDWa0hTkxg==" }, "memory-pager": { "version": "1.5.0", @@ -12,14 +12,14 @@ "integrity": "sha512-ZS4Bp4r/Zoeq6+NLJpP+0Zzm0pR8whtGPf1XExKLJBAczGMnSi3It14OiNCStjQjM6NU1okjQGSxgEZN8eBYKg==" }, "mongodb": { - "version": "3.1.13", - "resolved": "https://registry.npmjs.org/mongodb/-/mongodb-3.1.13.tgz", - "integrity": "sha512-sz2dhvBZQWf3LRNDhbd30KHVzdjZx9IKC0L+kSZ/gzYquCF5zPOgGqRz6sSCqYZtKP2ekB4nfLxhGtzGHnIKxA==" + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/mongodb/-/mongodb-3.2.7.tgz", + "integrity": "sha512-2YdWrdf1PJgxcCrT1tWoL6nHuk6hCxhddAAaEh8QJL231ci4+P9FLyqopbTm2Z2sAU6mhCri+wd9r1hOcHdoMw==" }, "mongodb-core": { - "version": "3.1.11", - "resolved": "https://registry.npmjs.org/mongodb-core/-/mongodb-core-3.1.11.tgz", - "integrity": "sha512-rD2US2s5qk/ckbiiGFHeu+yKYDXdJ1G87F6CG3YdaZpzdOm5zpoAZd/EKbPmFO6cQZ+XVXBXBJ660sSI0gc6qg==" + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/mongodb-core/-/mongodb-core-3.2.7.tgz", + "integrity": "sha512-WypKdLxFNPOH/Jy6i9z47IjG2wIldA54iDZBmHMINcgKOUcWJh8og+Wix76oGd7EyYkHJKssQ2FAOw5Su/n4XQ==" }, "require_optional": { "version": "1.0.1", @@ -37,14 +37,14 @@ "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" }, "saslprep": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/saslprep/-/saslprep-1.0.2.tgz", - "integrity": "sha512-4cDsYuAjXssUSjxHKRe4DTZC0agDwsCqcMqtJAQPzC74nJ7LfAJflAtC1Zed5hMzEQKj82d3tuzqdGNRsLJ4Gw==" + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/saslprep/-/saslprep-1.0.3.tgz", + "integrity": "sha512-/MY/PEMbk2SuY5sScONwhUDsV2p77Znkb/q3nSVstq/yQzYJOH/Azh29p9oJLsl3LnQwSvZDKagDGBsBwSooag==" }, "semver": { - "version": "5.6.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.6.0.tgz", - "integrity": "sha512-RS9R6R35NYgQn++fkDWaOmqGoj4Ek9gGs+DPxNUZKuwE183xjJroKvyo1IzVFeXvUrvmALy6FWD5xrdJT25gMg==" + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.0.tgz", + "integrity": "sha512-Ya52jSX2u7QKghxeoFGpLwCtGlt7j0oY9DYb5apt9nPlJ42ID+ulTXESnt/qAQcoSERyZ5sl3LDIOw0nAn/5DA==" }, "sparse-bitfield": { "version": "3.0.3", diff --git a/packages/npm-mongo/package.js b/packages/npm-mongo/package.js index 656966a6b6..8893ec2bf5 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.1.2", + version: "3.2.0", documentation: null }); Npm.depends({ - mongodb: "3.1.13" + mongodb: "3.2.7" }); Package.onUse(function (api) { From b0cb1ceda3dbe7e1b505d0017f2ccc50d6eb7c40 Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Sun, 23 Jun 2019 19:19:35 -0400 Subject: [PATCH 086/327] Give different Timestamps to operations within a transaction. Follow-up to #10420, per this comment by @conorstrejcek: https://github.com/meteor/meteor/issues/10420#issuecomment-476833232 Should help with #10512. --- packages/mongo/oplog_tailing.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/packages/mongo/oplog_tailing.js b/packages/mongo/oplog_tailing.js index 8f2bc5dd76..5536ad1dcf 100644 --- a/packages/mongo/oplog_tailing.js +++ b/packages/mongo/oplog_tailing.js @@ -1,5 +1,8 @@ var Future = Npm.require('fibers/future'); +import { NpmModuleMongodb } from "meteor/npm-mongo"; +const { Timestamp } = NpmModuleMongodb; + OPLOG_COLLECTION = 'oplog.rs'; var TOO_FAR_BEHIND = process.env.METEOR_OPLOG_TOO_FAR_BEHIND || 2000; @@ -270,9 +273,13 @@ _.extend(OplogHandle.prototype, { if (doc.o.applyOps) { // This was a successful transaction, so we need to apply the // operations that were involved. + let nextTimestamp = doc.ts; doc.o.applyOps.forEach(op => { // See https://github.com/meteor/meteor/issues/10420. - op.ts = op.ts || doc.ts; + if (!op.ts) { + op.ts = nextTimestamp; + nextTimestamp = nextTimestamp.add(Timestamp.ONE); + } handleDoc(op); }); return; From 758d2ce7c8856a4609a7d4b4df33918e9517c0b0 Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Sun, 23 Jun 2019 19:39:28 -0400 Subject: [PATCH 087/327] Bump package versions for 1.8.2-beta.7 release. --- packages/babel-compiler/package.js | 2 +- packages/context/package.js | 2 +- packages/ecmascript-runtime-client/package.js | 2 +- packages/ecmascript-runtime-server/package.js | 2 +- packages/ecmascript/package.js | 2 +- packages/meteor-tool/package.js | 2 +- packages/modules-runtime/package.js | 2 +- packages/modules/package.js | 2 +- packages/npm-mongo/package.js | 2 +- scripts/admin/meteor-release-experimental.json | 2 +- 10 files changed, 10 insertions(+), 10 deletions(-) diff --git a/packages/babel-compiler/package.js b/packages/babel-compiler/package.js index ffd0800ea4..f6e811661d 100644 --- a/packages/babel-compiler/package.js +++ b/packages/babel-compiler/package.js @@ -6,7 +6,7 @@ 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.4.0-beta182.6' + version: '7.4.0-beta182.7' }); Npm.depends({ diff --git a/packages/context/package.js b/packages/context/package.js index 1337fed075..96ddb8c473 100644 --- a/packages/context/package.js +++ b/packages/context/package.js @@ -1,6 +1,6 @@ Package.describe({ name: "context", - version: "0.4.0-beta182.6", + version: "0.4.0-beta182.7", summary: "Manage contextual information without passing objects around", documentation: "README.md" }); diff --git a/packages/ecmascript-runtime-client/package.js b/packages/ecmascript-runtime-client/package.js index 1a56783167..f23a70bb5f 100644 --- a/packages/ecmascript-runtime-client/package.js +++ b/packages/ecmascript-runtime-client/package.js @@ -1,6 +1,6 @@ Package.describe({ name: "ecmascript-runtime-client", - version: "0.9.0-beta182.6", + version: "0.9.0-beta182.7", summary: "Polyfills for new ECMAScript 2015 APIs like Map and Set", git: "https://github.com/meteor/meteor/tree/devel/packages/ecmascript-runtime-client", documentation: "README.md" diff --git a/packages/ecmascript-runtime-server/package.js b/packages/ecmascript-runtime-server/package.js index 8e717dc91c..0ba861be0b 100644 --- a/packages/ecmascript-runtime-server/package.js +++ b/packages/ecmascript-runtime-server/package.js @@ -1,6 +1,6 @@ Package.describe({ name: "ecmascript-runtime-server", - version: "0.8.0-beta182.6", + version: "0.8.0-beta182.7", summary: "Polyfills for new ECMAScript 2015 APIs like Map and Set", git: "https://github.com/meteor/meteor/tree/devel/packages/ecmascript-runtime-client", documentation: "README.md" diff --git a/packages/ecmascript/package.js b/packages/ecmascript/package.js index c8bf25d517..9d6c1e03ca 100644 --- a/packages/ecmascript/package.js +++ b/packages/ecmascript/package.js @@ -1,6 +1,6 @@ Package.describe({ name: 'ecmascript', - version: '0.13.0-beta182.6', + version: '0.13.0-beta182.7', summary: 'Compiler plugin that supports ES2015+ in all .js files', documentation: 'README.md' }); diff --git a/packages/meteor-tool/package.js b/packages/meteor-tool/package.js index 84f38cc126..376ceabdcd 100644 --- a/packages/meteor-tool/package.js +++ b/packages/meteor-tool/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "The Meteor command-line tool", - version: '1.8.2-beta.6' + version: '1.8.2-beta.7' }); Package.includeTool(); diff --git a/packages/modules-runtime/package.js b/packages/modules-runtime/package.js index e32eb926b5..e931126c83 100644 --- a/packages/modules-runtime/package.js +++ b/packages/modules-runtime/package.js @@ -1,6 +1,6 @@ Package.describe({ name: "modules-runtime", - version: "0.11.0-beta182.6", + version: "0.11.0-beta182.7", summary: "CommonJS module system", git: "https://github.com/benjamn/install", documentation: "README.md" diff --git a/packages/modules/package.js b/packages/modules/package.js index a2546e8bfd..d39c22c3a3 100644 --- a/packages/modules/package.js +++ b/packages/modules/package.js @@ -1,6 +1,6 @@ Package.describe({ name: "modules", - version: "0.14.0-beta182.6", + version: "0.14.0-beta182.7", summary: "CommonJS module system", documentation: "README.md" }); diff --git a/packages/npm-mongo/package.js b/packages/npm-mongo/package.js index 8893ec2bf5..10ff8b9ad4 100644 --- a/packages/npm-mongo/package.js +++ b/packages/npm-mongo/package.js @@ -3,7 +3,7 @@ Package.describe({ summary: "Wrapper around the mongo npm package", - version: "3.2.0", + version: "3.2.0-beta182.7", documentation: null }); diff --git a/scripts/admin/meteor-release-experimental.json b/scripts/admin/meteor-release-experimental.json index 9f0980dc44..db84757449 100644 --- a/scripts/admin/meteor-release-experimental.json +++ b/scripts/admin/meteor-release-experimental.json @@ -1,6 +1,6 @@ { "track": "METEOR", - "version": "1.8.2-beta.6", + "version": "1.8.2-beta.7", "recommended": false, "official": false, "description": "Meteor" From 7a10dddb2ef12ce34d53b9eadc8781106daace31 Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Mon, 24 Jun 2019 11:11:16 -0400 Subject: [PATCH 088/327] Update meteor-babel and reify to latest versions. --- History.md | 4 ++-- .../babel-compiler/.npm/package/npm-shrinkwrap.json | 12 ++++++------ packages/babel-compiler/package.js | 2 +- packages/modules/.npm/package/npm-shrinkwrap.json | 6 +++--- packages/modules/package.js | 2 +- scripts/dev-bundle-tool-package.js | 4 ++-- 6 files changed, 15 insertions(+), 15 deletions(-) diff --git a/History.md b/History.md index c6f46fb3cc..e7ac11c3f4 100644 --- a/History.md +++ b/History.md @@ -14,9 +14,9 @@ N/A * The `mongodb` npm package used by the `npm-mongo` Meteor package has been updated to version 3.2.7. -* The `meteor-babel` npm package has been updated to version 7.4.14. +* The `meteor-babel` npm package has been updated to version 7.4.15. -* The `reify` npm package has been updated to version 0.20.5. +* The `reify` npm package has been updated to version 0.20.6. * The `core-js` npm package used by `ecmascript-runtime-client` and `ecmascript-runtime-server` has been updated to version 3.1.4. diff --git a/packages/babel-compiler/.npm/package/npm-shrinkwrap.json b/packages/babel-compiler/.npm/package/npm-shrinkwrap.json index dabcf839c8..084914105a 100644 --- a/packages/babel-compiler/.npm/package/npm-shrinkwrap.json +++ b/packages/babel-compiler/.npm/package/npm-shrinkwrap.json @@ -604,9 +604,9 @@ "integrity": "sha1-G7nzFO9ri63tE7VJFpsqlF62jk0=" }, "meteor-babel": { - "version": "7.4.14", - "resolved": "https://registry.npmjs.org/meteor-babel/-/meteor-babel-7.4.14.tgz", - "integrity": "sha512-o2kRrgj2OTHxnQVEOKKAX9c5IPoUGiHFo57HkPwndqS6SOVqe8RcxVPlrB/aAvtC8VaIXH/FKLIstYd/usndEQ==" + "version": "7.4.15", + "resolved": "https://registry.npmjs.org/meteor-babel/-/meteor-babel-7.4.15.tgz", + "integrity": "sha512-1HYThnReelvxW31ry5rZVTdvNqml8+JDsZYvvOjc2pIaMmo/6e3VlPU3Jv3hoYRDjxOO9OTohvWewfu6j0o+XA==" }, "meteor-babel-helpers": { "version": "0.0.3", @@ -676,9 +676,9 @@ } }, "reify": { - "version": "0.20.5", - "resolved": "https://registry.npmjs.org/reify/-/reify-0.20.5.tgz", - "integrity": "sha512-Pk4eu8KcVdIzZHT5Uviax2hUDcGp7lS6/VZuWEtPhy0hkXMSegi/uZKKEMV6PcpjpCBVgwyw7KgCHaUy5uJkeQ==" + "version": "0.20.6", + "resolved": "https://registry.npmjs.org/reify/-/reify-0.20.6.tgz", + "integrity": "sha512-kCgL6HyzFBK3fIKwurPn0O4+mzdK4R4uOYyQxXaYm4B+QgrQ1EHiQ222qsLPEhB1ReBRh+njO0I4kw7hCGfM2w==" }, "resolve": { "version": "1.11.1", diff --git a/packages/babel-compiler/package.js b/packages/babel-compiler/package.js index f6e811661d..4358854fe1 100644 --- a/packages/babel-compiler/package.js +++ b/packages/babel-compiler/package.js @@ -10,7 +10,7 @@ Package.describe({ }); Npm.depends({ - 'meteor-babel': '7.4.14', + 'meteor-babel': '7.4.15', 'json5': '2.1.0' }); diff --git a/packages/modules/.npm/package/npm-shrinkwrap.json b/packages/modules/.npm/package/npm-shrinkwrap.json index 5929deeeea..b32bfaa60f 100644 --- a/packages/modules/.npm/package/npm-shrinkwrap.json +++ b/packages/modules/.npm/package/npm-shrinkwrap.json @@ -12,9 +12,9 @@ "integrity": "sha512-d3OEjQV4ROpoflsnUA8HozoIR504TFxNivYEUi6uwz0IYhBkTDXGuWlNdMtybRt3nqVx/L6XqMt0FxkXuWKZhw==" }, "reify": { - "version": "0.20.5", - "resolved": "https://registry.npmjs.org/reify/-/reify-0.20.5.tgz", - "integrity": "sha512-Pk4eu8KcVdIzZHT5Uviax2hUDcGp7lS6/VZuWEtPhy0hkXMSegi/uZKKEMV6PcpjpCBVgwyw7KgCHaUy5uJkeQ==" + "version": "0.20.6", + "resolved": "https://registry.npmjs.org/reify/-/reify-0.20.6.tgz", + "integrity": "sha512-kCgL6HyzFBK3fIKwurPn0O4+mzdK4R4uOYyQxXaYm4B+QgrQ1EHiQ222qsLPEhB1ReBRh+njO0I4kw7hCGfM2w==" }, "semver": { "version": "5.7.0", diff --git a/packages/modules/package.js b/packages/modules/package.js index d39c22c3a3..3fd9bd2e28 100644 --- a/packages/modules/package.js +++ b/packages/modules/package.js @@ -6,7 +6,7 @@ Package.describe({ }); Npm.depends({ - reify: "0.20.5" + reify: "0.20.6" }); Package.onUse(function(api) { diff --git a/scripts/dev-bundle-tool-package.js b/scripts/dev-bundle-tool-package.js index 00503e3748..23f68fbef4 100644 --- a/scripts/dev-bundle-tool-package.js +++ b/scripts/dev-bundle-tool-package.js @@ -14,11 +14,11 @@ var packageJson = { pacote: "https://github.com/meteor/pacote/tarball/c5043daa1b768594e01d76275e3854fc19f038f9", "node-gyp": "5.0.1", "node-pre-gyp": "0.10.3", - "meteor-babel": "7.4.14", + "meteor-babel": "7.4.15", // Keep the versions of these packages consistent with the versions // found in dev-bundle-server-package.js. "meteor-promise": "0.8.7", - reify: "0.20.5", + reify: "0.20.6", fibers: "3.1.1", // So that Babel can emit require("@babel/runtime/helpers/...") calls. "@babel/runtime": "7.4.4", From df6e2ac43b451bfbcef5102f45e7d81b0d728134 Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Mon, 24 Jun 2019 11:13:12 -0400 Subject: [PATCH 089/327] Update node-pre-gyp to version 0.13.0. Since PR #10592 updated node-gyp to the latest version, we should update node-pre-gyp as well. --- History.md | 3 +++ scripts/dev-bundle-tool-package.js | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/History.md b/History.md index e7ac11c3f4..4ca015d76a 100644 --- a/History.md +++ b/History.md @@ -21,6 +21,9 @@ N/A * The `core-js` npm package used by `ecmascript-runtime-client` and `ecmascript-runtime-server` has been updated to version 3.1.4. +* The `node-gyp` npm package has been updated to version 5.0.1, and + `node-pre-gyp` has been updated to 0.13.0. + * When bundling client code, the Meteor module system now prefers the `"module"` field in `package.json`, if defined. Additionally, npm packages with a `"module"` entry point will now be compiled diff --git a/scripts/dev-bundle-tool-package.js b/scripts/dev-bundle-tool-package.js index 23f68fbef4..f18b6a618e 100644 --- a/scripts/dev-bundle-tool-package.js +++ b/scripts/dev-bundle-tool-package.js @@ -13,7 +13,7 @@ var packageJson = { npm: "6.9.0", pacote: "https://github.com/meteor/pacote/tarball/c5043daa1b768594e01d76275e3854fc19f038f9", "node-gyp": "5.0.1", - "node-pre-gyp": "0.10.3", + "node-pre-gyp": "0.13.0", "meteor-babel": "7.4.15", // Keep the versions of these packages consistent with the versions // found in dev-bundle-server-package.js. From 9abe331ed1923196b77ae1f38271304451507476 Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Mon, 24 Jun 2019 14:57:20 -0400 Subject: [PATCH 090/327] Bump $BUNDLE_VERSION to 8.16.0.10 before rebuilding dev bundle. --- meteor | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meteor b/meteor index 64a815fad4..1059f3e17d 100755 --- a/meteor +++ b/meteor @@ -1,6 +1,6 @@ #!/usr/bin/env bash -BUNDLE_VERSION=8.16.0.9 +BUNDLE_VERSION=8.16.0.10 # OS Check. Put here because here is where we download the precompiled # bundles that are arch specific. From 9f6c66aa255daff904f29f19a7926b7813f49220 Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Mon, 24 Jun 2019 15:22:23 -0400 Subject: [PATCH 091/327] Stop using Mongo Timestamp as cacheKey in DocFetcher. See my comment in issue #10512 for motivation: https://github.com/meteor/meteor/issues/10512#issuecomment-504797861 I think the changes in b0cb1ceda3dbe7e1b505d0017f2ccc50d6eb7c40 are still worthwhile because they ensure ops within a transaction have distinct Timestamps, with the caveat that we should avoid assuming those Timestamps are necessarily unique. --- packages/mongo/doc_fetcher.js | 43 ++++++++++++-------------- packages/mongo/doc_fetcher_tests.js | 21 +++++++------ packages/mongo/mongo_driver.js | 2 +- packages/mongo/oplog_observe_driver.js | 12 +++---- packages/mongo/package.js | 5 ++- 5 files changed, 40 insertions(+), 43 deletions(-) diff --git a/packages/mongo/doc_fetcher.js b/packages/mongo/doc_fetcher.js index fbc73bd3f5..2b3412d39c 100644 --- a/packages/mongo/doc_fetcher.js +++ b/packages/mongo/doc_fetcher.js @@ -1,38 +1,36 @@ var Fiber = Npm.require('fibers'); -var Future = Npm.require('fibers/future'); -DocFetcher = function (mongoConnection) { - var self = this; - self._mongoConnection = mongoConnection; - // Map from cache key -> [callback] - self._callbacksForCacheKey = {}; -}; +export class DocFetcher { + constructor(mongoConnection) { + this._mongoConnection = mongoConnection; + // Map from op -> [callback] + this._callbacksForOp = new Map; + } -_.extend(DocFetcher.prototype, { // Fetches document "id" from collectionName, returning it or null if not // found. // - // If you make multiple calls to fetch() with the same cacheKey (a string), + // If you make multiple calls to fetch() with the same op reference, // DocFetcher may assume that they all return the same document. (It does // not check to see if collectionName/id match.) // // You may assume that callback is never called synchronously (and in fact // OplogObserveDriver does so). - fetch: function (collectionName, id, cacheKey, callback) { - var self = this; + fetch(collectionName, id, op, callback) { + const self = this; check(collectionName, String); - // id is some sort of scalar - check(cacheKey, String); + check(op, Object); // If there's already an in-progress fetch for this cache key, yield until // it's done and return whatever it returns. - if (_.has(self._callbacksForCacheKey, cacheKey)) { - self._callbacksForCacheKey[cacheKey].push(callback); + if (self._callbacksForOp.has(op)) { + self._callbacksForOp.get(op).push(callback); return; } - var callbacks = self._callbacksForCacheKey[cacheKey] = [callback]; + const callbacks = [callback]; + self._callbacksForOp.set(op, callbacks); Fiber(function () { try { @@ -40,25 +38,22 @@ _.extend(DocFetcher.prototype, { collectionName, {_id: id}) || null; // Return doc to all relevant callbacks. Note that this array can // continue to grow during callback excecution. - while (!_.isEmpty(callbacks)) { + while (callbacks.length > 0) { // Clone the document so that the various calls to fetch don't return // objects that are intertwingled with each other. Clone before // popping the future, so that if clone throws, the error gets passed // to the next callback. - var clonedDoc = EJSON.clone(doc); - callbacks.pop()(null, clonedDoc); + callbacks.pop()(null, EJSON.clone(doc)); } } catch (e) { - while (!_.isEmpty(callbacks)) { + while (callbacks.length > 0) { callbacks.pop()(e); } } finally { // XXX consider keeping the doc around for a period of time before // removing from the cache - delete self._callbacksForCacheKey[cacheKey]; + self._callbacksForOp.delete(op); } }).run(); } -}); - -MongoTest.DocFetcher = DocFetcher; +} diff --git a/packages/mongo/doc_fetcher_tests.js b/packages/mongo/doc_fetcher_tests.js index 6637ed9bca..484b5f6d03 100644 --- a/packages/mongo/doc_fetcher_tests.js +++ b/packages/mongo/doc_fetcher_tests.js @@ -1,5 +1,6 @@ var Fiber = Npm.require('fibers'); var Future = Npm.require('fibers/future'); +import { DocFetcher } from "./doc_fetcher.js"; testAsyncMulti("mongo-livedata - doc fetcher", [ function (test, expect) { @@ -9,17 +10,19 @@ testAsyncMulti("mongo-livedata - doc fetcher", [ var id1 = collection.insert({x: 1}); var id2 = collection.insert({y: 2}); - var fetcher = new MongoTest.DocFetcher( + var fetcher = new DocFetcher( MongoInternals.defaultRemoteCollectionDriver().mongo); // Test basic operation. - fetcher.fetch(collName, id1, Random.id(), expect(null, {_id: id1, x: 1})); - fetcher.fetch(collName, "nonexistent!", Random.id(), expect(null, null)); + const fakeOp1 = {}; + const fakeOp2 = {}; + fetcher.fetch(collName, id1, fakeOp1, expect(null, {_id: id1, x: 1})); + fetcher.fetch(collName, "nonexistent!", fakeOp2, expect(null, null)); var fetched = false; - var cacheKey = Random.id(); + var fakeOp3 = {}; var expected = {_id: id2, y: 2}; - fetcher.fetch(collName, id2, cacheKey, expect(function (e, d) { + fetcher.fetch(collName, id2, fakeOp3, expect(function (e, d) { fetched = true; test.isFalse(e); test.equal(d, expected); @@ -27,10 +30,10 @@ testAsyncMulti("mongo-livedata - doc fetcher", [ // The fetcher yields. test.isFalse(fetched); - // Now ask for another document with the same cache key. Because a fetch for - // that cache key is in flight, we will get the other fetch's document, not - // this random document. - fetcher.fetch(collName, Random.id(), cacheKey, expect(function (e, d) { + // Now ask for another document with the same op reference. Because a + // fetch for that op is in flight, we will get the other fetch's + // document, not this random document. + fetcher.fetch(collName, Random.id(), fakeOp3, expect(function (e, d) { test.isFalse(e); test.equal(d, expected); })); diff --git a/packages/mongo/mongo_driver.js b/packages/mongo/mongo_driver.js index 69b84929dd..7245fd59d2 100644 --- a/packages/mongo/mongo_driver.js +++ b/packages/mongo/mongo_driver.js @@ -9,9 +9,9 @@ var MongoDB = NpmModuleMongodb; var Future = Npm.require('fibers/future'); +import { DocFetcher } from "./doc_fetcher.js"; MongoInternals = {}; -MongoTest = {}; MongoInternals.NpmModules = { mongodb: { diff --git a/packages/mongo/oplog_observe_driver.js b/packages/mongo/oplog_observe_driver.js index 8e42171d5c..113bbc93c8 100644 --- a/packages/mongo/oplog_observe_driver.js +++ b/packages/mongo/oplog_observe_driver.js @@ -504,10 +504,10 @@ _.extend(OplogObserveDriver.prototype, { var fut = new Future; // This loop is safe, because _currentlyFetching will not be updated // during this loop (in fact, it is never mutated). - self._currentlyFetching.forEach(function (cacheKey, id) { + self._currentlyFetching.forEach(function (op, id) { waiting++; self._mongoHandle._docFetcher.fetch( - self._cursorDescription.collectionName, id, cacheKey, + self._cursorDescription.collectionName, id, op, finishIfNeedToPollQuery(function (err, doc) { try { if (err) { @@ -567,7 +567,7 @@ _.extend(OplogObserveDriver.prototype, { _handleOplogEntryQuerying: function (op) { var self = this; Meteor._noYieldsAllowed(function () { - self._needToFetch.set(idForOp(op), op.ts.toString()); + self._needToFetch.set(idForOp(op), op); }); }, _handleOplogEntrySteadyOrFetching: function (op) { @@ -579,7 +579,7 @@ _.extend(OplogObserveDriver.prototype, { if (self._phase === PHASE.FETCHING && ((self._currentlyFetching && self._currentlyFetching.has(id)) || self._needToFetch.has(id))) { - self._needToFetch.set(id, op.ts.toString()); + self._needToFetch.set(id, op); return; } @@ -630,7 +630,7 @@ _.extend(OplogObserveDriver.prototype, { if (e.name !== "MinimongoError") throw e; // We didn't understand the modifier. Re-fetch. - self._needToFetch.set(id, op.ts.toString()); + self._needToFetch.set(id, op); if (self._phase === PHASE.STEADY) { self._fetchModifiedDocuments(); } @@ -640,7 +640,7 @@ _.extend(OplogObserveDriver.prototype, { } else if (!canDirectlyModifyDoc || self._matcher.canBecomeTrueByModifier(op.o) || (self._sorter && self._sorter.affectedByModifier(op.o))) { - self._needToFetch.set(id, op.ts.toString()); + self._needToFetch.set(id, op); if (self._phase === PHASE.STEADY) self._fetchModifiedDocuments(); } diff --git a/packages/mongo/package.js b/packages/mongo/package.js index 724a2b0c8f..9a1ef5274d 100644 --- a/packages/mongo/package.js +++ b/packages/mongo/package.js @@ -9,7 +9,7 @@ Package.describe({ summary: "Adaptor for using MongoDB and Minimongo over DDP", - version: '1.6.2' + version: '1.7.0' }); Npm.depends({ @@ -69,8 +69,7 @@ Package.onUse(function (api) { // Stuff that should be exposed via a real API, but we haven't yet. api.export('MongoInternals', 'server'); - // For tests only. - api.export('MongoTest', 'server', {testOnly: true}); + api.export("Mongo"); api.addFiles(['mongo_driver.js', 'oplog_tailing.js', From 2b53de2d2141b46fe8811d83e79fc8e657784546 Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Mon, 24 Jun 2019 15:27:42 -0400 Subject: [PATCH 092/327] Bump package versions for 1.8.2-beta.8 release. --- packages/babel-compiler/package.js | 2 +- packages/context/package.js | 2 +- packages/ecmascript-runtime-client/package.js | 2 +- packages/ecmascript-runtime-server/package.js | 2 +- packages/ecmascript/package.js | 2 +- packages/meteor-tool/package.js | 2 +- packages/modules-runtime/package.js | 2 +- packages/modules/package.js | 2 +- packages/mongo/package.js | 2 +- packages/npm-mongo/package.js | 2 +- scripts/admin/meteor-release-experimental.json | 2 +- 11 files changed, 11 insertions(+), 11 deletions(-) diff --git a/packages/babel-compiler/package.js b/packages/babel-compiler/package.js index 4358854fe1..340f307bc1 100644 --- a/packages/babel-compiler/package.js +++ b/packages/babel-compiler/package.js @@ -6,7 +6,7 @@ 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.4.0-beta182.7' + version: '7.4.0-beta182.8' }); Npm.depends({ diff --git a/packages/context/package.js b/packages/context/package.js index 96ddb8c473..db186eb98b 100644 --- a/packages/context/package.js +++ b/packages/context/package.js @@ -1,6 +1,6 @@ Package.describe({ name: "context", - version: "0.4.0-beta182.7", + version: "0.4.0-beta182.8", summary: "Manage contextual information without passing objects around", documentation: "README.md" }); diff --git a/packages/ecmascript-runtime-client/package.js b/packages/ecmascript-runtime-client/package.js index f23a70bb5f..3eb92e5b26 100644 --- a/packages/ecmascript-runtime-client/package.js +++ b/packages/ecmascript-runtime-client/package.js @@ -1,6 +1,6 @@ Package.describe({ name: "ecmascript-runtime-client", - version: "0.9.0-beta182.7", + version: "0.9.0-beta182.8", summary: "Polyfills for new ECMAScript 2015 APIs like Map and Set", git: "https://github.com/meteor/meteor/tree/devel/packages/ecmascript-runtime-client", documentation: "README.md" diff --git a/packages/ecmascript-runtime-server/package.js b/packages/ecmascript-runtime-server/package.js index 0ba861be0b..f106cbf71a 100644 --- a/packages/ecmascript-runtime-server/package.js +++ b/packages/ecmascript-runtime-server/package.js @@ -1,6 +1,6 @@ Package.describe({ name: "ecmascript-runtime-server", - version: "0.8.0-beta182.7", + version: "0.8.0-beta182.8", summary: "Polyfills for new ECMAScript 2015 APIs like Map and Set", git: "https://github.com/meteor/meteor/tree/devel/packages/ecmascript-runtime-client", documentation: "README.md" diff --git a/packages/ecmascript/package.js b/packages/ecmascript/package.js index 9d6c1e03ca..ea814f41dd 100644 --- a/packages/ecmascript/package.js +++ b/packages/ecmascript/package.js @@ -1,6 +1,6 @@ Package.describe({ name: 'ecmascript', - version: '0.13.0-beta182.7', + version: '0.13.0-beta182.8', summary: 'Compiler plugin that supports ES2015+ in all .js files', documentation: 'README.md' }); diff --git a/packages/meteor-tool/package.js b/packages/meteor-tool/package.js index 376ceabdcd..442cc909b1 100644 --- a/packages/meteor-tool/package.js +++ b/packages/meteor-tool/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "The Meteor command-line tool", - version: '1.8.2-beta.7' + version: '1.8.2-beta.8' }); Package.includeTool(); diff --git a/packages/modules-runtime/package.js b/packages/modules-runtime/package.js index e931126c83..c55c4016cd 100644 --- a/packages/modules-runtime/package.js +++ b/packages/modules-runtime/package.js @@ -1,6 +1,6 @@ Package.describe({ name: "modules-runtime", - version: "0.11.0-beta182.7", + version: "0.11.0-beta182.8", summary: "CommonJS module system", git: "https://github.com/benjamn/install", documentation: "README.md" diff --git a/packages/modules/package.js b/packages/modules/package.js index 3fd9bd2e28..3180a84378 100644 --- a/packages/modules/package.js +++ b/packages/modules/package.js @@ -1,6 +1,6 @@ Package.describe({ name: "modules", - version: "0.14.0-beta182.7", + version: "0.14.0-beta182.8", summary: "CommonJS module system", documentation: "README.md" }); diff --git a/packages/mongo/package.js b/packages/mongo/package.js index 9a1ef5274d..1fbf8fe7dd 100644 --- a/packages/mongo/package.js +++ b/packages/mongo/package.js @@ -9,7 +9,7 @@ Package.describe({ summary: "Adaptor for using MongoDB and Minimongo over DDP", - version: '1.7.0' + version: '1.7.0-beta182.8' }); Npm.depends({ diff --git a/packages/npm-mongo/package.js b/packages/npm-mongo/package.js index 10ff8b9ad4..a4b8c5801b 100644 --- a/packages/npm-mongo/package.js +++ b/packages/npm-mongo/package.js @@ -3,7 +3,7 @@ Package.describe({ summary: "Wrapper around the mongo npm package", - version: "3.2.0-beta182.7", + version: "3.2.0-beta182.8", documentation: null }); diff --git a/scripts/admin/meteor-release-experimental.json b/scripts/admin/meteor-release-experimental.json index db84757449..893ba3a6b2 100644 --- a/scripts/admin/meteor-release-experimental.json +++ b/scripts/admin/meteor-release-experimental.json @@ -1,6 +1,6 @@ { "track": "METEOR", - "version": "1.8.2-beta.7", + "version": "1.8.2-beta.8", "recommended": false, "official": false, "description": "Meteor" From 097b493a4ea3df1be4a58ca1f29c57b1415435e6 Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Mon, 24 Jun 2019 15:40:46 -0400 Subject: [PATCH 093/327] Use session.withTransaction to make Mongo Livedata test more robust. --- packages/mongo/mongo_livedata_tests.js | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/packages/mongo/mongo_livedata_tests.js b/packages/mongo/mongo_livedata_tests.js index 50ae855875..30ea3c10e1 100644 --- a/packages/mongo/mongo_livedata_tests.js +++ b/packages/mongo/mongo_livedata_tests.js @@ -3471,17 +3471,18 @@ if (Meteor.isServer) { }, 2000); const session = client.startSession(); - session.startTransaction(); - - Promise.awaitAll(["a", "b"].map((id, index) => { - return rawCollection.update( - { _id: id }, - { $set: { field: `updated${index + 1}` } }, - { session } - ); - })); - - Promise.await(session.commitTransaction()); - session.endSession(); + session.withTransaction(session => { + let promise = Promise.resolve(); + ["a", "b"].forEach((id, index) => { + promise = promise.then(() => rawCollection.update( + { _id: id }, + { $set: { field: `updated${index + 1}` } }, + { session } + )); + }); + return promise; + }).finally(() => { + session.endSession(); + }); }); } From a69ba4904d20377dcb66a32598b862ebd63a31db Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Tue, 25 Jun 2019 13:08:38 -0400 Subject: [PATCH 094/327] Move meteorBabelHelpers to modules package, and restrict to legacy bundle. (#10596) Should fix #10595. Code from the application `node_modules` directory becomes part of the `modules` package, so that it can be imported by any other package that uses the module system, regardless of package load order. Now that we compile code from `node_modules` using `babel-compiler` and `meteor-babel` (#10585), `node_modules` code requires the same runtime environment as any other Meteor JS code. For the most part, this need is satisfied by the `@babel/runtime/helpers/...` modules, which are also defined in the `modules` package because they come from `node_modules`. However, in the legacy bundle, `meteorBabelHelpers.sanitizeForInObject` is used to fix buggy for-in iteration in older Internet Explorers. Thankfully, this extra helper code does not need to be included in the modern or server bundles, but only in legacy code. --- packages/babel-runtime/.npm/package/.gitignore | 1 - packages/babel-runtime/.npm/package/README | 7 ------- .../babel-runtime/.npm/package/npm-shrinkwrap.json | 10 ---------- packages/babel-runtime/babel-runtime.js | 2 -- packages/babel-runtime/package.js | 7 +------ packages/ecmascript/runtime-tests.js | 6 ++++-- packages/modules/.npm/package/npm-shrinkwrap.json | 5 +++++ packages/modules/legacy.js | 4 ++++ packages/modules/package.js | 11 ++++++++++- 9 files changed, 24 insertions(+), 29 deletions(-) delete mode 100644 packages/babel-runtime/.npm/package/.gitignore delete mode 100644 packages/babel-runtime/.npm/package/README delete mode 100644 packages/babel-runtime/.npm/package/npm-shrinkwrap.json create mode 100644 packages/modules/legacy.js diff --git a/packages/babel-runtime/.npm/package/.gitignore b/packages/babel-runtime/.npm/package/.gitignore deleted file mode 100644 index 3c3629e647..0000000000 --- a/packages/babel-runtime/.npm/package/.gitignore +++ /dev/null @@ -1 +0,0 @@ -node_modules diff --git a/packages/babel-runtime/.npm/package/README b/packages/babel-runtime/.npm/package/README deleted file mode 100644 index 3d492553a4..0000000000 --- a/packages/babel-runtime/.npm/package/README +++ /dev/null @@ -1,7 +0,0 @@ -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/babel-runtime/.npm/package/npm-shrinkwrap.json b/packages/babel-runtime/.npm/package/npm-shrinkwrap.json deleted file mode 100644 index be3d02025a..0000000000 --- a/packages/babel-runtime/.npm/package/npm-shrinkwrap.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "lockfileVersion": 1, - "dependencies": { - "meteor-babel-helpers": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/meteor-babel-helpers/-/meteor-babel-helpers-0.0.3.tgz", - "integrity": "sha1-8uXZ+HlvvS6JAQI9dpnlsgLqn7A=" - } - } -} diff --git a/packages/babel-runtime/babel-runtime.js b/packages/babel-runtime/babel-runtime.js index 1df02e443d..00ebd17cd6 100644 --- a/packages/babel-runtime/babel-runtime.js +++ b/packages/babel-runtime/babel-runtime.js @@ -1,5 +1,3 @@ -exports.meteorBabelHelpers = require("meteor-babel-helpers"); - try { var babelRuntimeVersion = require("@babel/runtime/package.json").version; } catch (e) { diff --git a/packages/babel-runtime/package.js b/packages/babel-runtime/package.js index 3771b5697c..be812b2034 100644 --- a/packages/babel-runtime/package.js +++ b/packages/babel-runtime/package.js @@ -1,16 +1,11 @@ Package.describe({ name: "babel-runtime", summary: "Runtime support for output of Babel transpiler", - version: '1.3.0', + version: '1.4.0', documentation: 'README.md' }); -Npm.depends({ - "meteor-babel-helpers": "0.0.3" -}); - Package.onUse(function (api) { api.use("modules"); api.mainModule("babel-runtime.js"); - api.export("meteorBabelHelpers"); }); diff --git a/packages/ecmascript/runtime-tests.js b/packages/ecmascript/runtime-tests.js index 4ff00aa91e..bea03b6ab6 100644 --- a/packages/ecmascript/runtime-tests.js +++ b/packages/ecmascript/runtime-tests.js @@ -322,8 +322,10 @@ Tinytest.add("ecmascript - runtime - destructuring", (test) => { Tinytest.addAsync("ecmascript - runtime - misc support", (test, done) => { // Verify that the runtime was installed. - test.equal(typeof meteorBabelHelpers, "object"); - test.equal(typeof meteorBabelHelpers.sanitizeForInObject, "function"); + if (Meteor.isLegacy) { + test.equal(typeof meteorBabelHelpers, "object"); + test.equal(typeof meteorBabelHelpers.sanitizeForInObject, "function"); + } class Base { constructor(...args) { diff --git a/packages/modules/.npm/package/npm-shrinkwrap.json b/packages/modules/.npm/package/npm-shrinkwrap.json index b32bfaa60f..ff9273bf41 100644 --- a/packages/modules/.npm/package/npm-shrinkwrap.json +++ b/packages/modules/.npm/package/npm-shrinkwrap.json @@ -11,6 +11,11 @@ "resolved": "https://registry.npmjs.org/acorn-dynamic-import/-/acorn-dynamic-import-4.0.0.tgz", "integrity": "sha512-d3OEjQV4ROpoflsnUA8HozoIR504TFxNivYEUi6uwz0IYhBkTDXGuWlNdMtybRt3nqVx/L6XqMt0FxkXuWKZhw==" }, + "meteor-babel-helpers": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/meteor-babel-helpers/-/meteor-babel-helpers-0.0.3.tgz", + "integrity": "sha1-8uXZ+HlvvS6JAQI9dpnlsgLqn7A=" + }, "reify": { "version": "0.20.6", "resolved": "https://registry.npmjs.org/reify/-/reify-0.20.6.tgz", diff --git a/packages/modules/legacy.js b/packages/modules/legacy.js new file mode 100644 index 0000000000..53db73cbd2 --- /dev/null +++ b/packages/modules/legacy.js @@ -0,0 +1,4 @@ +// The meteor-babel/plugins/sanitize-for-in-objects plugin generates code +// that uses meteorBabelHelpers.sanitizeForInObject, but only when +// compiling code for the web.browser.legacy bundle. See #10595. +meteorBabelHelpers = require("meteor-babel-helpers"); diff --git a/packages/modules/package.js b/packages/modules/package.js index 3180a84378..f4fe7ffe7c 100644 --- a/packages/modules/package.js +++ b/packages/modules/package.js @@ -6,7 +6,8 @@ Package.describe({ }); Npm.depends({ - reify: "0.20.6" + reify: "0.20.6", + "meteor-babel-helpers": "0.0.3" }); Package.onUse(function(api) { @@ -14,4 +15,12 @@ Package.onUse(function(api) { api.mainModule("client.js", "client"); api.mainModule("server.js", "server"); api.export("meteorInstall"); + + // When compiling legacy code, the babel-compiler and meteor-babel + // packages assume meteorBabelHelpers.sanitizeForInObject is defined. + // Since the modules package is responsible for code from node_modules, + // it must also be responsible for exposing this runtime helper, but + // only in the legacy bundle. + api.addFiles("legacy.js", "legacy"); + api.export("meteorBabelHelpers", "legacy"); }); From 0a353c03ca7cc4816c3fe629fc5ba41ea99a1763 Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Tue, 25 Jun 2019 13:11:02 -0400 Subject: [PATCH 095/327] Bump package versions for 1.8.2-beta.9 release. --- packages/babel-compiler/package.js | 2 +- packages/babel-runtime/package.js | 2 +- packages/context/package.js | 2 +- packages/ecmascript-runtime-client/package.js | 2 +- packages/ecmascript-runtime-server/package.js | 2 +- packages/ecmascript/package.js | 2 +- packages/meteor-tool/package.js | 2 +- packages/modules-runtime/package.js | 2 +- packages/modules/package.js | 2 +- packages/mongo/package.js | 2 +- packages/npm-mongo/package.js | 2 +- scripts/admin/meteor-release-experimental.json | 2 +- 12 files changed, 12 insertions(+), 12 deletions(-) diff --git a/packages/babel-compiler/package.js b/packages/babel-compiler/package.js index 340f307bc1..dfbfcb0f7d 100644 --- a/packages/babel-compiler/package.js +++ b/packages/babel-compiler/package.js @@ -6,7 +6,7 @@ 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.4.0-beta182.8' + version: '7.4.0-beta182.9' }); Npm.depends({ diff --git a/packages/babel-runtime/package.js b/packages/babel-runtime/package.js index be812b2034..3b1e4443e4 100644 --- a/packages/babel-runtime/package.js +++ b/packages/babel-runtime/package.js @@ -1,7 +1,7 @@ Package.describe({ name: "babel-runtime", summary: "Runtime support for output of Babel transpiler", - version: '1.4.0', + version: '1.4.0-beta182.9', documentation: 'README.md' }); diff --git a/packages/context/package.js b/packages/context/package.js index db186eb98b..55cfff2cd6 100644 --- a/packages/context/package.js +++ b/packages/context/package.js @@ -1,6 +1,6 @@ Package.describe({ name: "context", - version: "0.4.0-beta182.8", + version: "0.4.0-beta182.9", summary: "Manage contextual information without passing objects around", documentation: "README.md" }); diff --git a/packages/ecmascript-runtime-client/package.js b/packages/ecmascript-runtime-client/package.js index 3eb92e5b26..eb8dbd409c 100644 --- a/packages/ecmascript-runtime-client/package.js +++ b/packages/ecmascript-runtime-client/package.js @@ -1,6 +1,6 @@ Package.describe({ name: "ecmascript-runtime-client", - version: "0.9.0-beta182.8", + version: "0.9.0-beta182.9", summary: "Polyfills for new ECMAScript 2015 APIs like Map and Set", git: "https://github.com/meteor/meteor/tree/devel/packages/ecmascript-runtime-client", documentation: "README.md" diff --git a/packages/ecmascript-runtime-server/package.js b/packages/ecmascript-runtime-server/package.js index f106cbf71a..7746df224a 100644 --- a/packages/ecmascript-runtime-server/package.js +++ b/packages/ecmascript-runtime-server/package.js @@ -1,6 +1,6 @@ Package.describe({ name: "ecmascript-runtime-server", - version: "0.8.0-beta182.8", + version: "0.8.0-beta182.9", summary: "Polyfills for new ECMAScript 2015 APIs like Map and Set", git: "https://github.com/meteor/meteor/tree/devel/packages/ecmascript-runtime-client", documentation: "README.md" diff --git a/packages/ecmascript/package.js b/packages/ecmascript/package.js index ea814f41dd..e0425a62e4 100644 --- a/packages/ecmascript/package.js +++ b/packages/ecmascript/package.js @@ -1,6 +1,6 @@ Package.describe({ name: 'ecmascript', - version: '0.13.0-beta182.8', + version: '0.13.0-beta182.9', summary: 'Compiler plugin that supports ES2015+ in all .js files', documentation: 'README.md' }); diff --git a/packages/meteor-tool/package.js b/packages/meteor-tool/package.js index 442cc909b1..ee6730b62b 100644 --- a/packages/meteor-tool/package.js +++ b/packages/meteor-tool/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "The Meteor command-line tool", - version: '1.8.2-beta.8' + version: '1.8.2-beta.9' }); Package.includeTool(); diff --git a/packages/modules-runtime/package.js b/packages/modules-runtime/package.js index c55c4016cd..e8e9fe2aa0 100644 --- a/packages/modules-runtime/package.js +++ b/packages/modules-runtime/package.js @@ -1,6 +1,6 @@ Package.describe({ name: "modules-runtime", - version: "0.11.0-beta182.8", + version: "0.11.0-beta182.9", summary: "CommonJS module system", git: "https://github.com/benjamn/install", documentation: "README.md" diff --git a/packages/modules/package.js b/packages/modules/package.js index f4fe7ffe7c..dd5d16bcaa 100644 --- a/packages/modules/package.js +++ b/packages/modules/package.js @@ -1,6 +1,6 @@ Package.describe({ name: "modules", - version: "0.14.0-beta182.8", + version: "0.14.0-beta182.9", summary: "CommonJS module system", documentation: "README.md" }); diff --git a/packages/mongo/package.js b/packages/mongo/package.js index 1fbf8fe7dd..c75c348761 100644 --- a/packages/mongo/package.js +++ b/packages/mongo/package.js @@ -9,7 +9,7 @@ Package.describe({ summary: "Adaptor for using MongoDB and Minimongo over DDP", - version: '1.7.0-beta182.8' + version: '1.7.0-beta182.9' }); Npm.depends({ diff --git a/packages/npm-mongo/package.js b/packages/npm-mongo/package.js index a4b8c5801b..105e7ec205 100644 --- a/packages/npm-mongo/package.js +++ b/packages/npm-mongo/package.js @@ -3,7 +3,7 @@ Package.describe({ summary: "Wrapper around the mongo npm package", - version: "3.2.0-beta182.8", + version: "3.2.0-beta182.9", documentation: null }); diff --git a/scripts/admin/meteor-release-experimental.json b/scripts/admin/meteor-release-experimental.json index 893ba3a6b2..32f4151516 100644 --- a/scripts/admin/meteor-release-experimental.json +++ b/scripts/admin/meteor-release-experimental.json @@ -1,6 +1,6 @@ { "track": "METEOR", - "version": "1.8.2-beta.8", + "version": "1.8.2-beta.9", "recommended": false, "official": false, "description": "Meteor" From e89d68f6363920747e9178b4c59efdaac0c6cadb Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Tue, 25 Jun 2019 14:11:05 -0400 Subject: [PATCH 096/327] Support .mjs modules (as well as .js and .jsx) in ecmascript plugin. https://github.com/meteor/meteor/pull/10522#issuecomment-505553025 --- packages/ecmascript/plugin.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/ecmascript/plugin.js b/packages/ecmascript/plugin.js index a12bf3e164..7f6fce671a 100644 --- a/packages/ecmascript/plugin.js +++ b/packages/ecmascript/plugin.js @@ -1,5 +1,5 @@ Plugin.registerCompiler({ - extensions: ['js', 'jsx'], + extensions: ['js', 'jsx', 'mjs'], }, function () { return new BabelCompiler({ react: true From 2dae9be56173053984eadab8c79dbd611e5df48b Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Tue, 25 Jun 2019 14:25:23 -0400 Subject: [PATCH 097/327] Regression test that the graphql package can be imported. --- tools/tests/apps/modules/package-lock.json | 13 +++++++++++++ tools/tests/apps/modules/package.json | 1 + tools/tests/apps/modules/tests.js | 13 +++++++++++++ 3 files changed, 27 insertions(+) diff --git a/tools/tests/apps/modules/package-lock.json b/tools/tests/apps/modules/package-lock.json index 8bacd1665f..e4166432ad 100644 --- a/tools/tests/apps/modules/package-lock.json +++ b/tools/tests/apps/modules/package-lock.json @@ -531,6 +531,14 @@ "resolved": "https://registry.npmjs.org/globals/-/globals-11.11.0.tgz", "integrity": "sha512-WHq43gS+6ufNOEqlrDBxVEbb8ntfXrfAUU2ZOpCxrBdGKW3gyv8mCxAfIBD0DroPKGrJ2eSsXsLtY9MPntsyTw==" }, + "graphql": { + "version": "14.3.1", + "resolved": "https://registry.npmjs.org/graphql/-/graphql-14.3.1.tgz", + "integrity": "sha512-FZm7kAa3FqKdXy8YSSpAoTtyDFMIYSpCDOr+3EqlI1bxmtHu+Vv/I2vrSeT1sBOEnEniX3uo4wFhFdS/8XN6gA==", + "requires": { + "iterall": "^1.2.2" + } + }, "has-flag": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", @@ -616,6 +624,11 @@ "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=" }, + "iterall": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/iterall/-/iterall-1.2.2.tgz", + "integrity": "sha512-yynBb1g+RFUPY64fTrFv7nsjRrENBQJaX2UL+2Szc9REFrSNm1rpSXHGzhmAy7a9uv3vlvgBlXnf9RqmPH1/DA==" + }, "jmespath": { "version": "0.15.0", "resolved": "https://registry.npmjs.org/jmespath/-/jmespath-0.15.0.tgz", diff --git a/tools/tests/apps/modules/package.json b/tools/tests/apps/modules/package.json index 71e483a11c..84de7c8e05 100644 --- a/tools/tests/apps/modules/package.json +++ b/tools/tests/apps/modules/package.json @@ -13,6 +13,7 @@ "aws-sdk": "^2.2.41", "cli-color": "^0.2.3", "github": "^0.2.4", + "graphql": "^14.3.1", "idle-gc": "^1.0.1", "immutable-tuple": "^0.4.4", "jsx-import-test": "file:imports/links/jsx-import-test", diff --git a/tools/tests/apps/modules/tests.js b/tools/tests/apps/modules/tests.js index 7d9399f12f..182866b2a2 100644 --- a/tools/tests/apps/modules/tests.js +++ b/tools/tests/apps/modules/tests.js @@ -358,6 +358,19 @@ describe("local node_modules", () => { "function", ); }); + + it("packages with .mjs entry points can be imported", () => { + assert.strictEqual( + require.resolve("graphql"), + "/node_modules/graphql/index." + ( + Meteor.isClient ? "mjs" : "js" + ), + ); + const { parse } = require("graphql"); + const nestedParse = require("graphql/language/parser").parse; + assert.strictEqual(typeof parse, "function"); + assert.strictEqual(parse, nestedParse); + }); }); describe("Meteor packages", () => { From 48276c3d3604a80518bdad69036db3ac25c6c7f5 Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Tue, 25 Jun 2019 14:28:38 -0400 Subject: [PATCH 098/327] Bump package versions for 1.8.2-beta.10 release. --- packages/babel-compiler/package.js | 2 +- packages/babel-runtime/package.js | 2 +- packages/context/package.js | 2 +- packages/ecmascript-runtime-client/package.js | 2 +- packages/ecmascript-runtime-server/package.js | 2 +- packages/ecmascript/package.js | 2 +- packages/meteor-tool/package.js | 2 +- packages/modules-runtime/package.js | 2 +- packages/modules/package.js | 2 +- packages/mongo/package.js | 2 +- packages/npm-mongo/package.js | 2 +- scripts/admin/meteor-release-experimental.json | 2 +- 12 files changed, 12 insertions(+), 12 deletions(-) diff --git a/packages/babel-compiler/package.js b/packages/babel-compiler/package.js index dfbfcb0f7d..38911141e9 100644 --- a/packages/babel-compiler/package.js +++ b/packages/babel-compiler/package.js @@ -6,7 +6,7 @@ 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.4.0-beta182.9' + version: '7.4.0-beta182.10' }); Npm.depends({ diff --git a/packages/babel-runtime/package.js b/packages/babel-runtime/package.js index 3b1e4443e4..3ca647def6 100644 --- a/packages/babel-runtime/package.js +++ b/packages/babel-runtime/package.js @@ -1,7 +1,7 @@ Package.describe({ name: "babel-runtime", summary: "Runtime support for output of Babel transpiler", - version: '1.4.0-beta182.9', + version: '1.4.0-beta182.10', documentation: 'README.md' }); diff --git a/packages/context/package.js b/packages/context/package.js index 55cfff2cd6..3cc00fcf4f 100644 --- a/packages/context/package.js +++ b/packages/context/package.js @@ -1,6 +1,6 @@ Package.describe({ name: "context", - version: "0.4.0-beta182.9", + version: "0.4.0-beta182.10", summary: "Manage contextual information without passing objects around", documentation: "README.md" }); diff --git a/packages/ecmascript-runtime-client/package.js b/packages/ecmascript-runtime-client/package.js index eb8dbd409c..0690bc49bd 100644 --- a/packages/ecmascript-runtime-client/package.js +++ b/packages/ecmascript-runtime-client/package.js @@ -1,6 +1,6 @@ Package.describe({ name: "ecmascript-runtime-client", - version: "0.9.0-beta182.9", + version: "0.9.0-beta182.10", summary: "Polyfills for new ECMAScript 2015 APIs like Map and Set", git: "https://github.com/meteor/meteor/tree/devel/packages/ecmascript-runtime-client", documentation: "README.md" diff --git a/packages/ecmascript-runtime-server/package.js b/packages/ecmascript-runtime-server/package.js index 7746df224a..5f8124a3da 100644 --- a/packages/ecmascript-runtime-server/package.js +++ b/packages/ecmascript-runtime-server/package.js @@ -1,6 +1,6 @@ Package.describe({ name: "ecmascript-runtime-server", - version: "0.8.0-beta182.9", + version: "0.8.0-beta182.10", summary: "Polyfills for new ECMAScript 2015 APIs like Map and Set", git: "https://github.com/meteor/meteor/tree/devel/packages/ecmascript-runtime-client", documentation: "README.md" diff --git a/packages/ecmascript/package.js b/packages/ecmascript/package.js index e0425a62e4..c3a20732c5 100644 --- a/packages/ecmascript/package.js +++ b/packages/ecmascript/package.js @@ -1,6 +1,6 @@ Package.describe({ name: 'ecmascript', - version: '0.13.0-beta182.9', + version: '0.13.0-beta182.10', summary: 'Compiler plugin that supports ES2015+ in all .js files', documentation: 'README.md' }); diff --git a/packages/meteor-tool/package.js b/packages/meteor-tool/package.js index ee6730b62b..e5278ca25f 100644 --- a/packages/meteor-tool/package.js +++ b/packages/meteor-tool/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "The Meteor command-line tool", - version: '1.8.2-beta.9' + version: '1.8.2-beta.10' }); Package.includeTool(); diff --git a/packages/modules-runtime/package.js b/packages/modules-runtime/package.js index e8e9fe2aa0..0570b026ba 100644 --- a/packages/modules-runtime/package.js +++ b/packages/modules-runtime/package.js @@ -1,6 +1,6 @@ Package.describe({ name: "modules-runtime", - version: "0.11.0-beta182.9", + version: "0.11.0-beta182.10", summary: "CommonJS module system", git: "https://github.com/benjamn/install", documentation: "README.md" diff --git a/packages/modules/package.js b/packages/modules/package.js index dd5d16bcaa..f8e3202d21 100644 --- a/packages/modules/package.js +++ b/packages/modules/package.js @@ -1,6 +1,6 @@ Package.describe({ name: "modules", - version: "0.14.0-beta182.9", + version: "0.14.0-beta182.10", summary: "CommonJS module system", documentation: "README.md" }); diff --git a/packages/mongo/package.js b/packages/mongo/package.js index c75c348761..af28b41dce 100644 --- a/packages/mongo/package.js +++ b/packages/mongo/package.js @@ -9,7 +9,7 @@ Package.describe({ summary: "Adaptor for using MongoDB and Minimongo over DDP", - version: '1.7.0-beta182.9' + version: '1.7.0-beta182.10' }); Npm.depends({ diff --git a/packages/npm-mongo/package.js b/packages/npm-mongo/package.js index 105e7ec205..a0a5c50439 100644 --- a/packages/npm-mongo/package.js +++ b/packages/npm-mongo/package.js @@ -3,7 +3,7 @@ Package.describe({ summary: "Wrapper around the mongo npm package", - version: "3.2.0-beta182.9", + version: "3.2.0-beta182.10", documentation: null }); diff --git a/scripts/admin/meteor-release-experimental.json b/scripts/admin/meteor-release-experimental.json index 32f4151516..213a8eb666 100644 --- a/scripts/admin/meteor-release-experimental.json +++ b/scripts/admin/meteor-release-experimental.json @@ -1,6 +1,6 @@ { "track": "METEOR", - "version": "1.8.2-beta.9", + "version": "1.8.2-beta.10", "recommended": false, "official": false, "description": "Meteor" From 9c3b55a74eb8c442576298633d9304cbc1c5530c Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Tue, 25 Jun 2019 14:32:42 -0400 Subject: [PATCH 099/327] Mention .mjs support in History.md. --- History.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/History.md b/History.md index 4ca015d76a..75c5d44575 100644 --- a/History.md +++ b/History.md @@ -31,6 +31,10 @@ N/A special symlinking tricks. [PR #10541](https://github.com/meteor/meteor/pull/10541) +* In addition to the `.js` and `.jsx` file extensions, the `ecmascript` + compiler plugin now automatically handles JavaScript modules with the + `.mjs` file extension. + * Add `--cordova-server-port` option to override local port where Cordova will serve static resources, which is useful when multiple Cordova apps are built from the same application source code, since by default the port is generated From b5c49408e4955f20e3d62d0fe405fa3865c85d55 Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Fri, 28 Jun 2019 15:14:01 -0400 Subject: [PATCH 100/327] Update optimism to version 0.10.0. --- History.md | 3 +++ scripts/dev-bundle-tool-package.js | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/History.md b/History.md index 75c5d44575..e22d069936 100644 --- a/History.md +++ b/History.md @@ -24,6 +24,9 @@ N/A * The `node-gyp` npm package has been updated to version 5.0.1, and `node-pre-gyp` has been updated to 0.13.0. +* The `optimism` npm package has been updated to version 0.10.0, which + enables caching of thrown exceptions, as well as ordinary results. + * When bundling client code, the Meteor module system now prefers the `"module"` field in `package.json`, if defined. Additionally, npm packages with a `"module"` entry point will now be compiled diff --git a/scripts/dev-bundle-tool-package.js b/scripts/dev-bundle-tool-package.js index f18b6a618e..94cc48b6ca 100644 --- a/scripts/dev-bundle-tool-package.js +++ b/scripts/dev-bundle-tool-package.js @@ -57,7 +57,7 @@ var packageJson = { pathwatcher: "8.0.2", // The @wry/context package version must be compatible with the // version constraint imposed by optimism/package.json. - optimism: "0.9.5", + optimism: "0.10.0", "@wry/context": "0.4.4", 'lru-cache': '4.1.3' } From 0aa35032e8b54809d95c10952f90fc3bfa822cc8 Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Fri, 28 Jun 2019 15:16:02 -0400 Subject: [PATCH 101/327] Update pathwatcher to version 8.1.0. --- History.md | 2 ++ scripts/dev-bundle-tool-package.js | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/History.md b/History.md index e22d069936..3728304fe7 100644 --- a/History.md +++ b/History.md @@ -27,6 +27,8 @@ N/A * The `optimism` npm package has been updated to version 0.10.0, which enables caching of thrown exceptions, as well as ordinary results. +* The `pathwatcher` npm package has been updated to version 8.1.0. + * When bundling client code, the Meteor module system now prefers the `"module"` field in `package.json`, if defined. Additionally, npm packages with a `"module"` entry point will now be compiled diff --git a/scripts/dev-bundle-tool-package.js b/scripts/dev-bundle-tool-package.js index 94cc48b6ca..16d2eb28ff 100644 --- a/scripts/dev-bundle-tool-package.js +++ b/scripts/dev-bundle-tool-package.js @@ -54,7 +54,7 @@ var packageJson = { escope: "3.6.0", split2: "2.2.0", multipipe: "2.0.1", - pathwatcher: "8.0.2", + pathwatcher: "8.1.0", // The @wry/context package version must be compatible with the // version constraint imposed by optimism/package.json. optimism: "0.10.0", From 00387ccce3c93870aff659b6b208832631abde07 Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Fri, 28 Jun 2019 15:18:25 -0400 Subject: [PATCH 102/327] Update npm to version 6.9.2. --- History.md | 2 ++ scripts/build-dev-bundle-common.sh | 2 +- scripts/dev-bundle-tool-package.js | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/History.md b/History.md index 3728304fe7..e1749ba821 100644 --- a/History.md +++ b/History.md @@ -11,6 +11,8 @@ N/A * Node has been updated to version [8.16.0](https://nodejs.org/en/blog/release/v8.16.0/). +* The `npm` npm package has been updated to version 6.9.2. + * The `mongodb` npm package used by the `npm-mongo` Meteor package has been updated to version 3.2.7. diff --git a/scripts/build-dev-bundle-common.sh b/scripts/build-dev-bundle-common.sh index 58a1d79928..196a759718 100644 --- a/scripts/build-dev-bundle-common.sh +++ b/scripts/build-dev-bundle-common.sh @@ -8,7 +8,7 @@ ARCH=$(uname -m) NODE_VERSION=8.16.0 MONGO_VERSION_64BIT=4.0.6 MONGO_VERSION_32BIT=3.2.22 -NPM_VERSION=6.9.0 +NPM_VERSION=6.9.2 # If we built Node from source on Jenkins, this is the build number. NODE_BUILD_NUMBER= diff --git a/scripts/dev-bundle-tool-package.js b/scripts/dev-bundle-tool-package.js index 16d2eb28ff..266f7950b7 100644 --- a/scripts/dev-bundle-tool-package.js +++ b/scripts/dev-bundle-tool-package.js @@ -10,7 +10,7 @@ var packageJson = { dependencies: { // Explicit dependency because we are replacing it with a bundled version // and we want to make sure there are no dependencies on a higher version - npm: "6.9.0", + npm: "6.9.2", pacote: "https://github.com/meteor/pacote/tarball/c5043daa1b768594e01d76275e3854fc19f038f9", "node-gyp": "5.0.1", "node-pre-gyp": "0.13.0", From 414dc316d3fdfe97fe5997afec0ad236c331a496 Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Fri, 28 Jun 2019 15:20:04 -0400 Subject: [PATCH 103/327] Bump $BUNDLE_VERSION to 8.16.0.11 before rebuilding dev bundle. --- meteor | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meteor b/meteor index 1059f3e17d..e104f81489 100755 --- a/meteor +++ b/meteor @@ -1,6 +1,6 @@ #!/usr/bin/env bash -BUNDLE_VERSION=8.16.0.10 +BUNDLE_VERSION=8.16.0.11 # OS Check. Put here because here is where we download the precompiled # bundles that are arch specific. From a245003f15800bcc9670c9bfd57331878fc656de Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Fri, 28 Jun 2019 22:55:10 -0400 Subject: [PATCH 104/327] Update optimism to version 0.10.2. --- History.md | 2 +- scripts/dev-bundle-tool-package.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/History.md b/History.md index e1749ba821..36c6f5765f 100644 --- a/History.md +++ b/History.md @@ -26,7 +26,7 @@ N/A * The `node-gyp` npm package has been updated to version 5.0.1, and `node-pre-gyp` has been updated to 0.13.0. -* The `optimism` npm package has been updated to version 0.10.0, which +* The `optimism` npm package has been updated to version 0.10.2, which enables caching of thrown exceptions, as well as ordinary results. * The `pathwatcher` npm package has been updated to version 8.1.0. diff --git a/scripts/dev-bundle-tool-package.js b/scripts/dev-bundle-tool-package.js index 266f7950b7..6386088510 100644 --- a/scripts/dev-bundle-tool-package.js +++ b/scripts/dev-bundle-tool-package.js @@ -57,7 +57,7 @@ var packageJson = { pathwatcher: "8.1.0", // The @wry/context package version must be compatible with the // version constraint imposed by optimism/package.json. - optimism: "0.10.0", + optimism: "0.10.2", "@wry/context": "0.4.4", 'lru-cache': '4.1.3' } From c664acc457241e116da4dee41bfd3a2929a42daa Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Fri, 28 Jun 2019 23:17:46 -0400 Subject: [PATCH 105/327] Bump $BUNDLE_VERSION to 8.16.0.12 before rebuilding dev bundle. --- meteor | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meteor b/meteor index e104f81489..ee6f9cb66c 100755 --- a/meteor +++ b/meteor @@ -1,6 +1,6 @@ #!/usr/bin/env bash -BUNDLE_VERSION=8.16.0.11 +BUNDLE_VERSION=8.16.0.12 # OS Check. Put here because here is where we download the precompiled # bundles that are arch specific. From f61ba60326a9434b4f2c12900e684cb9b4ea82ee Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Sat, 29 Jun 2019 18:44:16 -0400 Subject: [PATCH 106/327] Support meteor.nodeModules.recompile package.json configuration option. Example: "meteor": { "mainModule": ..., "testModule": ..., "nodeModules": { "recompile": { "very-modern-package": ["client", "server"], "alternate-notation-for-client-and-server": true, "somewhat-modern-package": "legacy", "another-package": ["legacy", "server"] } } } The keys of the meteor.nodeModules.recompile configuration object are npm package names, and the values specify for which bundles those packages should be recompiled using the Meteor compiler plugins system, as if the packages were part of the Meteor application. For example, if an npm package uses const/let syntax or arrow functions, that's fine for modern and server code, but you would probably want to recompile the package when building the legacy bundle. To accomplish this, specify "legacy" or ["legacy"] as the value of the package's property, similar to somewhat-modern-package above. These strings and arrays of strings have the same meaning as the second argument to api.addFiles(files, where) in a package.js file. This configuration serves pretty much the same purpose as symlinking an application directory into node_modules, but without any symlinking: https://forums.meteor.com/t/litelement-import-litelement-html/45042/8?u=benjamn The meteor.nodeModules.recompile configuration currently applies to the application node_modules directory only (not to Npm.depends dependencies in Meteor packages). Recompiled packages must be direct dependencies of the application. --- tools/isobuild/package-source.js | 36 ++++++++++++++------ tools/project-context.js | 56 +++++++++++++++++++++++++++----- 2 files changed, 73 insertions(+), 19 deletions(-) diff --git a/tools/isobuild/package-source.js b/tools/isobuild/package-source.js index 210f6d03e8..ec0998d9fc 100644 --- a/tools/isobuild/package-source.js +++ b/tools/isobuild/package-source.js @@ -860,6 +860,9 @@ _.extend(PackageSource.prototype, { const testModulesByArch = projectContext.meteorConfig.getTestModulesByArch(); + const nodeModulesToRecompileByArch = + projectContext.meteorConfig.getNodeModulesToRecompileByArch(); + projectWatchSet.merge(projectContext.meteorConfig.watchSet); _.each(compiler.ALL_ARCHES, function (arch) { @@ -871,10 +874,13 @@ _.extend(PackageSource.prototype, { } const mainModule = projectContext.meteorConfig - .getMainModuleForArch(arch, mainModulesByArch); + .getMainModule(arch, mainModulesByArch); const testModule = projectContext.meteorConfig - .getTestModuleForArch(arch, testModulesByArch); + .getTestModule(arch, testModulesByArch); + + const nodeModulesToRecompile = projectContext.meteorConfig + .getNodeModulesToRecompile(arch, nodeModulesToRecompileByArch); // XXX what about /web.browser/* etc, these directories could also // be for specific client targets. @@ -895,6 +901,7 @@ _.extend(PackageSource.prototype, { ignoreFiles, isApp: true, testModule, + nodeModulesToRecompile, }; // If this architecture has a mainModule defined in @@ -1094,6 +1101,7 @@ _.extend(PackageSource.prototype, { isApp, sourceArch, testModule, + nodeModulesToRecompile = new Set, loopChecker = new SymlinkLoopChecker(this.sourceRoot), ignoreFiles = [] }) { @@ -1254,7 +1262,7 @@ _.extend(PackageSource.prototype, { // If we're in a node_modules directory, cache the results of the // find function for the duration of the process. - const cacheKey = inNodeModules && makeCacheKey(dir); + let cacheKey = inNodeModules && makeCacheKey(dir); if (cacheKey && cacheKey in self._findSourcesCache) { return self._findSourcesCache[cacheKey]; @@ -1273,14 +1281,22 @@ _.extend(PackageSource.prototype, { } } - const pkgJson = optimisticLookupPackageJson(self.sourceRoot, dir); - const hasModuleEntryPoint = pkgJson && ( - isWeb ? typeof pkgJson.module === "string" : pkgJson.type === "module" - ); + let readOptions = sourceReadOptions; + if (inNodeModules) { + const pkgJson = optimisticLookupPackageJson(self.sourceRoot, dir); + const shouldRecompile = + pkgJson && nodeModulesToRecompile.has(pkgJson.name); + const hasModuleEntryPoint = pkgJson && ( + typeof pkgJson.module === "string" || pkgJson.type === "module" + ); - const readOptions = inNodeModules && !hasModuleEntryPoint - ? nodeModulesReadOptions - : sourceReadOptions; + if (hasModuleEntryPoint || shouldRecompile) { + // Avoid caching node_modules code recompiled by Meteor. + cacheKey = false; + } else { + readOptions = nodeModulesReadOptions; + } + } const sources = _.difference( self._readAndWatchDirectory(dir, watchSet, readOptions), diff --git a/tools/project-context.js b/tools/project-context.js index 7806436baf..fdc136b9f2 100644 --- a/tools/project-context.js +++ b/tools/project-context.js @@ -1649,9 +1649,47 @@ export class MeteorConfig { } } - // Call this first if you plan to call getMainModuleForArch multiple + getNodeModulesToRecompileByArch() { + const packageNamesByArch = Object.create(null); + const recompile = this.get("nodeModules", "recompile"); + + if (recompile && typeof recompile === "object") { + const get = arch => packageNamesByArch[arch] || ( + packageNamesByArch[arch] = new Set); + + Object.keys(recompile).forEach(packageName => { + const info = recompile[packageName]; + if (! info) return; + if (info === true) { + get("web").add(packageName); + get("os").add(packageName); + } else if (typeof info === "string") { + mapWhereToArches(info).forEach(arch => { + get(arch).add(packageName); + }); + } else if (Array.isArray(info)) { + info.forEach(where => { + mapWhereToArches(where).forEach(arch => { + get(arch).add(packageName); + }); + }); + } + }); + } + + return packageNamesByArch; + } + + getNodeModulesToRecompile( + arch, + packageNamesByArch = this.getNodeModulesToRecompileByArch(), + ) { + return packageNamesByArch[arch]; + } + + // Call this first if you plan to call getMainModule multiple // times, so that you can avoid repeating this work each time. - getMainModulesByArch(arch) { + getMainModulesByArch() { return this._getEntryModulesByArch("mainModule"); } @@ -1659,24 +1697,24 @@ export class MeteorConfig { // that architecture. For example, if this.config.mainModule.client is // defined, then because mapWhereToArch("client") === "web", and "web" // matches web.browser, return this.config.mainModule.client. - getMainModuleForArch( + getMainModule( arch, mainModulesByArch = this.getMainModulesByArch(), ) { - return this._getEntryModuleForArch(arch, mainModulesByArch); + return this._getEntryModule(arch, mainModulesByArch); } // Analogous to getMainModulesByArch, except for this.config.testModule. - getTestModulesByArch(arch) { + getTestModulesByArch() { return this._getEntryModulesByArch("testModule"); } - // Analogous to getMainModuleForArch, except for this.config.testModule. - getTestModuleForArch( + // Analogous to getMainModule, except for this.config.testModule. + getTestModule( arch, testModulesByArch = this.getTestModulesByArch(), ) { - return this._getEntryModuleForArch(arch, testModulesByArch); + return this._getEntryModule(arch, testModulesByArch); } _getEntryModulesByArch(...keys) { @@ -1703,7 +1741,7 @@ export class MeteorConfig { return entryModulesByArch; } - _getEntryModuleForArch( + _getEntryModule( arch, entryModulesByArch, ) { From 9c120b7a065eec9422482e758f41c7c6a1f3a370 Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Fri, 28 Jun 2019 15:18:48 -0400 Subject: [PATCH 107/327] Compile unanticipated node_modules code with Reify only, again. In PR #10585, I tried enabling full compiler plugin processing for any modules imported from `node_modules` that were not otherwise handled by compiler plugins, but doing that for all packages was just too slow, not to mention potentially dangerous for modules whose code cannot be safely recompiled by Babel. The primary reasons for wanting to recompile node_modules are 1. to enable "native" ECMAScript `import`/`export` syntax (given that Node.js still does not fully support ESM syntax yet), and 2. to compile standard syntax like `const`, `let`, classes, and arrow functions for legacy browsers. The first goal can be achieved by compiling unanticipated `node_modules` code with Reify, which is much faster than Babel, in part because Reify can avoid doing any parsing when the source contains no `import` or `export` identifiers. This compilation is also cached on disk, so its impact should only be felt during cold builds after a `meteor reset`. The second goal can be accomplished using the new `package.json` configuration option `meteor.nodeModules.recompile`, which causes the recompiled packages to be handled by the normal compiler plugins system, so that the `ImportScanner`'s fallback compilation is not necessary. Before this option was introduced, this recompilation behavior could be achieved by symlinking application directories into `node_modules`, but that always felt like an esoteric hack. --- tools/isobuild/compiler-plugin.js | 1 - tools/isobuild/import-scanner.js | 56 ++++++++++++++++++++----------- 2 files changed, 37 insertions(+), 20 deletions(-) diff --git a/tools/isobuild/compiler-plugin.js b/tools/isobuild/compiler-plugin.js index be9f762546..c65c191cd9 100644 --- a/tools/isobuild/compiler-plugin.js +++ b/tools/isobuild/compiler-plugin.js @@ -1343,7 +1343,6 @@ export class PackageSourceBatch { sourceRoot: batch.sourceRoot, nodeModulesPaths, watchSet: batch.unibuild.watchSet, - compileOneJsResource: batch.compileOneJsResource.bind(batch), cacheDir: batch.scannerCacheDir, }); diff --git a/tools/isobuild/import-scanner.js b/tools/isobuild/import-scanner.js index 248b62dbac..361a64f92a 100644 --- a/tools/isobuild/import-scanner.js +++ b/tools/isobuild/import-scanner.js @@ -65,26 +65,36 @@ function stripHashBang(dataString) { return dataString.replace(/^#![^\n]*/, ""); } -const reifyCompileWithCache = wrap(function ({ dataString }) { - return reifyCompile(stripHashBang(dataString), { +const reifyCompileWithCache = Profile("reifyCompileWithCache", wrap(function ( + source, + hash, + bundleArch, +) { + const isLegacy = + bundleArch === "web.browser.legacy" || + bundleArch === "web.cordova"; + + return reifyCompile(stripHashBang(source), { + generateLetDeclarations: !isLegacy, + avoidModernSyntax: isLegacy, + enforceStrictMode: false, dynamicImport: true, + ast: false, }).code; }, { - makeCacheKey({ hash }) { - return hash; + makeCacheKey(source, hash, bundleArch) { + return JSON.stringify([hash, bundleArch]); } -}); +})); class DefaultHandlers { constructor({ sourceRoot, cacheDir, bundleArch, - compileOneJsResource, }) { Object.assign(this, { sourceRoot, - compileOneJsResource, }); if (cacheDir) { @@ -100,14 +110,16 @@ class DefaultHandlers { } js(file) { - if (this.compileOneJsResource) { - const jsOutputResources = this.compileOneJsResource({ - data: file.data, - path: pathRelative(this.sourceRoot, file.absPath), - hash: file.hash, - }); - if (jsOutputResources.length > 0) { - return jsOutputResources[0].data.toString("utf8"); + const parts = file.absPath.split("/"); + const nmi = parts.lastIndexOf("node_modules"); + if (nmi >= 0) { + const nextPart = parts[nmi + 1]; + // The core-js package is one example of a package that does not + // need recompilation to support import/export syntax. Since it is + // used heavily by the ecmascript-runtime-{client,server} Meteor + // packages, it makes sense to hard-code this exception. + if (nextPart === "core-js") { + return stripHashBang(file.dataString); } } @@ -117,12 +129,20 @@ class DefaultHandlers { return optimisticReadFile(cacheFileName, "utf8"); } catch (e) { if (e.code !== "ENOENT") throw e; - const code = reifyCompileWithCache(file); + const code = reifyCompileWithCache( + file.dataString, + file.hash, + this.bundleArch, + ); process.nextTick(writeFileAtomically, cacheFileName, code); return code; } } else { - return reifyCompileWithCache(file); + return reifyCompileWithCache( + file.dataString, + file.hash, + this.bundleArch, + ); } } @@ -255,7 +275,6 @@ export default class ImportScanner { nodeModulesPaths = [], watchSet, cacheDir, - compileOneJsResource, }) { assert.ok(isString(sourceRoot)); @@ -275,7 +294,6 @@ export default class ImportScanner { sourceRoot, cacheDir, bundleArch, - compileOneJsResource, }); this.resolver = Resolver.getOrCreate({ From 4384fdb917c9bb87a50b5c3e32ce9178d958292d Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Mon, 1 Jul 2019 12:42:51 -0400 Subject: [PATCH 108/327] Update meteor-babel and reify to latest versions. This ensures we wrap modules with a function to rename the `module` identifier to something more reliable when the ImportScanner compiles unanticipated modules imported from node_modules. --- History.md | 4 ++-- .../.npm/package/npm-shrinkwrap.json | 22 ++++++++++++++----- packages/babel-compiler/package.js | 2 +- .../modules/.npm/package/npm-shrinkwrap.json | 16 +++++++++++--- packages/modules/package.js | 2 +- scripts/dev-bundle-tool-package.js | 4 ++-- 6 files changed, 35 insertions(+), 15 deletions(-) diff --git a/History.md b/History.md index 36c6f5765f..4f0312ff61 100644 --- a/History.md +++ b/History.md @@ -16,9 +16,9 @@ N/A * The `mongodb` npm package used by the `npm-mongo` Meteor package has been updated to version 3.2.7. -* The `meteor-babel` npm package has been updated to version 7.4.15. +* The `meteor-babel` npm package has been updated to version 7.4.17. -* The `reify` npm package has been updated to version 0.20.6. +* The `reify` npm package has been updated to version 0.20.9. * The `core-js` npm package used by `ecmascript-runtime-client` and `ecmascript-runtime-server` has been updated to version 3.1.4. diff --git a/packages/babel-compiler/.npm/package/npm-shrinkwrap.json b/packages/babel-compiler/.npm/package/npm-shrinkwrap.json index 084914105a..d2e00811f5 100644 --- a/packages/babel-compiler/.npm/package/npm-shrinkwrap.json +++ b/packages/babel-compiler/.npm/package/npm-shrinkwrap.json @@ -603,10 +603,15 @@ "resolved": "https://registry.npmjs.org/lodash.some/-/lodash.some-4.6.0.tgz", "integrity": "sha1-G7nzFO9ri63tE7VJFpsqlF62jk0=" }, + "magic-string": { + "version": "0.25.3", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.25.3.tgz", + "integrity": "sha512-6QK0OpF/phMz0Q2AxILkX2mFhi7m+WMwTRg0LQKq/WBB0cDP4rYH3Wp4/d3OTXlrPLVJT/RFqj8tFeAR4nk8AA==" + }, "meteor-babel": { - "version": "7.4.15", - "resolved": "https://registry.npmjs.org/meteor-babel/-/meteor-babel-7.4.15.tgz", - "integrity": "sha512-1HYThnReelvxW31ry5rZVTdvNqml8+JDsZYvvOjc2pIaMmo/6e3VlPU3Jv3hoYRDjxOO9OTohvWewfu6j0o+XA==" + "version": "7.4.17", + "resolved": "https://registry.npmjs.org/meteor-babel/-/meteor-babel-7.4.17.tgz", + "integrity": "sha512-s+3IYFfu887+bj4Sn9yQ0NirWIOikf5ucFGxwDTmDRIeSXjt2c8Vk6DF3fCForTm35x3paC3PpbOIyG4Rs6nkw==" }, "meteor-babel-helpers": { "version": "0.0.3", @@ -676,9 +681,9 @@ } }, "reify": { - "version": "0.20.6", - "resolved": "https://registry.npmjs.org/reify/-/reify-0.20.6.tgz", - "integrity": "sha512-kCgL6HyzFBK3fIKwurPn0O4+mzdK4R4uOYyQxXaYm4B+QgrQ1EHiQ222qsLPEhB1ReBRh+njO0I4kw7hCGfM2w==" + "version": "0.20.9", + "resolved": "https://registry.npmjs.org/reify/-/reify-0.20.9.tgz", + "integrity": "sha512-t6j9KqO5/UY3fz8ocdNmXA+Fy7C7HiBydArSox7OoK14pEGyHRZoUZk5Kv7zoRPnCL+6Zn+9JfJyZJkW9rFTGw==" }, "resolve": { "version": "1.11.1", @@ -700,6 +705,11 @@ "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=" }, + "sourcemap-codec": { + "version": "1.4.4", + "resolved": "https://registry.npmjs.org/sourcemap-codec/-/sourcemap-codec-1.4.4.tgz", + "integrity": "sha512-CYAPYdBu34781kLHkaW3m6b/uUSyMOC2R61gcYMWooeuaGtjof86ZA/8T+qVPPt7np1085CR9hmMGrySwEc8Xg==" + }, "supports-color": { "version": "5.5.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", diff --git a/packages/babel-compiler/package.js b/packages/babel-compiler/package.js index 38911141e9..3bbb48830a 100644 --- a/packages/babel-compiler/package.js +++ b/packages/babel-compiler/package.js @@ -10,7 +10,7 @@ Package.describe({ }); Npm.depends({ - 'meteor-babel': '7.4.15', + 'meteor-babel': '7.4.17', 'json5': '2.1.0' }); diff --git a/packages/modules/.npm/package/npm-shrinkwrap.json b/packages/modules/.npm/package/npm-shrinkwrap.json index ff9273bf41..9b2c9264ea 100644 --- a/packages/modules/.npm/package/npm-shrinkwrap.json +++ b/packages/modules/.npm/package/npm-shrinkwrap.json @@ -11,20 +11,30 @@ "resolved": "https://registry.npmjs.org/acorn-dynamic-import/-/acorn-dynamic-import-4.0.0.tgz", "integrity": "sha512-d3OEjQV4ROpoflsnUA8HozoIR504TFxNivYEUi6uwz0IYhBkTDXGuWlNdMtybRt3nqVx/L6XqMt0FxkXuWKZhw==" }, + "magic-string": { + "version": "0.25.3", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.25.3.tgz", + "integrity": "sha512-6QK0OpF/phMz0Q2AxILkX2mFhi7m+WMwTRg0LQKq/WBB0cDP4rYH3Wp4/d3OTXlrPLVJT/RFqj8tFeAR4nk8AA==" + }, "meteor-babel-helpers": { "version": "0.0.3", "resolved": "https://registry.npmjs.org/meteor-babel-helpers/-/meteor-babel-helpers-0.0.3.tgz", "integrity": "sha1-8uXZ+HlvvS6JAQI9dpnlsgLqn7A=" }, "reify": { - "version": "0.20.6", - "resolved": "https://registry.npmjs.org/reify/-/reify-0.20.6.tgz", - "integrity": "sha512-kCgL6HyzFBK3fIKwurPn0O4+mzdK4R4uOYyQxXaYm4B+QgrQ1EHiQ222qsLPEhB1ReBRh+njO0I4kw7hCGfM2w==" + "version": "0.20.9", + "resolved": "https://registry.npmjs.org/reify/-/reify-0.20.9.tgz", + "integrity": "sha512-t6j9KqO5/UY3fz8ocdNmXA+Fy7C7HiBydArSox7OoK14pEGyHRZoUZk5Kv7zoRPnCL+6Zn+9JfJyZJkW9rFTGw==" }, "semver": { "version": "5.7.0", "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.0.tgz", "integrity": "sha512-Ya52jSX2u7QKghxeoFGpLwCtGlt7j0oY9DYb5apt9nPlJ42ID+ulTXESnt/qAQcoSERyZ5sl3LDIOw0nAn/5DA==" + }, + "sourcemap-codec": { + "version": "1.4.4", + "resolved": "https://registry.npmjs.org/sourcemap-codec/-/sourcemap-codec-1.4.4.tgz", + "integrity": "sha512-CYAPYdBu34781kLHkaW3m6b/uUSyMOC2R61gcYMWooeuaGtjof86ZA/8T+qVPPt7np1085CR9hmMGrySwEc8Xg==" } } } diff --git a/packages/modules/package.js b/packages/modules/package.js index f8e3202d21..f119ba1e0d 100644 --- a/packages/modules/package.js +++ b/packages/modules/package.js @@ -6,7 +6,7 @@ Package.describe({ }); Npm.depends({ - reify: "0.20.6", + reify: "0.20.9", "meteor-babel-helpers": "0.0.3" }); diff --git a/scripts/dev-bundle-tool-package.js b/scripts/dev-bundle-tool-package.js index 6386088510..bc42e318dc 100644 --- a/scripts/dev-bundle-tool-package.js +++ b/scripts/dev-bundle-tool-package.js @@ -14,11 +14,11 @@ var packageJson = { pacote: "https://github.com/meteor/pacote/tarball/c5043daa1b768594e01d76275e3854fc19f038f9", "node-gyp": "5.0.1", "node-pre-gyp": "0.13.0", - "meteor-babel": "7.4.15", + "meteor-babel": "7.4.17", // Keep the versions of these packages consistent with the versions // found in dev-bundle-server-package.js. "meteor-promise": "0.8.7", - reify: "0.20.6", + reify: "0.20.9", fibers: "3.1.1", // So that Babel can emit require("@babel/runtime/helpers/...") calls. "@babel/runtime": "7.4.4", From a3425321089879326a5c508cf5f7c43f01d0d7ec Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Mon, 1 Jul 2019 12:45:34 -0400 Subject: [PATCH 109/327] Bump $BUNDLE_VERSION to 8.16.0.13 before rebuilding dev bundle. --- meteor | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meteor b/meteor index ee6f9cb66c..8c57e8d0f3 100755 --- a/meteor +++ b/meteor @@ -1,6 +1,6 @@ #!/usr/bin/env bash -BUNDLE_VERSION=8.16.0.12 +BUNDLE_VERSION=8.16.0.13 # OS Check. Put here because here is where we download the precompiled # bundles that are arch specific. From 4dfc74197a98a31e8f763b44681347a3585d87a3 Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Tue, 2 Jul 2019 11:30:55 -0400 Subject: [PATCH 110/327] Avoid delegating to module.useNode() for .js and .mjs modules. This partially reverts f0d39b86e61390677254834730dc08390620dfd1 by simply including .js and .mjs modules in the server bundle, rather than delegating to pure Node evaluation. In practice, whether or not the package has a "module" entry point (or "type":"module") in its package.json was not a perfect indicator of whether it should be compiled with Reify and bundled, or left untouched and handled by Node. Truly native modules (such as those with a .node file extension) should always be handled by Node, so module.useNode() definitely still has a role to play in the server bundle. --- tools/isobuild/import-scanner.js | 50 ++++++++------------------------ 1 file changed, 12 insertions(+), 38 deletions(-) diff --git a/tools/isobuild/import-scanner.js b/tools/isobuild/import-scanner.js index 361a64f92a..5e685f91a9 100644 --- a/tools/isobuild/import-scanner.js +++ b/tools/isobuild/import-scanner.js @@ -36,7 +36,6 @@ const { import { optimisticReadFile, optimisticStatOrNull, - optimisticLookupPackageJson, optimisticLStatOrNull, optimisticHashOrNull, shouldWatch, @@ -1168,15 +1167,7 @@ export default class ImportScanner { // raw version found in node_modules. See also: // https://github.com/meteor/meteor-feature-requests/issues/6 - } else if ( - this._shouldUseNode(absModuleId) && - // If the package has a "module" entry point in its package.json file, - // there's a chance someone might import an ESM module from the package - // on the server (without going through package.json), so to be safe we - // need to compile ESM syntax for any modules imported from the package, - // instead of just calling module.useNode() and hoping for the best. - ! this._hasModuleEntryPoint(absPath) - ) { + } else if (this._shouldUseNode(absModuleId)) { // On the server, modules in node_modules directories will be // handled natively by Node, so we just need to generate a stub // module that calls module.useNode(), rather than calling @@ -1223,34 +1214,6 @@ export default class ImportScanner { return depFile; } - _hasModuleEntryPoint(absPath) { - const pkgJson = this._lookupPackageJson(absPath); - // Similar to logic in PackageSource#_findSources. - return pkgJson && ( - typeof pkgJson.module === "string" || - pkgJson.type === "module" - ); - } - - _lookupPackageJson(absPath) { - const relDir = pathRelative( - this.sourceRoot, - pathDirname(absPath), - ); - - if (relDir.startsWith("..")) { - const absParts = absPath.split("/"); - absParts.pop(); // Get rid of base filename. - const nmi = absParts.lastIndexOf("node_modules"); - return optimisticLookupPackageJson( - absParts.slice(0, nmi + 1).join("/"), - absParts.slice(nmi + 1).join("/"), - ); - } - - return optimisticLookupPackageJson(this.sourceRoot, relDir); - } - // Similar to logic in Module.prototype.useNode as defined in // packages/modules-runtime/server.js. Introduced to fix issue #10122. _shouldUseNode(absModuleId) { @@ -1259,6 +1222,17 @@ export default class ImportScanner { return false; } + if ( + absModuleId.endsWith(".js") || + absModuleId.endsWith(".mjs") + ) { + return false; + } + + if (absModuleId.endsWith(".node")) { + return true; + } + const parts = absModuleId.split("/"); let start = 0; From 108144c3d54b4814796f35fb53e438ab2858c0a4 Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Tue, 2 Jul 2019 11:34:20 -0400 Subject: [PATCH 111/327] Update @babel/* dependencies of modules test app. --- tools/tests/apps/modules/package-lock.json | 100 ++++++++++----------- tools/tests/apps/modules/package.json | 8 +- 2 files changed, 54 insertions(+), 54 deletions(-) diff --git a/tools/tests/apps/modules/package-lock.json b/tools/tests/apps/modules/package-lock.json index e4166432ad..560220b40a 100644 --- a/tools/tests/apps/modules/package-lock.json +++ b/tools/tests/apps/modules/package-lock.json @@ -12,17 +12,17 @@ } }, "@babel/core": { - "version": "7.4.3", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.4.3.tgz", - "integrity": "sha512-oDpASqKFlbspQfzAE7yaeTmdljSH2ADIvBlb0RwbStltTuWa0+7CCI1fYVINNv9saHPa1W7oaKeuNuKj+RQCvA==", + "version": "7.4.5", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.4.5.tgz", + "integrity": "sha512-OvjIh6aqXtlsA8ujtGKfC7LYWksYSX8yQcM8Ay3LuvVeQ63lcOKgoZWVqcpFwkd29aYU9rVx7jxhfhiEDV9MZA==", "requires": { "@babel/code-frame": "^7.0.0", - "@babel/generator": "^7.4.0", - "@babel/helpers": "^7.4.3", - "@babel/parser": "^7.4.3", - "@babel/template": "^7.4.0", - "@babel/traverse": "^7.4.3", - "@babel/types": "^7.4.0", + "@babel/generator": "^7.4.4", + "@babel/helpers": "^7.4.4", + "@babel/parser": "^7.4.5", + "@babel/template": "^7.4.4", + "@babel/traverse": "^7.4.5", + "@babel/types": "^7.4.4", "convert-source-map": "^1.1.0", "debug": "^4.1.0", "json5": "^2.1.0", @@ -33,11 +33,11 @@ } }, "@babel/generator": { - "version": "7.4.0", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.4.0.tgz", - "integrity": "sha512-/v5I+a1jhGSKLgZDcmAUZ4K/VePi43eRkUs3yePW1HB1iANOD5tqJXwGSG4BZhSksP8J9ejSlwGeTiiOFZOrXQ==", + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.4.4.tgz", + "integrity": "sha512-53UOLK6TVNqKxf7RUh8NE851EHRxOOeVXKbK2bivdb+iziMyk03Sr4eaE9OELCbyZAAafAKPDwF2TPUES5QbxQ==", "requires": { - "@babel/types": "^7.4.0", + "@babel/types": "^7.4.4", "jsesc": "^2.5.1", "lodash": "^4.17.11", "source-map": "^0.5.0", @@ -68,21 +68,21 @@ "integrity": "sha512-CYAOUCARwExnEixLdB6sDm2dIJ/YgEAKDM1MOeMeZu9Ld/bDgVo8aiWrXwcY7OBh+1Ea2uUcVRcxKk0GJvW7QA==" }, "@babel/helper-split-export-declaration": { - "version": "7.4.0", - "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.4.0.tgz", - "integrity": "sha512-7Cuc6JZiYShaZnybDmfwhY4UYHzI6rlqhWjaIqbsJGsIqPimEYy5uh3akSRLMg65LSdSEnJ8a8/bWQN6u2oMGw==", + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.4.4.tgz", + "integrity": "sha512-Ro/XkzLf3JFITkW6b+hNxzZ1n5OQ80NvIUdmHspih1XAhtN3vPTuUFT4eQnela+2MaZ5ulH+iyP513KJrxbN7Q==", "requires": { - "@babel/types": "^7.4.0" + "@babel/types": "^7.4.4" } }, "@babel/helpers": { - "version": "7.4.3", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.4.3.tgz", - "integrity": "sha512-BMh7X0oZqb36CfyhvtbSmcWc3GXocfxv3yNsAEuM0l+fAqSO22rQrUpijr3oE/10jCTrB6/0b9kzmG4VetCj8Q==", + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.4.4.tgz", + "integrity": "sha512-igczbR/0SeuPR8RFfC7tGrbdTbFL3QTvH6D+Z6zNxnTe//GyqmtHmDkzrqDmyZ3eSwPqB/LhyKoU5DXsp+Vp2A==", "requires": { - "@babel/template": "^7.4.0", - "@babel/traverse": "^7.4.3", - "@babel/types": "^7.4.0" + "@babel/template": "^7.4.4", + "@babel/traverse": "^7.4.4", + "@babel/types": "^7.4.4" } }, "@babel/highlight": { @@ -96,9 +96,9 @@ } }, "@babel/parser": { - "version": "7.4.3", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.4.3.tgz", - "integrity": "sha512-gxpEUhTS1sGA63EGQGuA+WESPR/6tz6ng7tSHFCmaTJK/cGK8y37cBTspX+U2xCAue2IQVvF6Z0oigmjwD8YGQ==" + "version": "7.4.5", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.4.5.tgz", + "integrity": "sha512-9mUqkL1FF5T7f0WDFfAoDdiMVPWsdD1gZYzSnaXsxUCUqzuch/8of9G3VUSNiZmMBoRxT3neyVsqeiL/ZPcjew==" }, "@babel/plugin-proposal-do-expressions": { "version": "7.2.0", @@ -135,9 +135,9 @@ } }, "@babel/runtime": { - "version": "7.4.3", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.4.3.tgz", - "integrity": "sha512-9lsJwJLxDh/T3Q3SZszfWOTkk3pHbkmH+3KY+zwIDmsNlxsumuhS2TH3NIpktU4kNvfzy+k3eLT7aTJSPTo0OA==", + "version": "7.4.5", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.4.5.tgz", + "integrity": "sha512-TuI4qpWZP6lGOGIuGWtp9sPluqYICmbk8T/1vpSysqJxRPkudh/ofFWyqdcMsDf2s7KvDL4/YHgKyvcS3g9CJQ==", "requires": { "regenerator-runtime": "^0.13.2" }, @@ -150,35 +150,35 @@ } }, "@babel/template": { - "version": "7.4.0", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.4.0.tgz", - "integrity": "sha512-SOWwxxClTTh5NdbbYZ0BmaBVzxzTh2tO/TeLTbF6MO6EzVhHTnff8CdBXx3mEtazFBoysmEM6GU/wF+SuSx4Fw==", + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.4.4.tgz", + "integrity": "sha512-CiGzLN9KgAvgZsnivND7rkA+AeJ9JB0ciPOD4U59GKbQP2iQl+olF1l76kJOupqidozfZ32ghwBEJDhnk9MEcw==", "requires": { "@babel/code-frame": "^7.0.0", - "@babel/parser": "^7.4.0", - "@babel/types": "^7.4.0" + "@babel/parser": "^7.4.4", + "@babel/types": "^7.4.4" } }, "@babel/traverse": { - "version": "7.4.3", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.4.3.tgz", - "integrity": "sha512-HmA01qrtaCwwJWpSKpA948cBvU5BrmviAief/b3AVw936DtcdsTexlbyzNuDnthwhOQ37xshn7hvQaEQk7ISYQ==", + "version": "7.4.5", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.4.5.tgz", + "integrity": "sha512-Vc+qjynwkjRmIFGxy0KYoPj4FdVDxLej89kMHFsWScq999uX+pwcX4v9mWRjW0KcAYTPAuVQl2LKP1wEVLsp+A==", "requires": { "@babel/code-frame": "^7.0.0", - "@babel/generator": "^7.4.0", + "@babel/generator": "^7.4.4", "@babel/helper-function-name": "^7.1.0", - "@babel/helper-split-export-declaration": "^7.4.0", - "@babel/parser": "^7.4.3", - "@babel/types": "^7.4.0", + "@babel/helper-split-export-declaration": "^7.4.4", + "@babel/parser": "^7.4.5", + "@babel/types": "^7.4.4", "debug": "^4.1.0", "globals": "^11.1.0", "lodash": "^4.17.11" } }, "@babel/types": { - "version": "7.4.0", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.4.0.tgz", - "integrity": "sha512-aPvkXyU2SPOnztlgo8n9cEiXW755mgyvueUPcpStqdzoSPm0fjO0vQBjLkt3JKJW7ufikfcnMTTPsN1xaTsBPA==", + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.4.4.tgz", + "integrity": "sha512-dOllgYdnEFOebhkKCjzSVFqw/PmmB8pH6RGOWkY4GsboQNd47b1fBThBSwlHAq9alF9vc1M3+6oqR47R50L0tQ==", "requires": { "esutils": "^2.0.2", "lodash": "^4.17.11", @@ -527,9 +527,9 @@ } }, "globals": { - "version": "11.11.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-11.11.0.tgz", - "integrity": "sha512-WHq43gS+6ufNOEqlrDBxVEbb8ntfXrfAUU2ZOpCxrBdGKW3gyv8mCxAfIBD0DroPKGrJ2eSsXsLtY9MPntsyTw==" + "version": "11.12.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", + "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==" }, "graphql": { "version": "14.3.1", @@ -1474,9 +1474,9 @@ "integrity": "sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg==" }, "resolve": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.10.0.tgz", - "integrity": "sha512-3sUr9aq5OfSg2S9pNtPA9hL1FVEAjvfOC4leW0SNf/mpnaakz2a9femSd6LqAww2RaFctwyf1lCqnTHuF1rxDg==", + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.11.1.tgz", + "integrity": "sha512-vIpgF6wfuJOZI7KKKSP+HmiKggadPQAdsp5HiC1mvqnfp0gF1vdwgBWZIdrVft9pgqoMFQN+R7BSWZiBxx+BBw==", "requires": { "path-parse": "^1.0.6" } diff --git a/tools/tests/apps/modules/package.json b/tools/tests/apps/modules/package.json index 84de7c8e05..3709470e85 100644 --- a/tools/tests/apps/modules/package.json +++ b/tools/tests/apps/modules/package.json @@ -4,10 +4,10 @@ "description": "Test app exercising many aspects of the Meteor module system.", "private": true, "dependencies": { - "@babel/core": "^7.0.0-beta.56", - "@babel/plugin-proposal-do-expressions": "^7.0.0-beta.56", - "@babel/plugin-proposal-optional-chaining": "^7.0.0-beta.56", - "@babel/runtime": "^7.1.2", + "@babel/core": "^7.4.5", + "@babel/plugin-proposal-do-expressions": "^7.2.0", + "@babel/plugin-proposal-optional-chaining": "^7.2.0", + "@babel/runtime": "^7.4.5", "@wry/context": "^0.4.0", "acorn": "file:imports/links/acorn", "aws-sdk": "^2.2.41", From 2fa761bbfcbe2ab0776e104d98a12c2f4794e5be Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Tue, 2 Jul 2019 10:29:30 -0400 Subject: [PATCH 112/327] Test that ESM modules can be imported from npm packages. With appropriate meteor.nodeModules.recompile configuration, that is. --- tools/tests/apps/modules/package-lock.json | 13 +++++++ tools/tests/apps/modules/package.json | 9 ++++- tools/tests/apps/modules/tests.js | 41 ++++++++++++++++++++++ 3 files changed, 62 insertions(+), 1 deletion(-) diff --git a/tools/tests/apps/modules/package-lock.json b/tools/tests/apps/modules/package-lock.json index 560220b40a..a45d1462c4 100644 --- a/tools/tests/apps/modules/package-lock.json +++ b/tools/tests/apps/modules/package-lock.json @@ -185,6 +185,14 @@ "to-fast-properties": "^2.0.0" } }, + "@polymer/lit-element": { + "version": "0.7.1", + "resolved": "https://registry.npmjs.org/@polymer/lit-element/-/lit-element-0.7.1.tgz", + "integrity": "sha512-aYSzVhC19l7xSm73aHI06VPcD/H+GxpFNZrhbJ+zVIpgAveOgGp5Ga7UtTBHQCdHlJbZ0dMlaBXMZ3twgXCokg==", + "requires": { + "lit-html": "^1.0.0-rc.2" + } + }, "@wry/context": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/@wry/context/-/context-0.4.0.tgz", @@ -658,6 +666,11 @@ "react": "16.4.1" } }, + "lit-html": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/lit-html/-/lit-html-1.1.0.tgz", + "integrity": "sha512-ZDJHpJi09yknMpjwPI8fuSl5sUG7+pF+eE5WciFtgyX7zebvgMDBgSLq4knXa7grxM00RkQ7PBd7UZQiruA78Q==" + }, "lodash": { "version": "4.17.11", "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.11.tgz", diff --git a/tools/tests/apps/modules/package.json b/tools/tests/apps/modules/package.json index 3709470e85..29e6a6fca4 100644 --- a/tools/tests/apps/modules/package.json +++ b/tools/tests/apps/modules/package.json @@ -8,6 +8,7 @@ "@babel/plugin-proposal-do-expressions": "^7.2.0", "@babel/plugin-proposal-optional-chaining": "^7.2.0", "@babel/runtime": "^7.4.5", + "@polymer/lit-element": "0.7.1", "@wry/context": "^0.4.0", "acorn": "file:imports/links/acorn", "aws-sdk": "^2.2.41", @@ -36,6 +37,12 @@ "test-packages": "TEST_BROWSER_DRIVER=puppeteer meteor test-packages --driver-package meteortesting:mocha packages/modules-test-package" }, "meteor": { - "testModule": "tests.js" + "testModule": "tests.js", + "nodeModules": { + "recompile": { + "pify": "legacy", + "@polymer/lit-element": true + } + } } } diff --git a/tools/tests/apps/modules/tests.js b/tools/tests/apps/modules/tests.js index 182866b2a2..9d04147f3e 100644 --- a/tools/tests/apps/modules/tests.js +++ b/tools/tests/apps/modules/tests.js @@ -371,6 +371,47 @@ describe("local node_modules", () => { assert.strictEqual(typeof parse, "function"); assert.strictEqual(parse, nestedParse); }); + + Meteor.isClient && it("can import @polymer/lit-element", () => { + // This import is enabled by the meteor.nodeModules.recompile section of + // the package.json file for the modules test application. + const litElement = require("@polymer/lit-element"); + const typeofMap = {}; + Object.keys(litElement).forEach(key => { + typeofMap[key] = typeof litElement[key]; + }); + + assert.deepEqual(typeofMap, { + defaultConverter: "object", + notEqual: "function", + UpdatingElement: "function", + customElement: "function", + property: "function", + query: "function", + queryAll: "function", + eventOptions: "function", + html: "function", + svg: "function", + TemplateResult: "function", + SVGTemplateResult: "function", + supportsAdoptingStyleSheets: "boolean", + CSSResult: "function", + css: "function", + LitElement: "function" + }); + }); + + it("can import @babel/runtime/helpers/esm/*", () => { + function check(exports) { + assert.strictEqual(typeof exports.default, "function"); + } + check(require("@babel/runtime/helpers/esm/asyncIterator.js")); + check(require("@babel/runtime/helpers/esm/createClass.js")); + check(require("@babel/runtime/helpers/esm/getPrototypeOf.js")); + check(require("@babel/runtime/helpers/esm/inherits.js")); + check(require("@babel/runtime/helpers/esm/toArray.js")); + check(require("@babel/runtime/helpers/esm/typeof.js")); + }); }); describe("Meteor packages", () => { From 0c5cb131363f207f7432f4c5b7f92ca01780c62f Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Tue, 2 Jul 2019 13:10:10 -0400 Subject: [PATCH 113/327] Ensure all code evaluated by Node is compiled with Reify. --- scripts/dev-bundle-server-package.js | 2 +- tools/static-assets/server/runtime.js | 15 +++++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/scripts/dev-bundle-server-package.js b/scripts/dev-bundle-server-package.js index ec6a2bbed3..656e6e8ceb 100644 --- a/scripts/dev-bundle-server-package.js +++ b/scripts/dev-bundle-server-package.js @@ -13,7 +13,7 @@ var packageJson = { fibers: "3.1.1", "meteor-promise": "0.8.7", promise: "8.0.2", - reify: "0.18.1", + reify: "0.20.9", // Not yet upgrading Underscore from 1.5.2 to 1.7.0 (which should be done // in the package too) because we should consider using lodash instead // (and there are backwards-incompatible changes either way). diff --git a/tools/static-assets/server/runtime.js b/tools/static-assets/server/runtime.js index 7faf43f6e6..22bd9a92a8 100644 --- a/tools/static-assets/server/runtime.js +++ b/tools/static-assets/server/runtime.js @@ -23,3 +23,18 @@ const resolved = Promise.resolve(); Mp.dynamicImport = function (id) { return resolved.then(() => require(id)); }; + +const babelParse = require("reify/lib/parsers/babel").parse; +const reifyCompile = require("reify/lib/compiler").compile; +const _compile = Mp._compile; +Mp._compile = function (content, filename) { + const result = reifyCompile(content, { + parse: babelParse, + generateLetDeclarations: false, + ast: false, + }); + if (!result.identical) { + content = result.code; + } + return _compile.call(this, content, filename); +}; From 8ef032638044de34d88571e554d9cfba19a330c4 Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Tue, 2 Jul 2019 13:11:11 -0400 Subject: [PATCH 114/327] Keep using module.useNode() instead of bundling server node_modules. This partially reverts commit 4dfc74197a98a31e8f763b44681347a3585d87a3. Some server packages, especially those that rely on __dirname or __filename (e.g. puppeteer), simply cannot be included in the server bundle, and must be evaluated natively by Node. As long as we have a Module.prototype._compile hook to process natively evaluated modules with Reify, module.useNode() can still benefit from ESM import/export syntax. --- tools/isobuild/import-scanner.js | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/tools/isobuild/import-scanner.js b/tools/isobuild/import-scanner.js index 5e685f91a9..f0252dd05d 100644 --- a/tools/isobuild/import-scanner.js +++ b/tools/isobuild/import-scanner.js @@ -1222,17 +1222,6 @@ export default class ImportScanner { return false; } - if ( - absModuleId.endsWith(".js") || - absModuleId.endsWith(".mjs") - ) { - return false; - } - - if (absModuleId.endsWith(".node")) { - return true; - } - const parts = absModuleId.split("/"); let start = 0; From 37026e965b74e3fa002850b4c29b47fb8bd715ea Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Tue, 2 Jul 2019 13:16:06 -0400 Subject: [PATCH 115/327] Update History.md to explain latest recompilation improvements. --- History.md | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/History.md b/History.md index 4f0312ff61..1fe901bc10 100644 --- a/History.md +++ b/History.md @@ -13,6 +13,22 @@ N/A * The `npm` npm package has been updated to version 6.9.2. +* When bundling client code, the Meteor module system now prefers the + `"module"` field in `package.json`, if defined. + [PR #10541](https://github.com/meteor/meteor/pull/10541) + +* ECMAScript module syntax (`import`, `export`, and dynamic `import()`) is + now supported by default everywhere, including in modules imported from + `node_modules`, thanks to the [Reify](https://github.com/benjamn/reify) + compiler. + +* If you need to import code from `node_modules` that uses modern syntax + beyond module syntax, it is now possible to enable recompilation for + specific npm packages using the `meteor.nodeModules.recompile` option in + your application's `package.json` file. + See [PR #10603](https://github.com/meteor/meteor/pull/10603) for further + explanation. + * The `mongodb` npm package used by the `npm-mongo` Meteor package has been updated to version 3.2.7. @@ -31,13 +47,6 @@ N/A * The `pathwatcher` npm package has been updated to version 8.1.0. -* When bundling client code, the Meteor module system now prefers the - `"module"` field in `package.json`, if defined. Additionally, npm - packages with a `"module"` entry point will now be compiled - automatically by `meteor-babel`, like application code, without any - special symlinking tricks. - [PR #10541](https://github.com/meteor/meteor/pull/10541) - * In addition to the `.js` and `.jsx` file extensions, the `ecmascript` compiler plugin now automatically handles JavaScript modules with the `.mjs` file extension. From b3c1e83ef349a48f8a36fefa86a75a7e92066695 Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Tue, 2 Jul 2019 14:30:00 -0400 Subject: [PATCH 116/327] Update meteor-babel to version 7.4.18. This allows us to take advantage of the features.compileForShell option when compiling code in the `meteor shell` REPL. --- History.md | 2 +- packages/babel-compiler/.npm/package/npm-shrinkwrap.json | 6 +++--- packages/babel-compiler/package.js | 2 +- packages/ecmascript/ecmascript.js | 3 ++- scripts/dev-bundle-tool-package.js | 2 +- 5 files changed, 8 insertions(+), 7 deletions(-) diff --git a/History.md b/History.md index 1fe901bc10..276d1ffc18 100644 --- a/History.md +++ b/History.md @@ -32,7 +32,7 @@ N/A * The `mongodb` npm package used by the `npm-mongo` Meteor package has been updated to version 3.2.7. -* The `meteor-babel` npm package has been updated to version 7.4.17. +* The `meteor-babel` npm package has been updated to version 7.4.18. * The `reify` npm package has been updated to version 0.20.9. diff --git a/packages/babel-compiler/.npm/package/npm-shrinkwrap.json b/packages/babel-compiler/.npm/package/npm-shrinkwrap.json index d2e00811f5..ee143cc6c1 100644 --- a/packages/babel-compiler/.npm/package/npm-shrinkwrap.json +++ b/packages/babel-compiler/.npm/package/npm-shrinkwrap.json @@ -609,9 +609,9 @@ "integrity": "sha512-6QK0OpF/phMz0Q2AxILkX2mFhi7m+WMwTRg0LQKq/WBB0cDP4rYH3Wp4/d3OTXlrPLVJT/RFqj8tFeAR4nk8AA==" }, "meteor-babel": { - "version": "7.4.17", - "resolved": "https://registry.npmjs.org/meteor-babel/-/meteor-babel-7.4.17.tgz", - "integrity": "sha512-s+3IYFfu887+bj4Sn9yQ0NirWIOikf5ucFGxwDTmDRIeSXjt2c8Vk6DF3fCForTm35x3paC3PpbOIyG4Rs6nkw==" + "version": "7.4.18", + "resolved": "https://registry.npmjs.org/meteor-babel/-/meteor-babel-7.4.18.tgz", + "integrity": "sha512-7nJgy09paSOMlZFonv2qb6nUOiAtYXcg+fN+v/npZ7ToMPCqaLavzjjPj8PMvw7KxcdSBFw+52YVw6XFKm2zcQ==" }, "meteor-babel-helpers": { "version": "0.0.3", diff --git a/packages/babel-compiler/package.js b/packages/babel-compiler/package.js index 3bbb48830a..307e16c6c2 100644 --- a/packages/babel-compiler/package.js +++ b/packages/babel-compiler/package.js @@ -10,7 +10,7 @@ Package.describe({ }); Npm.depends({ - 'meteor-babel': '7.4.17', + 'meteor-babel': '7.4.18', 'json5': '2.1.0' }); diff --git a/packages/ecmascript/ecmascript.js b/packages/ecmascript/ecmascript.js index 10d7a6b6f0..d562fc0df1 100644 --- a/packages/ecmascript/ecmascript.js +++ b/packages/ecmascript/ecmascript.js @@ -1,7 +1,8 @@ ECMAScript = { compileForShell(command, cacheOptions) { const babelOptions = Babel.getDefaultOptions({ - nodeMajorVersion: parseInt(process.versions.node, 10) + nodeMajorVersion: parseInt(process.versions.node, 10), + compileForShell: true }); delete babelOptions.sourceMap; delete babelOptions.sourceMaps; diff --git a/scripts/dev-bundle-tool-package.js b/scripts/dev-bundle-tool-package.js index bc42e318dc..a0a752d6aa 100644 --- a/scripts/dev-bundle-tool-package.js +++ b/scripts/dev-bundle-tool-package.js @@ -14,7 +14,7 @@ var packageJson = { pacote: "https://github.com/meteor/pacote/tarball/c5043daa1b768594e01d76275e3854fc19f038f9", "node-gyp": "5.0.1", "node-pre-gyp": "0.13.0", - "meteor-babel": "7.4.17", + "meteor-babel": "7.4.18", // Keep the versions of these packages consistent with the versions // found in dev-bundle-server-package.js. "meteor-promise": "0.8.7", From d9d3c3d64ee103f41d958f476b0bd69d2605a2e1 Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Tue, 2 Jul 2019 14:31:22 -0400 Subject: [PATCH 117/327] Bump $BUNDLE_VERSION to 8.16.0.14 before rebuilding dev bundle. --- meteor | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meteor b/meteor index 8c57e8d0f3..c4f339fc96 100755 --- a/meteor +++ b/meteor @@ -1,6 +1,6 @@ #!/usr/bin/env bash -BUNDLE_VERSION=8.16.0.13 +BUNDLE_VERSION=8.16.0.14 # OS Check. Put here because here is where we download the precompiled # bundles that are arch specific. From e9060d01df072d04afc37632e0299b2c8709f339 Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Tue, 2 Jul 2019 15:09:51 -0400 Subject: [PATCH 118/327] Bump package versions for 1.8.2-beta.11 release. --- packages/babel-compiler/package.js | 2 +- packages/babel-runtime/package.js | 2 +- packages/context/package.js | 2 +- packages/ecmascript-runtime-client/package.js | 2 +- packages/ecmascript-runtime-server/package.js | 2 +- packages/ecmascript/package.js | 2 +- packages/meteor-tool/package.js | 2 +- packages/modules-runtime/package.js | 2 +- packages/modules/package.js | 2 +- packages/mongo/package.js | 2 +- packages/npm-mongo/package.js | 2 +- scripts/admin/meteor-release-experimental.json | 2 +- 12 files changed, 12 insertions(+), 12 deletions(-) diff --git a/packages/babel-compiler/package.js b/packages/babel-compiler/package.js index 307e16c6c2..116507a3da 100644 --- a/packages/babel-compiler/package.js +++ b/packages/babel-compiler/package.js @@ -6,7 +6,7 @@ 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.4.0-beta182.10' + version: '7.4.0-beta182.11' }); Npm.depends({ diff --git a/packages/babel-runtime/package.js b/packages/babel-runtime/package.js index 3ca647def6..0dcfef61c6 100644 --- a/packages/babel-runtime/package.js +++ b/packages/babel-runtime/package.js @@ -1,7 +1,7 @@ Package.describe({ name: "babel-runtime", summary: "Runtime support for output of Babel transpiler", - version: '1.4.0-beta182.10', + version: '1.4.0-beta182.11', documentation: 'README.md' }); diff --git a/packages/context/package.js b/packages/context/package.js index 3cc00fcf4f..6c8ae16863 100644 --- a/packages/context/package.js +++ b/packages/context/package.js @@ -1,6 +1,6 @@ Package.describe({ name: "context", - version: "0.4.0-beta182.10", + version: "0.4.0-beta182.11", summary: "Manage contextual information without passing objects around", documentation: "README.md" }); diff --git a/packages/ecmascript-runtime-client/package.js b/packages/ecmascript-runtime-client/package.js index 0690bc49bd..5b0cd022ff 100644 --- a/packages/ecmascript-runtime-client/package.js +++ b/packages/ecmascript-runtime-client/package.js @@ -1,6 +1,6 @@ Package.describe({ name: "ecmascript-runtime-client", - version: "0.9.0-beta182.10", + version: "0.9.0-beta182.11", summary: "Polyfills for new ECMAScript 2015 APIs like Map and Set", git: "https://github.com/meteor/meteor/tree/devel/packages/ecmascript-runtime-client", documentation: "README.md" diff --git a/packages/ecmascript-runtime-server/package.js b/packages/ecmascript-runtime-server/package.js index 5f8124a3da..4d0ca95c2d 100644 --- a/packages/ecmascript-runtime-server/package.js +++ b/packages/ecmascript-runtime-server/package.js @@ -1,6 +1,6 @@ Package.describe({ name: "ecmascript-runtime-server", - version: "0.8.0-beta182.10", + version: "0.8.0-beta182.11", summary: "Polyfills for new ECMAScript 2015 APIs like Map and Set", git: "https://github.com/meteor/meteor/tree/devel/packages/ecmascript-runtime-client", documentation: "README.md" diff --git a/packages/ecmascript/package.js b/packages/ecmascript/package.js index c3a20732c5..29a5ffe5d5 100644 --- a/packages/ecmascript/package.js +++ b/packages/ecmascript/package.js @@ -1,6 +1,6 @@ Package.describe({ name: 'ecmascript', - version: '0.13.0-beta182.10', + version: '0.13.0-beta182.11', summary: 'Compiler plugin that supports ES2015+ in all .js files', documentation: 'README.md' }); diff --git a/packages/meteor-tool/package.js b/packages/meteor-tool/package.js index e5278ca25f..3acbba13a8 100644 --- a/packages/meteor-tool/package.js +++ b/packages/meteor-tool/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "The Meteor command-line tool", - version: '1.8.2-beta.10' + version: '1.8.2-beta.11' }); Package.includeTool(); diff --git a/packages/modules-runtime/package.js b/packages/modules-runtime/package.js index 0570b026ba..9d77750cbc 100644 --- a/packages/modules-runtime/package.js +++ b/packages/modules-runtime/package.js @@ -1,6 +1,6 @@ Package.describe({ name: "modules-runtime", - version: "0.11.0-beta182.10", + version: "0.11.0-beta182.11", summary: "CommonJS module system", git: "https://github.com/benjamn/install", documentation: "README.md" diff --git a/packages/modules/package.js b/packages/modules/package.js index f119ba1e0d..efb177b314 100644 --- a/packages/modules/package.js +++ b/packages/modules/package.js @@ -1,6 +1,6 @@ Package.describe({ name: "modules", - version: "0.14.0-beta182.10", + version: "0.14.0-beta182.11", summary: "CommonJS module system", documentation: "README.md" }); diff --git a/packages/mongo/package.js b/packages/mongo/package.js index af28b41dce..b7c5534949 100644 --- a/packages/mongo/package.js +++ b/packages/mongo/package.js @@ -9,7 +9,7 @@ Package.describe({ summary: "Adaptor for using MongoDB and Minimongo over DDP", - version: '1.7.0-beta182.10' + version: '1.7.0-beta182.11' }); Npm.depends({ diff --git a/packages/npm-mongo/package.js b/packages/npm-mongo/package.js index a0a5c50439..dde50584f4 100644 --- a/packages/npm-mongo/package.js +++ b/packages/npm-mongo/package.js @@ -3,7 +3,7 @@ Package.describe({ summary: "Wrapper around the mongo npm package", - version: "3.2.0-beta182.10", + version: "3.2.0-beta182.11", documentation: null }); diff --git a/scripts/admin/meteor-release-experimental.json b/scripts/admin/meteor-release-experimental.json index 213a8eb666..7fa04af435 100644 --- a/scripts/admin/meteor-release-experimental.json +++ b/scripts/admin/meteor-release-experimental.json @@ -1,6 +1,6 @@ { "track": "METEOR", - "version": "1.8.2-beta.10", + "version": "1.8.2-beta.11", "recommended": false, "official": false, "description": "Meteor" From f7f36bb758afa982d4df98e03e45a7eb40b28a1f Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Tue, 2 Jul 2019 15:30:00 -0400 Subject: [PATCH 119/327] Use default parser for Reify Module.prototype._compile hook. This saves us from having to install @babel/parser in the server bundle. There is currently a bug in Reify that prevents it from loading this parser by default, but we can work around that on the Meteor side for now. --- tools/static-assets/server/runtime.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/static-assets/server/runtime.js b/tools/static-assets/server/runtime.js index 22bd9a92a8..f824dceb8c 100644 --- a/tools/static-assets/server/runtime.js +++ b/tools/static-assets/server/runtime.js @@ -24,12 +24,12 @@ Mp.dynamicImport = function (id) { return resolved.then(() => require(id)); }; -const babelParse = require("reify/lib/parsers/babel").parse; +const parse = require("reify/lib/parsers/default").parse; const reifyCompile = require("reify/lib/compiler").compile; const _compile = Mp._compile; Mp._compile = function (content, filename) { const result = reifyCompile(content, { - parse: babelParse, + parse: parse, generateLetDeclarations: false, ast: false, }); From 86f0208f4135e60feadce8f3a3414d803218a6e4 Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Tue, 2 Jul 2019 16:06:17 -0400 Subject: [PATCH 120/327] Update reify to version 0.20.10. We don't need to build a whole new dev bundle just for this upgrade, since we've already worked around the bug that it fixes, but it will get picked up the next time we build the dev bundle for Meteor 1.8.2. --- History.md | 2 +- packages/babel-compiler/.npm/package/npm-shrinkwrap.json | 6 +++--- packages/modules/.npm/package/npm-shrinkwrap.json | 6 +++--- packages/modules/package.js | 2 +- scripts/dev-bundle-server-package.js | 2 +- scripts/dev-bundle-tool-package.js | 2 +- 6 files changed, 10 insertions(+), 10 deletions(-) diff --git a/History.md b/History.md index 276d1ffc18..d97cae081c 100644 --- a/History.md +++ b/History.md @@ -34,7 +34,7 @@ N/A * The `meteor-babel` npm package has been updated to version 7.4.18. -* The `reify` npm package has been updated to version 0.20.9. +* The `reify` npm package has been updated to version 0.20.10. * The `core-js` npm package used by `ecmascript-runtime-client` and `ecmascript-runtime-server` has been updated to version 3.1.4. diff --git a/packages/babel-compiler/.npm/package/npm-shrinkwrap.json b/packages/babel-compiler/.npm/package/npm-shrinkwrap.json index ee143cc6c1..04ed83cc3b 100644 --- a/packages/babel-compiler/.npm/package/npm-shrinkwrap.json +++ b/packages/babel-compiler/.npm/package/npm-shrinkwrap.json @@ -681,9 +681,9 @@ } }, "reify": { - "version": "0.20.9", - "resolved": "https://registry.npmjs.org/reify/-/reify-0.20.9.tgz", - "integrity": "sha512-t6j9KqO5/UY3fz8ocdNmXA+Fy7C7HiBydArSox7OoK14pEGyHRZoUZk5Kv7zoRPnCL+6Zn+9JfJyZJkW9rFTGw==" + "version": "0.20.10", + "resolved": "https://registry.npmjs.org/reify/-/reify-0.20.10.tgz", + "integrity": "sha512-+6mRLK2UA0BrdygnkZvJqc5Z+nktfnT/AuzrtwzMnHXc/2oaPr8LmNai29C193SL3tulMBeVPXzhkRQJs/cjTg==" }, "resolve": { "version": "1.11.1", diff --git a/packages/modules/.npm/package/npm-shrinkwrap.json b/packages/modules/.npm/package/npm-shrinkwrap.json index 9b2c9264ea..4fe3730e78 100644 --- a/packages/modules/.npm/package/npm-shrinkwrap.json +++ b/packages/modules/.npm/package/npm-shrinkwrap.json @@ -22,9 +22,9 @@ "integrity": "sha1-8uXZ+HlvvS6JAQI9dpnlsgLqn7A=" }, "reify": { - "version": "0.20.9", - "resolved": "https://registry.npmjs.org/reify/-/reify-0.20.9.tgz", - "integrity": "sha512-t6j9KqO5/UY3fz8ocdNmXA+Fy7C7HiBydArSox7OoK14pEGyHRZoUZk5Kv7zoRPnCL+6Zn+9JfJyZJkW9rFTGw==" + "version": "0.20.10", + "resolved": "https://registry.npmjs.org/reify/-/reify-0.20.10.tgz", + "integrity": "sha512-+6mRLK2UA0BrdygnkZvJqc5Z+nktfnT/AuzrtwzMnHXc/2oaPr8LmNai29C193SL3tulMBeVPXzhkRQJs/cjTg==" }, "semver": { "version": "5.7.0", diff --git a/packages/modules/package.js b/packages/modules/package.js index efb177b314..4b08c1452b 100644 --- a/packages/modules/package.js +++ b/packages/modules/package.js @@ -6,7 +6,7 @@ Package.describe({ }); Npm.depends({ - reify: "0.20.9", + reify: "0.20.10", "meteor-babel-helpers": "0.0.3" }); diff --git a/scripts/dev-bundle-server-package.js b/scripts/dev-bundle-server-package.js index 656e6e8ceb..f4a97c98f9 100644 --- a/scripts/dev-bundle-server-package.js +++ b/scripts/dev-bundle-server-package.js @@ -13,7 +13,7 @@ var packageJson = { fibers: "3.1.1", "meteor-promise": "0.8.7", promise: "8.0.2", - reify: "0.20.9", + reify: "0.20.10", // Not yet upgrading Underscore from 1.5.2 to 1.7.0 (which should be done // in the package too) because we should consider using lodash instead // (and there are backwards-incompatible changes either way). diff --git a/scripts/dev-bundle-tool-package.js b/scripts/dev-bundle-tool-package.js index a0a752d6aa..35b5bf07c2 100644 --- a/scripts/dev-bundle-tool-package.js +++ b/scripts/dev-bundle-tool-package.js @@ -18,7 +18,7 @@ var packageJson = { // Keep the versions of these packages consistent with the versions // found in dev-bundle-server-package.js. "meteor-promise": "0.8.7", - reify: "0.20.9", + reify: "0.20.10", fibers: "3.1.1", // So that Babel can emit require("@babel/runtime/helpers/...") calls. "@babel/runtime": "7.4.4", From e10a7e152395bbd3ea7cce8723da15c102b21afb Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Wed, 3 Jul 2019 09:07:39 -0400 Subject: [PATCH 121/327] Remove hasModuleEntryPoint logic from PackageSource#_findSources. Now that we have the meteor.nodeModules.recompile configuration (#10603), we don't need to guess which packages might need to be recompiled. --- tools/isobuild/package-source.js | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/tools/isobuild/package-source.js b/tools/isobuild/package-source.js index ec0998d9fc..f579225f50 100644 --- a/tools/isobuild/package-source.js +++ b/tools/isobuild/package-source.js @@ -1284,13 +1284,7 @@ _.extend(PackageSource.prototype, { let readOptions = sourceReadOptions; if (inNodeModules) { const pkgJson = optimisticLookupPackageJson(self.sourceRoot, dir); - const shouldRecompile = - pkgJson && nodeModulesToRecompile.has(pkgJson.name); - const hasModuleEntryPoint = pkgJson && ( - typeof pkgJson.module === "string" || pkgJson.type === "module" - ); - - if (hasModuleEntryPoint || shouldRecompile) { + if (pkgJson && nodeModulesToRecompile.has(pkgJson.name)) { // Avoid caching node_modules code recompiled by Meteor. cacheKey = false; } else { From 9b01729c7993bd36c1469d502fbb7c7f6bba8a05 Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Wed, 3 Jul 2019 10:03:11 -0400 Subject: [PATCH 122/327] Use reify/lib/parsers/babel rather than acorn. Acorn seems to have trouble parsing code that @babel/parser parses successfully, such as the dist/esm.js file in markdown-to-jsx@6.10.2. --- scripts/dev-bundle-server-package.js | 1 + tools/isobuild/import-scanner.js | 2 ++ tools/static-assets/server/runtime.js | 21 ++++++++++++--------- 3 files changed, 15 insertions(+), 9 deletions(-) diff --git a/scripts/dev-bundle-server-package.js b/scripts/dev-bundle-server-package.js index f4a97c98f9..44fa9b1885 100644 --- a/scripts/dev-bundle-server-package.js +++ b/scripts/dev-bundle-server-package.js @@ -14,6 +14,7 @@ var packageJson = { "meteor-promise": "0.8.7", promise: "8.0.2", reify: "0.20.10", + "@babel/parser": "7.4.5", // Not yet upgrading Underscore from 1.5.2 to 1.7.0 (which should be done // in the package too) because we should consider using lodash instead // (and there are backwards-incompatible changes either way). diff --git a/tools/isobuild/import-scanner.js b/tools/isobuild/import-scanner.js index f0252dd05d..05e0b83431 100644 --- a/tools/isobuild/import-scanner.js +++ b/tools/isobuild/import-scanner.js @@ -43,6 +43,7 @@ import { import { wrap } from "optimism"; import { compile as reifyCompile } from "reify/lib/compiler"; +import { parse as reifyBabelParse } from "reify/lib/parsers/babel"; import Resolver from "./resolver.js"; @@ -74,6 +75,7 @@ const reifyCompileWithCache = Profile("reifyCompileWithCache", wrap(function ( bundleArch === "web.cordova"; return reifyCompile(stripHashBang(source), { + parse: reifyBabelParse, generateLetDeclarations: !isLegacy, avoidModernSyntax: isLegacy, enforceStrictMode: false, diff --git a/tools/static-assets/server/runtime.js b/tools/static-assets/server/runtime.js index f824dceb8c..7ef324ae65 100644 --- a/tools/static-assets/server/runtime.js +++ b/tools/static-assets/server/runtime.js @@ -24,17 +24,20 @@ Mp.dynamicImport = function (id) { return resolved.then(() => require(id)); }; -const parse = require("reify/lib/parsers/default").parse; +const reifyBabelParse = require("reify/lib/parsers/babel").parse; const reifyCompile = require("reify/lib/compiler").compile; const _compile = Mp._compile; Mp._compile = function (content, filename) { - const result = reifyCompile(content, { - parse: parse, - generateLetDeclarations: false, - ast: false, - }); - if (!result.identical) { - content = result.code; + try { + const result = reifyCompile(content, { + parse: reifyBabelParse, + generateLetDeclarations: false, + ast: false, + }); + if (!result.identical) { + content = result.code; + } + } finally { + return _compile.call(this, content, filename); } - return _compile.call(this, content, filename); }; From eda3057233a3b8a8bce420bb9058dcabfb7850d7 Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Wed, 3 Jul 2019 10:20:42 -0400 Subject: [PATCH 123/327] Bump $BUNDLE_VERSION to 8.16.0.15 before rebuilding dev bundle. --- meteor | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meteor b/meteor index c4f339fc96..69d520cf2e 100755 --- a/meteor +++ b/meteor @@ -1,6 +1,6 @@ #!/usr/bin/env bash -BUNDLE_VERSION=8.16.0.14 +BUNDLE_VERSION=8.16.0.15 # OS Check. Put here because here is where we download the precompiled # bundles that are arch specific. From fd47bb3a235594507650d52e488de6e569172d25 Mon Sep 17 00:00:00 2001 From: David Sichau Date: Wed, 3 Jul 2019 16:38:44 +0200 Subject: [PATCH 124/327] Ignore oplog entries from other dbs instead of throwing an error. (#10604) --- packages/mongo/oplog_tailing.js | 2 -- packages/mongo/package.js | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/packages/mongo/oplog_tailing.js b/packages/mongo/oplog_tailing.js index 8f2bc5dd76..69daff938b 100644 --- a/packages/mongo/oplog_tailing.js +++ b/packages/mongo/oplog_tailing.js @@ -289,8 +289,6 @@ _.extend(OplogHandle.prototype, { if (typeof doc.ns === "string" && doc.ns.startsWith(self._dbName + ".")) { trigger.collection = doc.ns.slice(self._dbName.length + 1); - } else { - throw new Error("Unexpected ns"); } // Is it a special command and the collection name is hidden diff --git a/packages/mongo/package.js b/packages/mongo/package.js index 724a2b0c8f..43cbc0c5c1 100644 --- a/packages/mongo/package.js +++ b/packages/mongo/package.js @@ -9,7 +9,7 @@ Package.describe({ summary: "Adaptor for using MongoDB and Minimongo over DDP", - version: '1.6.2' + version: '1.6.3' }); Npm.depends({ From 2add249b7c429490e8b226c9f06c90d7c0343647 Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Wed, 3 Jul 2019 10:59:14 -0400 Subject: [PATCH 125/327] Update reify to version 0.20.11. --- History.md | 2 +- packages/babel-compiler/.npm/package/npm-shrinkwrap.json | 6 +++--- packages/modules/.npm/package/npm-shrinkwrap.json | 6 +++--- packages/modules/package.js | 2 +- scripts/dev-bundle-server-package.js | 2 +- scripts/dev-bundle-tool-package.js | 2 +- 6 files changed, 10 insertions(+), 10 deletions(-) diff --git a/History.md b/History.md index d97cae081c..c8eb09e2ae 100644 --- a/History.md +++ b/History.md @@ -34,7 +34,7 @@ N/A * The `meteor-babel` npm package has been updated to version 7.4.18. -* The `reify` npm package has been updated to version 0.20.10. +* The `reify` npm package has been updated to version 0.20.11. * The `core-js` npm package used by `ecmascript-runtime-client` and `ecmascript-runtime-server` has been updated to version 3.1.4. diff --git a/packages/babel-compiler/.npm/package/npm-shrinkwrap.json b/packages/babel-compiler/.npm/package/npm-shrinkwrap.json index 04ed83cc3b..ea4da79f7e 100644 --- a/packages/babel-compiler/.npm/package/npm-shrinkwrap.json +++ b/packages/babel-compiler/.npm/package/npm-shrinkwrap.json @@ -681,9 +681,9 @@ } }, "reify": { - "version": "0.20.10", - "resolved": "https://registry.npmjs.org/reify/-/reify-0.20.10.tgz", - "integrity": "sha512-+6mRLK2UA0BrdygnkZvJqc5Z+nktfnT/AuzrtwzMnHXc/2oaPr8LmNai29C193SL3tulMBeVPXzhkRQJs/cjTg==" + "version": "0.20.11", + "resolved": "https://registry.npmjs.org/reify/-/reify-0.20.11.tgz", + "integrity": "sha512-49cFoN92EJW5t4xAJtvRa5ip5Gnuej7k/iiHIQ0qjWcXUCO3gUJrF/HtJIQg8yaFHPdbO+YKKot3CrjHdMM7rw==" }, "resolve": { "version": "1.11.1", diff --git a/packages/modules/.npm/package/npm-shrinkwrap.json b/packages/modules/.npm/package/npm-shrinkwrap.json index 4fe3730e78..3a9accd7c4 100644 --- a/packages/modules/.npm/package/npm-shrinkwrap.json +++ b/packages/modules/.npm/package/npm-shrinkwrap.json @@ -22,9 +22,9 @@ "integrity": "sha1-8uXZ+HlvvS6JAQI9dpnlsgLqn7A=" }, "reify": { - "version": "0.20.10", - "resolved": "https://registry.npmjs.org/reify/-/reify-0.20.10.tgz", - "integrity": "sha512-+6mRLK2UA0BrdygnkZvJqc5Z+nktfnT/AuzrtwzMnHXc/2oaPr8LmNai29C193SL3tulMBeVPXzhkRQJs/cjTg==" + "version": "0.20.11", + "resolved": "https://registry.npmjs.org/reify/-/reify-0.20.11.tgz", + "integrity": "sha512-49cFoN92EJW5t4xAJtvRa5ip5Gnuej7k/iiHIQ0qjWcXUCO3gUJrF/HtJIQg8yaFHPdbO+YKKot3CrjHdMM7rw==" }, "semver": { "version": "5.7.0", diff --git a/packages/modules/package.js b/packages/modules/package.js index 4b08c1452b..c394b291d8 100644 --- a/packages/modules/package.js +++ b/packages/modules/package.js @@ -6,7 +6,7 @@ Package.describe({ }); Npm.depends({ - reify: "0.20.10", + reify: "0.20.11", "meteor-babel-helpers": "0.0.3" }); diff --git a/scripts/dev-bundle-server-package.js b/scripts/dev-bundle-server-package.js index 44fa9b1885..fd60d1505b 100644 --- a/scripts/dev-bundle-server-package.js +++ b/scripts/dev-bundle-server-package.js @@ -13,7 +13,7 @@ var packageJson = { fibers: "3.1.1", "meteor-promise": "0.8.7", promise: "8.0.2", - reify: "0.20.10", + reify: "0.20.11", "@babel/parser": "7.4.5", // Not yet upgrading Underscore from 1.5.2 to 1.7.0 (which should be done // in the package too) because we should consider using lodash instead diff --git a/scripts/dev-bundle-tool-package.js b/scripts/dev-bundle-tool-package.js index 35b5bf07c2..066722d723 100644 --- a/scripts/dev-bundle-tool-package.js +++ b/scripts/dev-bundle-tool-package.js @@ -18,7 +18,7 @@ var packageJson = { // Keep the versions of these packages consistent with the versions // found in dev-bundle-server-package.js. "meteor-promise": "0.8.7", - reify: "0.20.10", + reify: "0.20.11", fibers: "3.1.1", // So that Babel can emit require("@babel/runtime/helpers/...") calls. "@babel/runtime": "7.4.4", From 59284a90b54f00fc836b918dabebfdf805f29a2a Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Sun, 23 Jun 2019 19:19:35 -0400 Subject: [PATCH 126/327] Give different Timestamps to operations within a transaction. Follow-up to #10420, per this comment by @conorstrejcek: https://github.com/meteor/meteor/issues/10420#issuecomment-476833232 Should help with #10512. --- packages/mongo/oplog_tailing.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/packages/mongo/oplog_tailing.js b/packages/mongo/oplog_tailing.js index 69daff938b..7d2b2fea10 100644 --- a/packages/mongo/oplog_tailing.js +++ b/packages/mongo/oplog_tailing.js @@ -1,5 +1,8 @@ var Future = Npm.require('fibers/future'); +import { NpmModuleMongodb } from "meteor/npm-mongo"; +const { Timestamp } = NpmModuleMongodb; + OPLOG_COLLECTION = 'oplog.rs'; var TOO_FAR_BEHIND = process.env.METEOR_OPLOG_TOO_FAR_BEHIND || 2000; @@ -270,9 +273,13 @@ _.extend(OplogHandle.prototype, { if (doc.o.applyOps) { // This was a successful transaction, so we need to apply the // operations that were involved. + let nextTimestamp = doc.ts; doc.o.applyOps.forEach(op => { // See https://github.com/meteor/meteor/issues/10420. - op.ts = op.ts || doc.ts; + if (!op.ts) { + op.ts = nextTimestamp; + nextTimestamp = nextTimestamp.add(Timestamp.ONE); + } handleDoc(op); }); return; From e0caf13103e21ceca9c1a6616f67dac8f97c5c48 Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Mon, 24 Jun 2019 15:22:23 -0400 Subject: [PATCH 127/327] Stop using Mongo Timestamp as cacheKey in DocFetcher. See my comment in issue #10512 for motivation: https://github.com/meteor/meteor/issues/10512#issuecomment-504797861 I think the changes in b0cb1ceda3dbe7e1b505d0017f2ccc50d6eb7c40 are still worthwhile because they ensure ops within a transaction have distinct Timestamps, with the caveat that we should avoid assuming those Timestamps are necessarily unique. --- packages/mongo/doc_fetcher.js | 43 ++++++++++++-------------- packages/mongo/doc_fetcher_tests.js | 21 +++++++------ packages/mongo/mongo_driver.js | 2 +- packages/mongo/oplog_observe_driver.js | 12 +++---- packages/mongo/package.js | 3 +- 5 files changed, 39 insertions(+), 42 deletions(-) diff --git a/packages/mongo/doc_fetcher.js b/packages/mongo/doc_fetcher.js index fbc73bd3f5..2b3412d39c 100644 --- a/packages/mongo/doc_fetcher.js +++ b/packages/mongo/doc_fetcher.js @@ -1,38 +1,36 @@ var Fiber = Npm.require('fibers'); -var Future = Npm.require('fibers/future'); -DocFetcher = function (mongoConnection) { - var self = this; - self._mongoConnection = mongoConnection; - // Map from cache key -> [callback] - self._callbacksForCacheKey = {}; -}; +export class DocFetcher { + constructor(mongoConnection) { + this._mongoConnection = mongoConnection; + // Map from op -> [callback] + this._callbacksForOp = new Map; + } -_.extend(DocFetcher.prototype, { // Fetches document "id" from collectionName, returning it or null if not // found. // - // If you make multiple calls to fetch() with the same cacheKey (a string), + // If you make multiple calls to fetch() with the same op reference, // DocFetcher may assume that they all return the same document. (It does // not check to see if collectionName/id match.) // // You may assume that callback is never called synchronously (and in fact // OplogObserveDriver does so). - fetch: function (collectionName, id, cacheKey, callback) { - var self = this; + fetch(collectionName, id, op, callback) { + const self = this; check(collectionName, String); - // id is some sort of scalar - check(cacheKey, String); + check(op, Object); // If there's already an in-progress fetch for this cache key, yield until // it's done and return whatever it returns. - if (_.has(self._callbacksForCacheKey, cacheKey)) { - self._callbacksForCacheKey[cacheKey].push(callback); + if (self._callbacksForOp.has(op)) { + self._callbacksForOp.get(op).push(callback); return; } - var callbacks = self._callbacksForCacheKey[cacheKey] = [callback]; + const callbacks = [callback]; + self._callbacksForOp.set(op, callbacks); Fiber(function () { try { @@ -40,25 +38,22 @@ _.extend(DocFetcher.prototype, { collectionName, {_id: id}) || null; // Return doc to all relevant callbacks. Note that this array can // continue to grow during callback excecution. - while (!_.isEmpty(callbacks)) { + while (callbacks.length > 0) { // Clone the document so that the various calls to fetch don't return // objects that are intertwingled with each other. Clone before // popping the future, so that if clone throws, the error gets passed // to the next callback. - var clonedDoc = EJSON.clone(doc); - callbacks.pop()(null, clonedDoc); + callbacks.pop()(null, EJSON.clone(doc)); } } catch (e) { - while (!_.isEmpty(callbacks)) { + while (callbacks.length > 0) { callbacks.pop()(e); } } finally { // XXX consider keeping the doc around for a period of time before // removing from the cache - delete self._callbacksForCacheKey[cacheKey]; + self._callbacksForOp.delete(op); } }).run(); } -}); - -MongoTest.DocFetcher = DocFetcher; +} diff --git a/packages/mongo/doc_fetcher_tests.js b/packages/mongo/doc_fetcher_tests.js index 6637ed9bca..484b5f6d03 100644 --- a/packages/mongo/doc_fetcher_tests.js +++ b/packages/mongo/doc_fetcher_tests.js @@ -1,5 +1,6 @@ var Fiber = Npm.require('fibers'); var Future = Npm.require('fibers/future'); +import { DocFetcher } from "./doc_fetcher.js"; testAsyncMulti("mongo-livedata - doc fetcher", [ function (test, expect) { @@ -9,17 +10,19 @@ testAsyncMulti("mongo-livedata - doc fetcher", [ var id1 = collection.insert({x: 1}); var id2 = collection.insert({y: 2}); - var fetcher = new MongoTest.DocFetcher( + var fetcher = new DocFetcher( MongoInternals.defaultRemoteCollectionDriver().mongo); // Test basic operation. - fetcher.fetch(collName, id1, Random.id(), expect(null, {_id: id1, x: 1})); - fetcher.fetch(collName, "nonexistent!", Random.id(), expect(null, null)); + const fakeOp1 = {}; + const fakeOp2 = {}; + fetcher.fetch(collName, id1, fakeOp1, expect(null, {_id: id1, x: 1})); + fetcher.fetch(collName, "nonexistent!", fakeOp2, expect(null, null)); var fetched = false; - var cacheKey = Random.id(); + var fakeOp3 = {}; var expected = {_id: id2, y: 2}; - fetcher.fetch(collName, id2, cacheKey, expect(function (e, d) { + fetcher.fetch(collName, id2, fakeOp3, expect(function (e, d) { fetched = true; test.isFalse(e); test.equal(d, expected); @@ -27,10 +30,10 @@ testAsyncMulti("mongo-livedata - doc fetcher", [ // The fetcher yields. test.isFalse(fetched); - // Now ask for another document with the same cache key. Because a fetch for - // that cache key is in flight, we will get the other fetch's document, not - // this random document. - fetcher.fetch(collName, Random.id(), cacheKey, expect(function (e, d) { + // Now ask for another document with the same op reference. Because a + // fetch for that op is in flight, we will get the other fetch's + // document, not this random document. + fetcher.fetch(collName, Random.id(), fakeOp3, expect(function (e, d) { test.isFalse(e); test.equal(d, expected); })); diff --git a/packages/mongo/mongo_driver.js b/packages/mongo/mongo_driver.js index 69b84929dd..7245fd59d2 100644 --- a/packages/mongo/mongo_driver.js +++ b/packages/mongo/mongo_driver.js @@ -9,9 +9,9 @@ var MongoDB = NpmModuleMongodb; var Future = Npm.require('fibers/future'); +import { DocFetcher } from "./doc_fetcher.js"; MongoInternals = {}; -MongoTest = {}; MongoInternals.NpmModules = { mongodb: { diff --git a/packages/mongo/oplog_observe_driver.js b/packages/mongo/oplog_observe_driver.js index 8e42171d5c..113bbc93c8 100644 --- a/packages/mongo/oplog_observe_driver.js +++ b/packages/mongo/oplog_observe_driver.js @@ -504,10 +504,10 @@ _.extend(OplogObserveDriver.prototype, { var fut = new Future; // This loop is safe, because _currentlyFetching will not be updated // during this loop (in fact, it is never mutated). - self._currentlyFetching.forEach(function (cacheKey, id) { + self._currentlyFetching.forEach(function (op, id) { waiting++; self._mongoHandle._docFetcher.fetch( - self._cursorDescription.collectionName, id, cacheKey, + self._cursorDescription.collectionName, id, op, finishIfNeedToPollQuery(function (err, doc) { try { if (err) { @@ -567,7 +567,7 @@ _.extend(OplogObserveDriver.prototype, { _handleOplogEntryQuerying: function (op) { var self = this; Meteor._noYieldsAllowed(function () { - self._needToFetch.set(idForOp(op), op.ts.toString()); + self._needToFetch.set(idForOp(op), op); }); }, _handleOplogEntrySteadyOrFetching: function (op) { @@ -579,7 +579,7 @@ _.extend(OplogObserveDriver.prototype, { if (self._phase === PHASE.FETCHING && ((self._currentlyFetching && self._currentlyFetching.has(id)) || self._needToFetch.has(id))) { - self._needToFetch.set(id, op.ts.toString()); + self._needToFetch.set(id, op); return; } @@ -630,7 +630,7 @@ _.extend(OplogObserveDriver.prototype, { if (e.name !== "MinimongoError") throw e; // We didn't understand the modifier. Re-fetch. - self._needToFetch.set(id, op.ts.toString()); + self._needToFetch.set(id, op); if (self._phase === PHASE.STEADY) { self._fetchModifiedDocuments(); } @@ -640,7 +640,7 @@ _.extend(OplogObserveDriver.prototype, { } else if (!canDirectlyModifyDoc || self._matcher.canBecomeTrueByModifier(op.o) || (self._sorter && self._sorter.affectedByModifier(op.o))) { - self._needToFetch.set(id, op.ts.toString()); + self._needToFetch.set(id, op); if (self._phase === PHASE.STEADY) self._fetchModifiedDocuments(); } diff --git a/packages/mongo/package.js b/packages/mongo/package.js index 43cbc0c5c1..4f714289a7 100644 --- a/packages/mongo/package.js +++ b/packages/mongo/package.js @@ -69,8 +69,7 @@ Package.onUse(function (api) { // Stuff that should be exposed via a real API, but we haven't yet. api.export('MongoInternals', 'server'); - // For tests only. - api.export('MongoTest', 'server', {testOnly: true}); + api.export("Mongo"); api.addFiles(['mongo_driver.js', 'oplog_tailing.js', From fec14ba8b77544224ab82e82c62d5d7d1cceb043 Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Wed, 3 Jul 2019 11:20:52 -0400 Subject: [PATCH 128/327] Bump $BUNDLE_VERSION to 8.16.0.16 before rebuilding dev bundle. --- meteor | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meteor b/meteor index 69d520cf2e..e4a747aa43 100755 --- a/meteor +++ b/meteor @@ -1,6 +1,6 @@ #!/usr/bin/env bash -BUNDLE_VERSION=8.16.0.15 +BUNDLE_VERSION=8.16.0.16 # OS Check. Put here because here is where we download the precompiled # bundles that are arch specific. From e19544044286a91c7dc9be960c70ccbe56867ae1 Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Wed, 3 Jul 2019 12:05:30 -0400 Subject: [PATCH 129/327] Fall back to package.json "main" field if "module" cannot be resolved. The meteor/tools/isobuild/resolver.js changes are the static half of the puzzle. The runtime half was implemented in install@0.13.0 with this commit: https://github.com/benjamn/install/commit/233aa75ce3ce95efc8c64f4e30f125552afa30a1 --- .../.npm/package/npm-shrinkwrap.json | 6 +- packages/modules-runtime/package.js | 2 +- tools/isobuild/resolver.js | 37 +- tools/tests/apps/modules/package-lock.json | 548 ++++++++++++++++++ tools/tests/apps/modules/package.json | 4 + tools/tests/apps/modules/tests.js | 16 + 6 files changed, 588 insertions(+), 25 deletions(-) diff --git a/packages/modules-runtime/.npm/package/npm-shrinkwrap.json b/packages/modules-runtime/.npm/package/npm-shrinkwrap.json index bbc79174ba..db009853c3 100644 --- a/packages/modules-runtime/.npm/package/npm-shrinkwrap.json +++ b/packages/modules-runtime/.npm/package/npm-shrinkwrap.json @@ -2,9 +2,9 @@ "lockfileVersion": 1, "dependencies": { "install": { - "version": "0.12.2", - "resolved": "https://registry.npmjs.org/install/-/install-0.12.2.tgz", - "integrity": "sha512-+7thTb4Rpvs9mnlhHKGZFJbGOO6kyMgy+gg0sgM5vFzIFK0wrCYXqdlaM71Bi289DTuPHf61puMFsaZBcwDIrg==" + "version": "0.13.0", + "resolved": "https://registry.npmjs.org/install/-/install-0.13.0.tgz", + "integrity": "sha512-zDml/jzr2PKU9I8J/xyZBQn8rPCAY//UOYNmR01XwNwyfhEWObo2SWfSl1+0tm1u6PhxLwDnfsT/6jB7OUxqFA==" } } } diff --git a/packages/modules-runtime/package.js b/packages/modules-runtime/package.js index 9d77750cbc..8c97c162f8 100644 --- a/packages/modules-runtime/package.js +++ b/packages/modules-runtime/package.js @@ -7,7 +7,7 @@ Package.describe({ }); Npm.depends({ - install: "0.12.2" + install: "0.13.0" }); Package.onUse(function(api) { diff --git a/tools/isobuild/resolver.js b/tools/isobuild/resolver.js index a31d0d3d85..cfdf32a80c 100644 --- a/tools/isobuild/resolver.js +++ b/tools/isobuild/resolver.js @@ -139,17 +139,21 @@ export default class Resolver { _seenDirPaths.add(dirPath); const found = this._getPkgJsonSubsetForDir(dirPath); + const foundPkgJsonMain = found && this.mainFields.some(name => { + const value = found.pkg[name]; + if (isString(value)) { + // 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 resolve, + // which might return a package from a node_modules directory. + resolved = this._joinAndStat(dirPath, value) || + this._resolve(value, found.path, _seenDirPaths); + return resolved && typeof resolved === "object"; + } + return false; + }); - // 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 resolve, - // which might return a package from a node_modules directory. - resolved = found && - isString(found.main) && - (this._joinAndStat(dirPath, found.main) || - this._resolve(found.main, found.path, _seenDirPaths)); - - if (resolved && typeof resolved === "object") { + if (foundPkgJsonMain) { if (! resolved.packageJsonMap) { resolved.packageJsonMap = Object.create(null); } @@ -358,26 +362,17 @@ export default class Resolver { pkgSubset.version = pkg.version; } - let main; - function tryMain(name) { + this.mainFields.forEach(name => { const value = pkg[name]; - - if (isString(value)) { - main = main || value; - } - if (isString(value) || isObject(value)) { pkgSubset[name] = value; } - } - - this.mainFields.forEach(tryMain); + }); return { path: pkgJsonPath, pkg: pkgSubset, - main, }; } diff --git a/tools/tests/apps/modules/package-lock.json b/tools/tests/apps/modules/package-lock.json index a45d1462c4..e2de6d95fe 100644 --- a/tools/tests/apps/modules/package-lock.json +++ b/tools/tests/apps/modules/package-lock.json @@ -44,6 +44,14 @@ "trim-right": "^1.0.1" } }, + "@babel/helper-annotate-as-pure": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.0.0.tgz", + "integrity": "sha512-3UYcJUj9kvSLbLbUIfQTqzcy5VX7GRZ/CCDrnOaZorFFM01aXp1+GJwuFGV4NDDoAS+mOUyHcO6UD/RfqOks3Q==", + "requires": { + "@babel/types": "^7.0.0" + } + }, "@babel/helper-function-name": { "version": "7.1.0", "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.1.0.tgz", @@ -62,6 +70,14 @@ "@babel/types": "^7.0.0" } }, + "@babel/helper-module-imports": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.0.0.tgz", + "integrity": "sha512-aP/hlLq01DWNEiDg4Jn23i+CXxW/owM4WpDLFUbpjxe4NS3BhLVZQ5i7E0ZrxuQ/vwekIeciyamgB1UIYxxM6A==", + "requires": { + "@babel/types": "^7.0.0" + } + }, "@babel/helper-plugin-utils": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.0.0.tgz", @@ -185,6 +201,24 @@ "to-fast-properties": "^2.0.0" } }, + "@emotion/is-prop-valid": { + "version": "0.8.2", + "resolved": "https://registry.npmjs.org/@emotion/is-prop-valid/-/is-prop-valid-0.8.2.tgz", + "integrity": "sha512-ZQIMAA2kLUWiUeMZNJDTeCwYRx1l8SQL0kHktze4COT22occKpDML1GDUXP5/sxhOMrZO8vZw773ni4H5Snrsg==", + "requires": { + "@emotion/memoize": "0.7.2" + } + }, + "@emotion/memoize": { + "version": "0.7.2", + "resolved": "https://registry.npmjs.org/@emotion/memoize/-/memoize-0.7.2.tgz", + "integrity": "sha512-hnHhwQzvPCW1QjBWFyBtsETdllOM92BfrKWbUTmh9aeOlcVOiXvlPsK4104xH8NsaKfg86PTFsWkueQeUfMA/w==" + }, + "@emotion/unitless": { + "version": "0.7.4", + "resolved": "https://registry.npmjs.org/@emotion/unitless/-/unitless-0.7.4.tgz", + "integrity": "sha512-kBa+cDHOR9jpRJ+kcGMsysrls0leukrm68DmFQoMIWQcXdr2cZvyvypWuGYT7U+9kAExUE7+T7r6G3C3A6L8MQ==" + }, "@polymer/lit-element": { "version": "0.7.1", "resolved": "https://registry.npmjs.org/@polymer/lit-element/-/lit-element-0.7.1.tgz", @@ -193,6 +227,11 @@ "lit-html": "^1.0.0-rc.2" } }, + "@terebentina/react-popover": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@terebentina/react-popover/-/react-popover-2.0.0.tgz", + "integrity": "sha1-RqRgUqiJ1CNkbaoQV7uweHnRmQg=" + }, "@wry/context": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/@wry/context/-/context-0.4.0.tgz", @@ -251,6 +290,22 @@ "xml2js": "0.4.19" } }, + "babel-plugin-styled-components": { + "version": "1.10.6", + "resolved": "https://registry.npmjs.org/babel-plugin-styled-components/-/babel-plugin-styled-components-1.10.6.tgz", + "integrity": "sha512-gyQj/Zf1kQti66100PhrCRjI5ldjaze9O0M3emXRPAN80Zsf8+e1thpTpaXJXVHXtaM4/+dJEgZHyS9Its+8SA==", + "requires": { + "@babel/helper-annotate-as-pure": "^7.0.0", + "@babel/helper-module-imports": "^7.0.0", + "babel-plugin-syntax-jsx": "^6.18.0", + "lodash": "^4.17.11" + } + }, + "babel-plugin-syntax-jsx": { + "version": "6.18.0", + "resolved": "https://registry.npmjs.org/babel-plugin-syntax-jsx/-/babel-plugin-syntax-jsx-6.18.0.tgz", + "integrity": "sha1-CvMqmm4Tyno/1QaeYtew9Y0NiUY=" + }, "babel-runtime": { "version": "5.8.38", "resolved": "https://registry.npmjs.org/babel-runtime/-/babel-runtime-5.8.38.tgz", @@ -259,6 +314,11 @@ "core-js": "^1.0.0" } }, + "bail": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/bail/-/bail-1.0.4.tgz", + "integrity": "sha512-S8vuDB4w6YpRhICUDET3guPlQpaJl7od94tpZ0Fvnyp+MKW/HyDTcRDck+29C9g+d/qQHnddRH3+94kZdrW0Ww==" + }, "balanced-match": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", @@ -317,6 +377,11 @@ "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz", "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==" }, + "camelize": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/camelize/-/camelize-1.0.0.tgz", + "integrity": "sha1-FkpUg+Yw+kMh5a8HAg5TGDGyYJs=" + }, "chalk": { "version": "2.4.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", @@ -327,6 +392,26 @@ "supports-color": "^5.3.0" } }, + "character-entities": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/character-entities/-/character-entities-1.2.3.tgz", + "integrity": "sha512-yB4oYSAa9yLcGyTbB4ItFwHw43QHdH129IJ5R+WvxOkWlyFnR5FAaBNnUq4mcxsTVZGh28bHoeTHMKXH1wZf3w==" + }, + "character-entities-legacy": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/character-entities-legacy/-/character-entities-legacy-1.1.3.tgz", + "integrity": "sha512-YAxUpPoPwxYFsslbdKkhrGnXAtXoHNgYjlBM3WMXkWGTl5RsY3QmOyhwAgL8Nxm9l5LBThXGawxKPn68y6/fww==" + }, + "character-reference-invalid": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/character-reference-invalid/-/character-reference-invalid-1.1.3.tgz", + "integrity": "sha512-VOq6PRzQBam/8Jm6XBGk2fNEnHXAdGd6go0rtd4weAGECBamHDwwCQSOT12TACIYUZegUXnV6xBXqUssijtxIg==" + }, + "classnames": { + "version": "2.2.6", + "resolved": "https://registry.npmjs.org/classnames/-/classnames-2.2.6.tgz", + "integrity": "sha512-JR/iSQOSt+LQIWwrwEzJ9uk0xfN3mTVYMwt1Ir5mUcSN6pU+V4zQFFaJsclJbPuAUQH+yfWef6tm7l1quW3C8Q==" + }, "cli-color": { "version": "0.2.3", "resolved": "https://registry.npmjs.org/cli-color/-/cli-color-0.2.3.tgz", @@ -336,6 +421,11 @@ "memoizee": "~0.2.5" } }, + "collapse-white-space": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/collapse-white-space/-/collapse-white-space-1.0.5.tgz", + "integrity": "sha512-703bOOmytCYAX9cXYqoikYIx6twmFCXsnzRQheBcTG3nzKYBR4P/+wkYeH+Mvj7qUz8zZDtdyzbxfnEi/kYzRQ==" + }, "color-convert": { "version": "1.9.3", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", @@ -388,6 +478,21 @@ "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" }, + "css-color-keywords": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/css-color-keywords/-/css-color-keywords-1.0.0.tgz", + "integrity": "sha1-/qJhbcZ2spYmhrOvjb2+GAskTgU=" + }, + "css-to-react-native": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/css-to-react-native/-/css-to-react-native-2.3.1.tgz", + "integrity": "sha512-yO+oEx1Lf+hDKasqQRVrAvzMCz825Huh1VMlEEDlRWyAhFb/FWb6I0KpEF1PkyKQ7NEdcx9d5M2ZEWgJAsgPvQ==", + "requires": { + "camelize": "^1.0.0", + "css-color-keywords": "^1.0.0", + "postcss-value-parser": "^3.3.0" + } + }, "cycle": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/cycle/-/cycle-1.0.3.tgz", @@ -401,6 +506,11 @@ "ms": "^2.1.1" } }, + "deep-diff": { + "version": "0.3.8", + "resolved": "https://registry.npmjs.org/deep-diff/-/deep-diff-0.3.8.tgz", + "integrity": "sha1-wB3mPvsO7JeYgB1Ax+Da4ltYLIQ=" + }, "encoding": { "version": "0.1.12", "resolved": "https://registry.npmjs.org/encoding/-/encoding-0.1.12.tgz", @@ -450,6 +560,11 @@ "resolved": "https://registry.npmjs.org/events/-/events-1.1.1.tgz", "integrity": "sha1-nr23Y1rQmccNzEwqH1AEKI6L2SQ=" }, + "extend": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", + "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==" + }, "extract-zip": { "version": "1.6.7", "resolved": "https://registry.npmjs.org/extract-zip/-/extract-zip-1.6.7.tgz", @@ -508,6 +623,11 @@ "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" }, + "function-bind": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==" + }, "generic-pool": { "version": "2.5.4", "resolved": "https://registry.npmjs.org/generic-pool/-/generic-pool-2.5.4.tgz", @@ -547,11 +667,27 @@ "iterall": "^1.2.2" } }, + "has": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", + "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "requires": { + "function-bind": "^1.1.1" + } + }, "has-flag": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=" }, + "hoist-non-react-statics": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/hoist-non-react-statics/-/hoist-non-react-statics-3.3.0.tgz", + "integrity": "sha512-0XsbTXxgiaCDYDIWFcwkmerZPSwywfUqYmwT4jzewKTQSWoE6FCMoUVOeBJWK3E/CrWbxRG3m5GzY4lnIwGRBA==", + "requires": { + "react-is": "^16.7.0" + } + }, "https-proxy-agent": { "version": "2.2.1", "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-2.2.1.tgz", @@ -589,6 +725,14 @@ "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.1.8.tgz", "integrity": "sha1-vjPUCsEO8ZJnAfbwii2G+/0a0+Q=" }, + "immutability-helper": { + "version": "2.9.1", + "resolved": "https://registry.npmjs.org/immutability-helper/-/immutability-helper-2.9.1.tgz", + "integrity": "sha512-r/RmRG8xO06s/k+PIaif2r5rGc3j4Yhc01jSBfwPCXDLYZwp/yxralI37Df1mwmuzcCsen/E/ITKcTEvc1PQmQ==", + "requires": { + "invariant": "^2.2.0" + } + }, "immutable-tuple": { "version": "0.4.10", "resolved": "https://registry.npmjs.org/immutable-tuple/-/immutable-tuple-0.4.10.tgz", @@ -608,11 +752,63 @@ "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" }, + "invariant": { + "version": "2.2.4", + "resolved": "https://registry.npmjs.org/invariant/-/invariant-2.2.4.tgz", + "integrity": "sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA==", + "requires": { + "loose-envify": "^1.0.0" + } + }, + "is-alphabetical": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/is-alphabetical/-/is-alphabetical-1.0.3.tgz", + "integrity": "sha512-eEMa6MKpHFzw38eKm56iNNi6GJ7lf6aLLio7Kr23sJPAECscgRtZvOBYybejWDQ2bM949Y++61PY+udzj5QMLA==" + }, + "is-alphanumerical": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/is-alphanumerical/-/is-alphanumerical-1.0.3.tgz", + "integrity": "sha512-A1IGAPO5AW9vSh7omxIlOGwIqEvpW/TA+DksVOPM5ODuxKlZS09+TEM1E3275lJqO2oJ38vDpeAL3DCIiHE6eA==", + "requires": { + "is-alphabetical": "^1.0.0", + "is-decimal": "^1.0.0" + } + }, + "is-buffer": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", + "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==" + }, + "is-decimal": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/is-decimal/-/is-decimal-1.0.3.tgz", + "integrity": "sha512-bvLSwoDg2q6Gf+E2LEPiklHZxxiSi3XAh4Mav65mKqTfCO1HM3uBs24TjEH8iJX3bbDdLXKJXBTmGzuTUuAEjQ==" + }, + "is-hexadecimal": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/is-hexadecimal/-/is-hexadecimal-1.0.3.tgz", + "integrity": "sha512-zxQ9//Q3D/34poZf8fiy3m3XVpbQc7ren15iKqrTtLPwkPD/t3Scy9Imp63FujULGxuK0ZlCwoo5xNpktFgbOA==" + }, "is-stream": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=" }, + "is-what": { + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/is-what/-/is-what-3.2.3.tgz", + "integrity": "sha512-c4syLgFnjXTH5qd82Fp/qtUIeM0wA69xbI0KH1QpurMIvDaZFrS8UtAa4U52Dc2qSznaMxHit0gErMp6A/Qk1w==" + }, + "is-whitespace-character": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/is-whitespace-character/-/is-whitespace-character-1.0.3.tgz", + "integrity": "sha512-SNPgMLz9JzPccD3nPctcj8sZlX9DAMJSKH8bP7Z6bohCwuNgX8xbWr1eTAYXX9Vpi/aSn8Y1akL9WgM3t43YNQ==" + }, + "is-word-character": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/is-word-character/-/is-word-character-1.0.3.tgz", + "integrity": "sha512-0wfcrFgOOOBdgRNT9H33xe6Zi6yhX/uoc4U8NBZGeQQB0ctU1dnlNTyL9JM2646bHDTpsDm1Brb3VPoCIMrd/A==" + }, "isarray": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", @@ -666,6 +862,11 @@ "react": "16.4.1" } }, + "just-curry-it": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/just-curry-it/-/just-curry-it-3.1.0.tgz", + "integrity": "sha512-mjzgSOFzlrurlURaHVjnQodyPNvrHrf1TbQP2XU9NSqBtHQPuHZ+Eb6TAJP7ASeJN9h9K0KXoRTs8u6ouHBKvg==" + }, "lit-html": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/lit-html/-/lit-html-1.1.0.tgz", @@ -681,6 +882,11 @@ "resolved": "https://registry.npmjs.org/lodash-es/-/lodash-es-4.17.11.tgz", "integrity": "sha512-DHb1ub+rMjjrxqlB3H56/6MXtm1lSksDp2rA2cNWjG8mlDUYFhUj3Di2Zn5IwSU87xLv8tNIQ7sSwE/YOX/D/Q==" }, + "lodash.get": { + "version": "4.4.2", + "resolved": "https://registry.npmjs.org/lodash.get/-/lodash.get-4.4.2.tgz", + "integrity": "sha1-LRd/ZS+jHpObRDjVNBSZ36OCXpk=" + }, "lodash.isplainobject": { "version": "4.0.6", "resolved": "https://registry.npmjs.org/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz", @@ -694,6 +900,26 @@ "js-tokens": "^3.0.0 || ^4.0.0" } }, + "markdown-escapes": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/markdown-escapes/-/markdown-escapes-1.0.3.tgz", + "integrity": "sha512-XUi5HJhhV5R74k8/0H2oCbCiYf/u4cO/rX8tnGkRvrqhsr5BRNU6Mg0yt/8UIx1iIS8220BNJsDb7XnILhLepw==" + }, + "markdown-to-jsx": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/markdown-to-jsx/-/markdown-to-jsx-4.0.3.tgz", + "integrity": "sha1-O0IqN0o6pef1YMvts15t5DHUuHg=", + "requires": { + "lodash.get": "^4.4.2", + "remark-parse": "^2.0.1", + "unified": "^5.0.0" + } + }, + "memoize-one": { + "version": "5.0.4", + "resolved": "https://registry.npmjs.org/memoize-one/-/memoize-one-5.0.4.tgz", + "integrity": "sha512-P0z5IeAH6qHHGkJIXWw0xC2HNEgkx/9uWWBQw64FJj3/ol14VYdfVGWWr0fXfjhhv3TKVIqUq65os6O4GUNksA==" + }, "memoizee": { "version": "0.2.6", "resolved": "https://registry.npmjs.org/memoizee/-/memoizee-0.2.6.tgz", @@ -704,6 +930,14 @@ "next-tick": "0.1.x" } }, + "merge-anything": { + "version": "2.2.5", + "resolved": "https://registry.npmjs.org/merge-anything/-/merge-anything-2.2.5.tgz", + "integrity": "sha512-WgZGR7EQ1D8pyh57uKBbkPhUCJZLGdMzbDaxL4MDTJSGsvtpGdm8myr6DDtgJwT46xiFBlHqxbveDRpFBWlKWQ==", + "requires": { + "is-what": "^3.2.3" + } + }, "meteor-node-stubs": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/meteor-node-stubs/-/meteor-node-stubs-1.0.0.tgz", @@ -1361,6 +1595,19 @@ "wrappy": "1" } }, + "parse-entities": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/parse-entities/-/parse-entities-1.2.2.tgz", + "integrity": "sha512-NzfpbxW/NPrzZ/yYSoQxyqUZMZXIdCfE0OIN4ESsnptHJECoUk3FZktxNuzQf4tjt5UEopnxpYJbvYuxIFDdsg==", + "requires": { + "character-entities": "^1.0.0", + "character-entities-legacy": "^1.0.0", + "character-reference-invalid": "^1.0.0", + "is-alphanumerical": "^1.0.0", + "is-decimal": "^1.0.0", + "is-hexadecimal": "^1.0.0" + } + }, "path-is-absolute": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", @@ -1381,6 +1628,11 @@ "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==" }, + "postcss-value-parser": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz", + "integrity": "sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==" + }, "process-nextick-args": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.0.tgz", @@ -1462,11 +1714,59 @@ "prop-types": "^15.6.0" } }, + "react-dom": { + "version": "16.8.6", + "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-16.8.6.tgz", + "integrity": "sha512-1nL7PIq9LTL3fthPqwkvr2zY7phIPjYrT0jp4HjyEQrEROnw4dG41VVwi/wfoCneoleqrNX7iAD+pXebJZwrwA==", + "requires": { + "loose-envify": "^1.1.0", + "object-assign": "^4.1.1", + "prop-types": "^15.6.2", + "scheduler": "^0.13.6" + } + }, "react-is": { "version": "16.8.6", "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.8.6.tgz", "integrity": "sha512-aUk3bHfZ2bRSVFFbbeVS4i+lNPZr3/WM5jT2J5omUVV1zzcs1nAaf3l51ctA5FFvCRbhrH0bdAsRRQddFJZPtA==" }, + "react-lifecycles-compat": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/react-lifecycles-compat/-/react-lifecycles-compat-3.0.4.tgz", + "integrity": "sha512-fBASbA6LnOU9dOU2eW7aQ8xmYBSXUIWr+UmF9b1efZBazGNO+rcXT/icdKnYm2pTwcRylVUYwW7H1PHfLekVzA==" + }, + "react-redux": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/react-redux/-/react-redux-5.1.1.tgz", + "integrity": "sha512-LE7Ned+cv5qe7tMV5BPYkGQ5Lpg8gzgItK07c67yHvJ8t0iaD9kPFPAli/mYkiyJYrs2pJgExR2ZgsGqlrOApg==", + "requires": { + "@babel/runtime": "^7.1.2", + "hoist-non-react-statics": "^3.1.0", + "invariant": "^2.2.4", + "loose-envify": "^1.1.0", + "prop-types": "^15.6.1", + "react-is": "^16.6.0", + "react-lifecycles-compat": "^3.0.0" + } + }, + "react-trello": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/react-trello/-/react-trello-2.1.4.tgz", + "integrity": "sha512-wAOMUgmDT5aIR1DeZqOIr4O91zGpIjEkqtRqplrQUf+8tCXDp288EwZV0PE1bYMulzyT/UBrv4hxOx3gHZqpOA==", + "requires": { + "@terebentina/react-popover": "^2.0.0", + "classnames": "^2.2.6", + "immutability-helper": "^2.8.1", + "lodash": "^4.17.11", + "prop-types": "^15.6.2", + "react-redux": "^5.0.7", + "redux": "^4.0.0", + "redux-actions": "^2.6.1", + "redux-logger": "^3.0.6", + "smooth-dnd": "git+https://github.com/rcdexta/smooth-dnd.git", + "uuid": "^3.3.2" + } + }, "readable-stream": { "version": "2.3.6", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", @@ -1481,11 +1781,78 @@ "util-deprecate": "~1.0.1" } }, + "reduce-reducers": { + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/reduce-reducers/-/reduce-reducers-0.4.3.tgz", + "integrity": "sha512-+CNMnI8QhgVMtAt54uQs3kUxC3Sybpa7Y63HR14uGLgI9/QR5ggHvpxwhGGe3wmx5V91YwqQIblN9k5lspAmGw==" + }, + "redux": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/redux/-/redux-4.0.1.tgz", + "integrity": "sha512-R7bAtSkk7nY6O/OYMVR9RiBI+XghjF9rlbl5806HJbQph0LJVHZrU5oaO4q70eUKiqMRqm4y07KLTlMZ2BlVmg==", + "requires": { + "loose-envify": "^1.4.0", + "symbol-observable": "^1.2.0" + } + }, + "redux-actions": { + "version": "2.6.5", + "resolved": "https://registry.npmjs.org/redux-actions/-/redux-actions-2.6.5.tgz", + "integrity": "sha512-pFhEcWFTYNk7DhQgxMGnbsB1H2glqhQJRQrtPb96kD3hWiZRzXHwwmFPswg6V2MjraXRXWNmuP9P84tvdLAJmw==", + "requires": { + "invariant": "^2.2.4", + "just-curry-it": "^3.1.0", + "loose-envify": "^1.4.0", + "reduce-reducers": "^0.4.3", + "to-camel-case": "^1.0.0" + } + }, + "redux-logger": { + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/redux-logger/-/redux-logger-3.0.6.tgz", + "integrity": "sha1-91VZZvMJjzyIYExEnPC69XeCdL8=", + "requires": { + "deep-diff": "^0.3.5" + } + }, "regenerator-runtime": { "version": "0.11.1", "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz", "integrity": "sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg==" }, + "remark-parse": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/remark-parse/-/remark-parse-2.3.0.tgz", + "integrity": "sha1-ztWL+++ZmTdPn/M/vC5j/isMXDc=", + "requires": { + "collapse-white-space": "^1.0.2", + "has": "^1.0.1", + "is-alphabetical": "^1.0.0", + "is-decimal": "^1.0.0", + "is-whitespace-character": "^1.0.0", + "is-word-character": "^1.0.0", + "markdown-escapes": "^1.0.0", + "parse-entities": "^1.0.2", + "repeat-string": "^1.5.4", + "state-toggle": "^1.0.0", + "trim": "0.0.1", + "trim-trailing-lines": "^1.0.0", + "unherit": "^1.0.4", + "unist-util-remove-position": "^1.0.0", + "vfile-location": "^2.0.0", + "xtend": "^4.0.1" + } + }, + "repeat-string": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", + "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=" + }, + "replace-ext": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/replace-ext/-/replace-ext-1.0.0.tgz", + "integrity": "sha1-3mMSg3P8v3w8z6TeWkgMRaZ5WOs=" + }, "resolve": { "version": "1.11.1", "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.11.1.tgz", @@ -1517,6 +1884,15 @@ "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.1.tgz", "integrity": "sha1-e45lYZCyKOgaZq6nSEgNgozS03o=" }, + "scheduler": { + "version": "0.13.6", + "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.13.6.tgz", + "integrity": "sha512-IWnObHt413ucAYKsD9J1QShUKkbKLQQHdxRyw73sw4FN26iWr3DY/H34xGPe4nmL1DwXyWmSWmMrA9TfQbE/XQ==", + "requires": { + "loose-envify": "^1.1.0", + "object-assign": "^4.1.1" + } + }, "semver": { "version": "5.7.0", "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.0.tgz", @@ -1527,6 +1903,10 @@ "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz", "integrity": "sha1-KQy7Iy4waULX1+qbg3Mqt4VvgoU=" }, + "smooth-dnd": { + "version": "git+https://github.com/rcdexta/smooth-dnd.git#f13924c67bf6ffe4613d97bb1ee83f11d364eb1e", + "from": "git+https://github.com/rcdexta/smooth-dnd.git" + }, "source-map": { "version": "0.5.7", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", @@ -1547,6 +1927,11 @@ "resolved": "https://registry.npmjs.org/stack-trace/-/stack-trace-0.0.10.tgz", "integrity": "sha1-VHxws0fo0ytOEI6hoqFZ5f3eGcA=" }, + "state-toggle": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/state-toggle/-/state-toggle-1.0.2.tgz", + "integrity": "sha512-8LpelPGR0qQM4PnfLiplOQNJcIN1/r2Gy0xKB2zKnIW2YzPMt2sR4I/+gtPjhN7Svh9kw+zqEg2SFwpBO9iNiw==" + }, "string_decoder": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", @@ -1566,6 +1951,36 @@ "qs": "~6.0.4" } }, + "styled-components": { + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/styled-components/-/styled-components-4.3.2.tgz", + "integrity": "sha512-NppHzIFavZ3TsIU3R1omtddJ0Bv1+j50AKh3ZWyXHuFvJq1I8qkQ5mZ7uQgD89Y8zJNx2qRo6RqAH1BmoVafHw==", + "requires": { + "@babel/helper-module-imports": "^7.0.0", + "@babel/traverse": "^7.0.0", + "@emotion/is-prop-valid": "^0.8.1", + "@emotion/unitless": "^0.7.0", + "babel-plugin-styled-components": ">= 1", + "css-to-react-native": "^2.2.2", + "memoize-one": "^5.0.0", + "merge-anything": "^2.2.4", + "prop-types": "^15.5.4", + "react-is": "^16.6.0", + "stylis": "^3.5.0", + "stylis-rule-sheet": "^0.0.10", + "supports-color": "^5.5.0" + } + }, + "stylis": { + "version": "3.5.4", + "resolved": "https://registry.npmjs.org/stylis/-/stylis-3.5.4.tgz", + "integrity": "sha512-8/3pSmthWM7lsPBKv7NXkzn2Uc9W7NotcwGNpJaa3k7WMM1XDCA4MgT5k/8BIexd5ydZdboXtU90XH9Ec4Bv/Q==" + }, + "stylis-rule-sheet": { + "version": "0.0.10", + "resolved": "https://registry.npmjs.org/stylis-rule-sheet/-/stylis-rule-sheet-0.0.10.tgz", + "integrity": "sha512-nTbZoaqoBnmK+ptANthb10ZRZOGC+EmTLLUxeYIuHNkEKcmKgXX1XWKkUBT2Ac4es3NybooPe0SmvKdhKJZAuw==" + }, "supports-color": { "version": "5.5.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", @@ -1574,6 +1989,11 @@ "has-flag": "^3.0.0" } }, + "symbol-observable": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/symbol-observable/-/symbol-observable-1.2.0.tgz", + "integrity": "sha512-e900nM8RRtGhlV36KGEU9k65K3mPb1WV70OdjfxlG2EAuM1noi/E/BaW/uMhL7bPEssK8QV57vN3esixjUvcXQ==" + }, "tedious": { "version": "1.14.0", "resolved": "https://registry.npmjs.org/tedious/-/tedious-1.14.0.tgz", @@ -1588,16 +2008,52 @@ "sprintf": "0.1.5" } }, + "to-camel-case": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/to-camel-case/-/to-camel-case-1.0.0.tgz", + "integrity": "sha1-GlYFSy+daWKYzmamCJcyK29CPkY=", + "requires": { + "to-space-case": "^1.0.0" + } + }, "to-fast-properties": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", "integrity": "sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=" }, + "to-no-case": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/to-no-case/-/to-no-case-1.0.2.tgz", + "integrity": "sha1-xyKQcWTvaxeBMsjmmTAhLRtKoWo=" + }, + "to-space-case": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/to-space-case/-/to-space-case-1.0.0.tgz", + "integrity": "sha1-sFLar7Gysp3HcM6gFj5ewOvJ/Bc=", + "requires": { + "to-no-case": "^1.0.0" + } + }, + "trim": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/trim/-/trim-0.0.1.tgz", + "integrity": "sha1-WFhUf2spB1fulczMZm+1AITEYN0=" + }, "trim-right": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/trim-right/-/trim-right-1.0.1.tgz", "integrity": "sha1-yy4SAwZ+DI3h9hQJS5/kVwTqYAM=" }, + "trim-trailing-lines": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/trim-trailing-lines/-/trim-trailing-lines-1.1.2.tgz", + "integrity": "sha512-MUjYItdrqqj2zpcHFTkMa9WAv4JHTI6gnRQGPFLrt5L9a6tRMiDnIqYl8JBvu2d2Tc3lWJKQwlGCp0K8AvCM+Q==" + }, + "trough": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/trough/-/trough-1.0.4.tgz", + "integrity": "sha512-tdzBRDGWcI1OpPVmChbdSKhvSVurznZ8X36AYURAcl+0o2ldlCY2XPzyXNNxwJwwyIU+rIglTCG4kxtNKBQH7Q==" + }, "tslib": { "version": "1.9.3", "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.9.3.tgz", @@ -1613,6 +2069,64 @@ "resolved": "https://registry.npmjs.org/ua-parser-js/-/ua-parser-js-0.7.19.tgz", "integrity": "sha512-T3PVJ6uz8i0HzPxOF9SWzWAlfN/DavlpQqepn22xgve/5QecC+XMCAtmUNnY7C9StehaV6exjUCI801lOI7QlQ==" }, + "unherit": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/unherit/-/unherit-1.1.2.tgz", + "integrity": "sha512-W3tMnpaMG7ZY6xe/moK04U9fBhi6wEiCYHUW5Mop/wQHf12+79EQGwxYejNdhEz2mkqkBlGwm7pxmgBKMVUj0w==", + "requires": { + "inherits": "^2.0.1", + "xtend": "^4.0.1" + } + }, + "unified": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/unified/-/unified-5.1.0.tgz", + "integrity": "sha1-YSaNqbkc6SW+Hz0ZjAJ4sOlxYJQ=", + "requires": { + "bail": "^1.0.0", + "extend": "^3.0.0", + "has": "^1.0.1", + "is-buffer": "^1.1.4", + "once": "^1.3.3", + "trough": "^1.0.0", + "vfile": "^2.0.0", + "x-is-string": "^0.1.0" + } + }, + "unist-util-is": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/unist-util-is/-/unist-util-is-3.0.0.tgz", + "integrity": "sha512-sVZZX3+kspVNmLWBPAB6r+7D9ZgAFPNWm66f7YNb420RlQSbn+n8rG8dGZSkrER7ZIXGQYNm5pqC3v3HopH24A==" + }, + "unist-util-remove-position": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/unist-util-remove-position/-/unist-util-remove-position-1.1.3.tgz", + "integrity": "sha512-CtszTlOjP2sBGYc2zcKA/CvNdTdEs3ozbiJ63IPBxh8iZg42SCCb8m04f8z2+V1aSk5a7BxbZKEdoDjadmBkWA==", + "requires": { + "unist-util-visit": "^1.1.0" + } + }, + "unist-util-stringify-position": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/unist-util-stringify-position/-/unist-util-stringify-position-1.1.2.tgz", + "integrity": "sha512-pNCVrk64LZv1kElr0N1wPiHEUoXNVFERp+mlTg/s9R5Lwg87f9bM/3sQB99w+N9D/qnM9ar3+AKDBwo/gm/iQQ==" + }, + "unist-util-visit": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/unist-util-visit/-/unist-util-visit-1.4.1.tgz", + "integrity": "sha512-AvGNk7Bb//EmJZyhtRUnNMEpId/AZ5Ph/KUpTI09WHQuDZHKovQ1oEv3mfmKpWKtoMzyMC4GLBm1Zy5k12fjIw==", + "requires": { + "unist-util-visit-parents": "^2.0.0" + } + }, + "unist-util-visit-parents": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/unist-util-visit-parents/-/unist-util-visit-parents-2.1.2.tgz", + "integrity": "sha512-DyN5vD4NE3aSeB+PXYNKxzGsfocxp6asDc2XXE3b0ekO2BaRUpBicbbUygfSvYfUz1IkmjFR1YF7dPklraMZ2g==", + "requires": { + "unist-util-is": "^3.0.0" + } + }, "url": { "version": "0.10.3", "resolved": "https://registry.npmjs.org/url/-/url-0.10.3.tgz", @@ -1632,6 +2146,30 @@ "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.2.tgz", "integrity": "sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA==" }, + "vfile": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/vfile/-/vfile-2.3.0.tgz", + "integrity": "sha512-ASt4mBUHcTpMKD/l5Q+WJXNtshlWxOogYyGYYrg4lt/vuRjC1EFQtlAofL5VmtVNIZJzWYFJjzGWZ0Gw8pzW1w==", + "requires": { + "is-buffer": "^1.1.4", + "replace-ext": "1.0.0", + "unist-util-stringify-position": "^1.0.0", + "vfile-message": "^1.0.0" + } + }, + "vfile-location": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/vfile-location/-/vfile-location-2.0.5.tgz", + "integrity": "sha512-Pa1ey0OzYBkLPxPZI3d9E+S4BmvfVwNAAXrrqGbwTVXWaX2p9kM1zZ+n35UtVM06shmWKH4RPRN8KI80qE3wNQ==" + }, + "vfile-message": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/vfile-message/-/vfile-message-1.1.1.tgz", + "integrity": "sha512-1WmsopSGhWt5laNir+633LszXvZ+Z/lxveBf6yhGsqnQIhlhzooZae7zV6YVM1Sdkw68dtAW3ow0pOdPANugvA==", + "requires": { + "unist-util-stringify-position": "^1.1.1" + } + }, "whatwg-fetch": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/whatwg-fetch/-/whatwg-fetch-3.0.0.tgz", @@ -1663,6 +2201,11 @@ "async-limiter": "~1.0.0" } }, + "x-is-string": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/x-is-string/-/x-is-string-0.1.0.tgz", + "integrity": "sha1-R0tQhlrzpJqcRlfwWs0UVFj3fYI=" + }, "xml2js": { "version": "0.4.19", "resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.4.19.tgz", @@ -1677,6 +2220,11 @@ "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-9.0.7.tgz", "integrity": "sha1-Ey7mPS7FVlxVfiD0wi35rKaGsQ0=" }, + "xtend": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz", + "integrity": "sha1-pcbVMr5lbiPbgg77lDofBJmNY68=" + }, "yauzl": { "version": "2.4.1", "resolved": "https://registry.npmjs.org/yauzl/-/yauzl-2.4.1.tgz", diff --git a/tools/tests/apps/modules/package.json b/tools/tests/apps/modules/package.json index 29e6a6fca4..abab3b49eb 100644 --- a/tools/tests/apps/modules/package.json +++ b/tools/tests/apps/modules/package.json @@ -19,6 +19,7 @@ "immutable-tuple": "^0.4.4", "jsx-import-test": "file:imports/links/jsx-import-test", "lodash-es": "^4.17.7", + "markdown-to-jsx": "4.0.3", "meteor-node-stubs": "^1.0.0", "mobx": "5.8.0", "moment": "^2.22.2", @@ -26,8 +27,11 @@ "mysql": "^2.15.0", "pify": "^4.0.1", "puppeteer": "^1.6.2", + "react-dom": "^16.8.6", + "react-trello": "2.1.4", "regenerator-runtime": "^0.11.1", "stripe": "^4.4.0", + "styled-components": "^4.3.2", "uuid": "^3.1.0", "winston": "^2.3.1" }, diff --git a/tools/tests/apps/modules/tests.js b/tools/tests/apps/modules/tests.js index 9d04147f3e..3f15c556fa 100644 --- a/tools/tests/apps/modules/tests.js +++ b/tools/tests/apps/modules/tests.js @@ -412,6 +412,22 @@ describe("local node_modules", () => { check(require("@babel/runtime/helpers/esm/toArray.js")); check(require("@babel/runtime/helpers/esm/typeof.js")); }); + + it('can import packages with broken "module" fields', () => { + assert.strictEqual( + require.resolve("markdown-to-jsx"), + "/node_modules/markdown-to-jsx/index.es5.js", + ); + const md2jsx = require("markdown-to-jsx"); + assert.strictEqual(typeof md2jsx.default, "function"); + + assert.strictEqual( + require.resolve("react-trello"), + "/node_modules/react-trello/dist/index.js", + ); + const reactTrello = require("react-trello"); + assert.strictEqual(typeof reactTrello.default, "function"); + }); }); describe("Meteor packages", () => { From 1955ec08fa55a9f4eed2ae65d68c315b293f7d56 Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Wed, 3 Jul 2019 12:40:48 -0400 Subject: [PATCH 130/327] Bump package versions for 1.8.2-beta.12 release. --- packages/babel-compiler/package.js | 2 +- packages/babel-runtime/package.js | 2 +- packages/context/package.js | 2 +- packages/ecmascript-runtime-client/package.js | 2 +- packages/ecmascript-runtime-server/package.js | 2 +- packages/ecmascript/package.js | 2 +- packages/meteor-tool/package.js | 2 +- packages/modules-runtime/package.js | 2 +- packages/modules/package.js | 2 +- packages/mongo/package.js | 2 +- packages/npm-mongo/package.js | 2 +- scripts/admin/meteor-release-experimental.json | 2 +- 12 files changed, 12 insertions(+), 12 deletions(-) diff --git a/packages/babel-compiler/package.js b/packages/babel-compiler/package.js index 116507a3da..fb13083477 100644 --- a/packages/babel-compiler/package.js +++ b/packages/babel-compiler/package.js @@ -6,7 +6,7 @@ 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.4.0-beta182.11' + version: '7.4.0-beta182.12' }); Npm.depends({ diff --git a/packages/babel-runtime/package.js b/packages/babel-runtime/package.js index 0dcfef61c6..6ec77d063f 100644 --- a/packages/babel-runtime/package.js +++ b/packages/babel-runtime/package.js @@ -1,7 +1,7 @@ Package.describe({ name: "babel-runtime", summary: "Runtime support for output of Babel transpiler", - version: '1.4.0-beta182.11', + version: '1.4.0-beta182.12', documentation: 'README.md' }); diff --git a/packages/context/package.js b/packages/context/package.js index 6c8ae16863..18d5ce4b26 100644 --- a/packages/context/package.js +++ b/packages/context/package.js @@ -1,6 +1,6 @@ Package.describe({ name: "context", - version: "0.4.0-beta182.11", + version: "0.4.0-beta182.12", summary: "Manage contextual information without passing objects around", documentation: "README.md" }); diff --git a/packages/ecmascript-runtime-client/package.js b/packages/ecmascript-runtime-client/package.js index 5b0cd022ff..b7b02d7d6d 100644 --- a/packages/ecmascript-runtime-client/package.js +++ b/packages/ecmascript-runtime-client/package.js @@ -1,6 +1,6 @@ Package.describe({ name: "ecmascript-runtime-client", - version: "0.9.0-beta182.11", + version: "0.9.0-beta182.12", summary: "Polyfills for new ECMAScript 2015 APIs like Map and Set", git: "https://github.com/meteor/meteor/tree/devel/packages/ecmascript-runtime-client", documentation: "README.md" diff --git a/packages/ecmascript-runtime-server/package.js b/packages/ecmascript-runtime-server/package.js index 4d0ca95c2d..33a75c4047 100644 --- a/packages/ecmascript-runtime-server/package.js +++ b/packages/ecmascript-runtime-server/package.js @@ -1,6 +1,6 @@ Package.describe({ name: "ecmascript-runtime-server", - version: "0.8.0-beta182.11", + version: "0.8.0-beta182.12", summary: "Polyfills for new ECMAScript 2015 APIs like Map and Set", git: "https://github.com/meteor/meteor/tree/devel/packages/ecmascript-runtime-client", documentation: "README.md" diff --git a/packages/ecmascript/package.js b/packages/ecmascript/package.js index 29a5ffe5d5..498c0895b3 100644 --- a/packages/ecmascript/package.js +++ b/packages/ecmascript/package.js @@ -1,6 +1,6 @@ Package.describe({ name: 'ecmascript', - version: '0.13.0-beta182.11', + version: '0.13.0-beta182.12', summary: 'Compiler plugin that supports ES2015+ in all .js files', documentation: 'README.md' }); diff --git a/packages/meteor-tool/package.js b/packages/meteor-tool/package.js index 3acbba13a8..a9df049c6f 100644 --- a/packages/meteor-tool/package.js +++ b/packages/meteor-tool/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "The Meteor command-line tool", - version: '1.8.2-beta.11' + version: '1.8.2-beta.12' }); Package.includeTool(); diff --git a/packages/modules-runtime/package.js b/packages/modules-runtime/package.js index 8c97c162f8..9f712baf66 100644 --- a/packages/modules-runtime/package.js +++ b/packages/modules-runtime/package.js @@ -1,6 +1,6 @@ Package.describe({ name: "modules-runtime", - version: "0.11.0-beta182.11", + version: "0.11.0-beta182.12", summary: "CommonJS module system", git: "https://github.com/benjamn/install", documentation: "README.md" diff --git a/packages/modules/package.js b/packages/modules/package.js index c394b291d8..7029fb6cc9 100644 --- a/packages/modules/package.js +++ b/packages/modules/package.js @@ -1,6 +1,6 @@ Package.describe({ name: "modules", - version: "0.14.0-beta182.11", + version: "0.14.0-beta182.12", summary: "CommonJS module system", documentation: "README.md" }); diff --git a/packages/mongo/package.js b/packages/mongo/package.js index b7c5534949..b09c62e6ed 100644 --- a/packages/mongo/package.js +++ b/packages/mongo/package.js @@ -9,7 +9,7 @@ Package.describe({ summary: "Adaptor for using MongoDB and Minimongo over DDP", - version: '1.7.0-beta182.11' + version: '1.7.0-beta182.12' }); Npm.depends({ diff --git a/packages/npm-mongo/package.js b/packages/npm-mongo/package.js index dde50584f4..aae8347df9 100644 --- a/packages/npm-mongo/package.js +++ b/packages/npm-mongo/package.js @@ -3,7 +3,7 @@ Package.describe({ summary: "Wrapper around the mongo npm package", - version: "3.2.0-beta182.11", + version: "3.2.0-beta182.12", documentation: null }); diff --git a/scripts/admin/meteor-release-experimental.json b/scripts/admin/meteor-release-experimental.json index 7fa04af435..35b006b6d0 100644 --- a/scripts/admin/meteor-release-experimental.json +++ b/scripts/admin/meteor-release-experimental.json @@ -1,6 +1,6 @@ { "track": "METEOR", - "version": "1.8.2-beta.11", + "version": "1.8.2-beta.12", "recommended": false, "official": false, "description": "Meteor" From 7de2d357473c48defa07990e0dd93d1978a1a238 Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Thu, 4 Jul 2019 09:38:27 -0400 Subject: [PATCH 131/327] Move global types into tools/index.d.ts. --- tools/index.d.ts | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 tools/index.d.ts diff --git a/tools/index.d.ts b/tools/index.d.ts new file mode 100644 index 0000000000..0d4e8e99f0 --- /dev/null +++ b/tools/index.d.ts @@ -0,0 +1,15 @@ +export {} + +declare global { + interface JSON { + // The ES5 library fails to allow the input parameter to be a Buffer. + parse(input: Buffer | string, reviver?: (this: any, key: string, value: any) => any): any; + } + + interface Promise { + // This is an incomplete list of methods added to Promise.prototype by the + // meteor-promise npm package. TODO Eventually these declarations should be + // moved into that package. + await: () => T; + } +} From f77cbc5bcf98d27d7b99f00e7a95e04d99fc1af1 Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Wed, 3 Jul 2019 18:40:09 -0400 Subject: [PATCH 132/327] Rename tools/fs/files.js to files.ts. --- tools/fs/{files.js => files.ts} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename tools/fs/{files.js => files.ts} (100%) diff --git a/tools/fs/files.js b/tools/fs/files.ts similarity index 100% rename from tools/fs/files.js rename to tools/fs/files.ts From 5ed64fb1dbc17f95d3d3a757cc6fe060e8f682ed Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Sat, 13 Apr 2019 11:16:32 -0400 Subject: [PATCH 133/327] Remove explicit .js extension from tools/fs/files imports. --- tools/cli/commands-cordova.js | 2 +- tools/cli/commands-packages-query.js | 2 +- tools/cli/commands-packages.js | 2 +- tools/cli/commands.js | 2 +- tools/cli/default-npm-deps.js | 2 +- tools/cli/dev-bundle-helpers.js | 2 +- tools/cli/main.js | 2 +- tools/cordova/builder.js | 2 +- tools/cordova/project.js | 2 +- tools/cordova/run-targets.js | 2 +- tools/fs/optimistic.js | 2 +- tools/fs/safe-watcher.js | 2 +- tools/fs/watch.js | 2 +- tools/isobuild/build-plugin.js | 2 +- tools/isobuild/builder.js | 2 +- tools/isobuild/bundler.js | 2 +- tools/isobuild/compiler-deprecated-compile-step.js | 2 +- tools/isobuild/compiler-plugin.js | 2 +- tools/isobuild/compiler.js | 2 +- tools/isobuild/import-scanner.js | 2 +- tools/isobuild/isopack-cache.js | 2 +- tools/isobuild/isopack.js | 2 +- tools/isobuild/linker.js | 2 +- tools/isobuild/meteor-npm.js | 2 +- tools/isobuild/npm-discards.js | 2 +- tools/isobuild/package-api.js | 2 +- tools/isobuild/package-namespace.js | 2 +- tools/isobuild/package-source.js | 4 ++-- tools/isobuild/resolver.js | 2 +- tools/isobuild/unibuild.js | 2 +- tools/meteor-services/auth.js | 2 +- tools/meteor-services/config.js | 2 +- tools/meteor-services/deploy.js | 2 +- tools/meteor-services/service-connection.js | 2 +- tools/meteor-services/stats.js | 2 +- tools/packaging/catalog/catalog-local.js | 2 +- tools/packaging/catalog/catalog-remote.js | 2 +- tools/packaging/package-client.js | 2 +- tools/packaging/release.js | 2 +- tools/packaging/tropohouse.js | 2 +- tools/packaging/updater.js | 2 +- tools/packaging/warehouse.js | 2 +- tools/project-context.js | 2 +- tools/runners/run-all.js | 2 +- tools/runners/run-app.js | 2 +- tools/runners/run-mongo.js | 2 +- tools/runners/run-selenium.js | 2 +- tools/tests/bundle.js | 2 +- tools/tests/colon-converter-tests.js | 2 +- tools/tests/command-line.js | 2 +- tools/tests/compiler-plugins.js | 2 +- tools/tests/constraint-solver.js | 2 +- tools/tests/cordova-append-config.js | 2 +- tools/tests/cordova-builds.js | 2 +- tools/tests/cordova-platforms.js | 2 +- tools/tests/cordova-plugins.js | 2 +- tools/tests/dynamic-import.js | 2 +- tools/tests/linter-plugins.js | 2 +- tools/tests/meteor-script-link-tests.js | 2 +- tools/tests/mongo.js | 2 +- tools/tests/npm.js | 2 +- tools/tests/old.js | 2 +- tools/tests/old/test-bundler-assets.js | 2 +- tools/tests/old/test-bundler-npm.js | 2 +- tools/tests/old/test-bundler-options.js | 2 +- tools/tests/old/test-watch.js | 2 +- tools/tests/package-tests.js | 2 +- tools/tests/parse-stack-test.js | 2 +- tools/tests/releases.js | 2 +- tools/tests/run.js | 2 +- tools/tests/source-maps.js | 2 +- tools/tests/static-html.js | 2 +- tools/tests/tarball.js | 2 +- tools/tests/wipe-all-packages.js | 2 +- tools/tool-env/install-git-hooks.js | 2 +- tools/tool-env/isopackets.js | 2 +- tools/tool-testing/clients/browserstack/index.js | 2 +- tools/tool-testing/clients/phantom/index.js | 2 +- tools/tool-testing/galaxy-utils.js | 2 +- tools/tool-testing/run.js | 2 +- tools/tool-testing/sandbox.js | 2 +- tools/tool-testing/selftest.js | 2 +- tools/upgraders.js | 2 +- tools/utils/buildmessage.js | 2 +- tools/utils/http-helpers.js | 2 +- tools/utils/utils.js | 4 ++-- 86 files changed, 88 insertions(+), 88 deletions(-) diff --git a/tools/cli/commands-cordova.js b/tools/cli/commands-cordova.js index ffec0c23c7..2822434baa 100644 --- a/tools/cli/commands-cordova.js +++ b/tools/cli/commands-cordova.js @@ -3,7 +3,7 @@ import main from './main.js'; import { Console } from '../console/console.js'; import catalog from '../packaging/catalog/catalog.js'; import buildmessage from '../utils/buildmessage.js'; -import files from '../fs/files.js'; +import files from '../fs/files'; import { CORDOVA_PLATFORMS, ensureDevBundleDependencies, diff --git a/tools/cli/commands-packages-query.js b/tools/cli/commands-packages-query.js index d0f996fa97..2e68a79d76 100644 --- a/tools/cli/commands-packages-query.js +++ b/tools/cli/commands-packages-query.js @@ -5,7 +5,7 @@ var _ = require('underscore'); var buildmessage = require('../utils/buildmessage.js'); var catalog = require('../packaging/catalog/catalog.js'); var Console = require('../console/console.js').Console; -var files = require('../fs/files.js'); +var files = require('../fs/files'); import { loadIsopackage } from '../tool-env/isopackets.js'; var main = require('./main.js'); var packageVersionParser = require('../packaging/package-version-parser.js'); diff --git a/tools/cli/commands-packages.js b/tools/cli/commands-packages.js index 85ea491d0f..c2f814cb41 100644 --- a/tools/cli/commands-packages.js +++ b/tools/cli/commands-packages.js @@ -1,6 +1,6 @@ var main = require('./main.js'); var _ = require('underscore'); -var files = require('../fs/files.js'); +var files = require('../fs/files'); var buildmessage = require('../utils/buildmessage.js'); var auth = require('../meteor-services/auth.js'); var config = require('../meteor-services/config.js'); diff --git a/tools/cli/commands.js b/tools/cli/commands.js index d43ccbf07d..c387c2afef 100644 --- a/tools/cli/commands.js +++ b/tools/cli/commands.js @@ -1,6 +1,6 @@ var main = require('./main.js'); var _ = require('underscore'); -var files = require('../fs/files.js'); +var files = require('../fs/files'); var deploy = require('../meteor-services/deploy.js'); var buildmessage = require('../utils/buildmessage.js'); var auth = require('../meteor-services/auth.js'); diff --git a/tools/cli/default-npm-deps.js b/tools/cli/default-npm-deps.js index 4d4fa2a5c7..5acf992307 100644 --- a/tools/cli/default-npm-deps.js +++ b/tools/cli/default-npm-deps.js @@ -4,7 +4,7 @@ import { statOrNull, writeFile, unlink, -} from "../fs/files.js"; +} from "../fs/files"; const INSTALL_JOB_MESSAGE = "installing npm dependencies"; diff --git a/tools/cli/dev-bundle-helpers.js b/tools/cli/dev-bundle-helpers.js index f41c243ff3..0a64995b3d 100644 --- a/tools/cli/dev-bundle-helpers.js +++ b/tools/cli/dev-bundle-helpers.js @@ -1,4 +1,4 @@ -import { pathJoin, getDevBundle } from '../fs/files.js'; +import { pathJoin, getDevBundle } from '../fs/files'; import { installNpmModule, moduleDoesResolve } from '../isobuild/meteor-npm.js'; export function ensureDependencies(deps) { diff --git a/tools/cli/main.js b/tools/cli/main.js index 1ccf77ebe8..67227d6b91 100644 --- a/tools/cli/main.js +++ b/tools/cli/main.js @@ -7,7 +7,7 @@ var assert = require("assert"); var _ = require('underscore'); var Fiber = require('fibers'); var Console = require('../console/console.js').Console; -var files = require('../fs/files.js'); +var files = require('../fs/files'); var warehouse = require('../packaging/warehouse.js'); var tropohouse = require('../packaging/tropohouse.js'); var release = require('../packaging/release.js'); diff --git a/tools/cordova/builder.js b/tools/cordova/builder.js index 48bde099d8..83eb7df54a 100644 --- a/tools/cordova/builder.js +++ b/tools/cordova/builder.js @@ -3,7 +3,7 @@ import util from 'util'; import path from 'path'; import { Console } from '../console/console.js'; import buildmessage from '../utils/buildmessage.js'; -import files from '../fs/files.js'; +import files from '../fs/files'; import { optimisticReadJsonOrNull } from "../fs/optimistic.js"; import bundler from '../isobuild/bundler.js'; import archinfo from '../utils/archinfo.js'; diff --git a/tools/cordova/project.js b/tools/cordova/project.js index e4c106ac1a..9955448539 100644 --- a/tools/cordova/project.js +++ b/tools/cordova/project.js @@ -4,7 +4,7 @@ import assert from 'assert'; import chalk from 'chalk'; import semver from 'semver'; -import files from '../fs/files.js'; +import files from '../fs/files'; import utils from '../utils/utils.js'; import { Console } from '../console/console.js'; import { Profile } from '../tool-env/profile.js'; diff --git a/tools/cordova/run-targets.js b/tools/cordova/run-targets.js index 47e0e2cb73..021ccc9ed0 100644 --- a/tools/cordova/run-targets.js +++ b/tools/cordova/run-targets.js @@ -5,7 +5,7 @@ import child_process from 'child_process'; import { loadIsopackage } from '../tool-env/isopackets.js'; import runLog from '../runners/run-log.js'; import { Console } from '../console/console.js'; -import files from '../fs/files.js'; +import files from '../fs/files'; import { execFileSync, execFileAsync } from '../utils/processes.js'; export class CordovaRunTarget { diff --git a/tools/fs/optimistic.js b/tools/fs/optimistic.js index 6fab675f2f..ad00de3359 100644 --- a/tools/fs/optimistic.js +++ b/tools/fs/optimistic.js @@ -14,7 +14,7 @@ import { readFile, readdir, dependOnPath, -} from "./files.js"; +} from "./files"; // When in doubt, the optimistic caching system can be completely disabled // by setting this environment variable. diff --git a/tools/fs/safe-watcher.js b/tools/fs/safe-watcher.js index dae54bd9c0..a6b86b4411 100644 --- a/tools/fs/safe-watcher.js +++ b/tools/fs/safe-watcher.js @@ -8,7 +8,7 @@ import { convertToStandardPath, watchFile, unwatchFile, -} from "./files.js"; +} from "./files"; // Set METEOR_WATCH_FORCE_POLLING environment variable to a truthy value to // force the use of files.watchFile instead of watchLibrary.watch. diff --git a/tools/fs/watch.js b/tools/fs/watch.js index 7b0a1371f9..7bc85586a0 100644 --- a/tools/fs/watch.js +++ b/tools/fs/watch.js @@ -1,4 +1,4 @@ -import files from './files.js'; +import files from './files'; import _ from "underscore"; import * as safeWatcher from './safe-watcher.js'; import {createHash} from "crypto"; diff --git a/tools/isobuild/build-plugin.js b/tools/isobuild/build-plugin.js index cafd77c4f6..7df77374a8 100644 --- a/tools/isobuild/build-plugin.js +++ b/tools/isobuild/build-plugin.js @@ -1,6 +1,6 @@ var archinfo = require('../utils/archinfo.js'); var buildmessage = require('../utils/buildmessage.js'); -var files = require('../fs/files.js'); +var files = require('../fs/files'); var _ = require('underscore'); import utils from '../utils/utils.js'; diff --git a/tools/isobuild/builder.js b/tools/isobuild/builder.js index eaaf8e99b5..27fefd8566 100644 --- a/tools/isobuild/builder.js +++ b/tools/isobuild/builder.js @@ -2,7 +2,7 @@ import assert from "assert"; import {WatchSet, readAndWatchFile, sha1} from '../fs/watch.js'; import files, { symlinkWithOverwrite, -} from '../fs/files.js'; +} from '../fs/files'; import NpmDiscards from './npm-discards.js'; import {Profile} from '../tool-env/profile.js'; import { diff --git a/tools/isobuild/bundler.js b/tools/isobuild/bundler.js index 01e94e5a2d..e32b74708f 100644 --- a/tools/isobuild/bundler.js +++ b/tools/isobuild/bundler.js @@ -161,7 +161,7 @@ import { JsFile, CssFile } from './minifier-plugin.js'; var meteorNpm = require('./meteor-npm.js'); import { addToTree } from "./linker.js"; -var files = require('../fs/files.js'); +var files = require('../fs/files'); var archinfo = require('../utils/archinfo.js'); var buildmessage = require('../utils/buildmessage.js'); var watch = require('../fs/watch.js'); diff --git a/tools/isobuild/compiler-deprecated-compile-step.js b/tools/isobuild/compiler-deprecated-compile-step.js index 39dc5ed6eb..1b98117737 100644 --- a/tools/isobuild/compiler-deprecated-compile-step.js +++ b/tools/isobuild/compiler-deprecated-compile-step.js @@ -9,7 +9,7 @@ var _ = require('underscore'); var archinfo = require('../utils/archinfo.js'); var buildmessage = require('../utils/buildmessage.js'); -var files = require('../fs/files.js'); +var files = require('../fs/files'); var colonConverter = require('../utils/colon-converter.js'); var watch = require('../fs/watch.js'); diff --git a/tools/isobuild/compiler-plugin.js b/tools/isobuild/compiler-plugin.js index c65c191cd9..1cc3c38dda 100644 --- a/tools/isobuild/compiler-plugin.js +++ b/tools/isobuild/compiler-plugin.js @@ -2,7 +2,7 @@ var archinfo = require('../utils/archinfo.js'); var buildmessage = require('../utils/buildmessage.js'); var buildPluginModule = require('./build-plugin.js'); var colonConverter = require('../utils/colon-converter.js'); -var files = require('../fs/files.js'); +var files = require('../fs/files'); var compiler = require('./compiler.js'); var linker = require('./linker.js'); var util = require('util'); diff --git a/tools/isobuild/compiler.js b/tools/isobuild/compiler.js index 78b76ac119..051d3930b6 100644 --- a/tools/isobuild/compiler.js +++ b/tools/isobuild/compiler.js @@ -7,7 +7,7 @@ var isopack = require('./isopack.js'); var meteorNpm = require('./meteor-npm.js'); var watch = require('../fs/watch.js'); var Console = require('../console/console.js').Console; -var files = require('../fs/files.js'); +var files = require('../fs/files'); var colonConverter = require('../utils/colon-converter.js'); var linterPluginModule = require('./linter-plugin.js'); var compileStepModule = require('./compiler-deprecated-compile-step.js'); diff --git a/tools/isobuild/import-scanner.js b/tools/isobuild/import-scanner.js index 05e0b83431..da32be01cc 100644 --- a/tools/isobuild/import-scanner.js +++ b/tools/isobuild/import-scanner.js @@ -25,7 +25,7 @@ import { convertToPosixPath, realpathOrNull, writeFileAtomically, -} from "../fs/files.js"; +} from "../fs/files"; const { relative: posixRelative, diff --git a/tools/isobuild/isopack-cache.js b/tools/isobuild/isopack-cache.js index f7c8dbc00c..45f3723bbc 100644 --- a/tools/isobuild/isopack-cache.js +++ b/tools/isobuild/isopack-cache.js @@ -2,7 +2,7 @@ var _ = require('underscore'); var buildmessage = require('../utils/buildmessage.js'); var compiler = require('./compiler.js'); -var files = require('../fs/files.js'); +var files = require('../fs/files'); var isopackModule = require('./isopack.js'); var watch = require('../fs/watch.js'); var colonConverter = require('../utils/colon-converter.js'); diff --git a/tools/isobuild/isopack.js b/tools/isobuild/isopack.js index 07d03a7ee3..20b366fe57 100644 --- a/tools/isobuild/isopack.js +++ b/tools/isobuild/isopack.js @@ -7,7 +7,7 @@ var buildmessage = require('../utils/buildmessage.js'); import Builder from './builder.js'; var bundler = require('./bundler.js'); var watch = require('../fs/watch.js'); -var files = require('../fs/files.js'); +var files = require('../fs/files'); import { ISOPACKETS, makeIsopacketBuildContext, diff --git a/tools/isobuild/linker.js b/tools/isobuild/linker.js index d09ec57aa0..8d3c4f1d20 100644 --- a/tools/isobuild/linker.js +++ b/tools/isobuild/linker.js @@ -6,7 +6,7 @@ var Profile = require('../tool-env/profile.js').Profile; import assert from 'assert'; import LRU from 'lru-cache'; import { sourceMapLength } from '../utils/utils.js'; -import files from '../fs/files.js'; +import files from '../fs/files'; import { findAssignedGlobals } from './js-analyze.js'; import { convert as convertColons } from '../utils/colon-converter.js'; diff --git a/tools/isobuild/meteor-npm.js b/tools/isobuild/meteor-npm.js index 821f997f7f..3b0c83144c 100644 --- a/tools/isobuild/meteor-npm.js +++ b/tools/isobuild/meteor-npm.js @@ -6,7 +6,7 @@ var assert = require('assert'); var cleanup = require('../tool-env/cleanup.js'); var fs = require('fs'); -var files = require('../fs/files.js'); +var files = require('../fs/files'); var os = require('os'); var _ = require('underscore'); var httpHelpers = require('../utils/http-helpers.js'); diff --git a/tools/isobuild/npm-discards.js b/tools/isobuild/npm-discards.js index dabac02d9f..b895a1cec0 100644 --- a/tools/isobuild/npm-discards.js +++ b/tools/isobuild/npm-discards.js @@ -1,5 +1,5 @@ var assert = require("assert"); -var files = require('../fs/files.js'); +var files = require('../fs/files'); var _ = require("underscore"); // This class encapsulates a structured specification of files and diff --git a/tools/isobuild/package-api.js b/tools/isobuild/package-api.js index 4fff4a2d8c..d5089e16b5 100644 --- a/tools/isobuild/package-api.js +++ b/tools/isobuild/package-api.js @@ -12,7 +12,7 @@ var catalog = require('../packaging/catalog/catalog.js'); import { pathRelative, convertToPosixPath, -} from "../fs/files.js"; +} from "../fs/files"; function toArray (x) { if (_.isArray(x)) { diff --git a/tools/isobuild/package-namespace.js b/tools/isobuild/package-namespace.js index 094979b926..e37e61838f 100644 --- a/tools/isobuild/package-namespace.js +++ b/tools/isobuild/package-namespace.js @@ -1,5 +1,5 @@ import { each, size, compact } from "underscore"; -import { inCheckout } from "../fs/files.js"; +import { inCheckout } from "../fs/files"; import buildmessage from "../utils/buildmessage.js"; import packageVersionParser from "../packaging/package-version-parser.js"; diff --git a/tools/isobuild/package-source.js b/tools/isobuild/package-source.js index f579225f50..bc146a7060 100644 --- a/tools/isobuild/package-source.js +++ b/tools/isobuild/package-source.js @@ -1,7 +1,7 @@ var _ = require('underscore'); var sourcemap = require('source-map'); -var files = require('../fs/files.js'); +var files = require('../fs/files'); var utils = require('../utils/utils.js'); var watch = require('../fs/watch.js'); var buildmessage = require('../utils/buildmessage.js'); @@ -23,7 +23,7 @@ import { TEST_FILENAME_REGEXPS, APP_TEST_FILENAME_REGEXPS, isTestFilePath, -} from './test-files.js'; +} from './test-files'; import { convert as convertColonsInPath diff --git a/tools/isobuild/resolver.js b/tools/isobuild/resolver.js index cfdf32a80c..326cbf2a27 100644 --- a/tools/isobuild/resolver.js +++ b/tools/isobuild/resolver.js @@ -16,7 +16,7 @@ import { pathBasename, convertToOSPath, convertToPosixPath, -} from "../fs/files.js"; +} from "../fs/files"; import LRU from "lru-cache"; diff --git a/tools/isobuild/unibuild.js b/tools/isobuild/unibuild.js index d3bc27a1a4..2e20af25ec 100644 --- a/tools/isobuild/unibuild.js +++ b/tools/isobuild/unibuild.js @@ -1,7 +1,7 @@ "use strict"; import _ from "underscore"; -import files from "../fs/files.js"; +import files from "../fs/files"; import { WatchSet, sha1 } from "../fs/watch.js"; import { NodeModulesDirectory } from "./bundler.js"; import * as archinfo from "../utils/archinfo.js"; diff --git a/tools/meteor-services/auth.js b/tools/meteor-services/auth.js index cfd097fe81..6c76c606d1 100644 --- a/tools/meteor-services/auth.js +++ b/tools/meteor-services/auth.js @@ -1,6 +1,6 @@ var _ = require('underscore'); var utils = require('../utils/utils.js'); -var files = require('../fs/files.js'); +var files = require('../fs/files'); var config = require('./config.js'); var httpHelpers = require('../utils/http-helpers.js'); var fiberHelpers = require('../utils/fiber-helpers.js'); diff --git a/tools/meteor-services/config.js b/tools/meteor-services/config.js index a569c5dc65..65e42c25c4 100644 --- a/tools/meteor-services/config.js +++ b/tools/meteor-services/config.js @@ -4,7 +4,7 @@ import { getCurrentToolsDir, getHomeDir, inCheckout, -} from '../fs/files.js'; +} from '../fs/files'; import tropohouse from '../packaging/tropohouse.js'; // A few functions in the `meteor` tool talk to MDG servers: primarily diff --git a/tools/meteor-services/deploy.js b/tools/meteor-services/deploy.js index 3ed42961b2..53bd50fcc5 100644 --- a/tools/meteor-services/deploy.js +++ b/tools/meteor-services/deploy.js @@ -9,7 +9,7 @@ import { createTarGzStream, getSettings, mkdtemp, -} from '../fs/files.js'; +} from '../fs/files'; import { request } from '../utils/http-helpers.js'; import buildmessage from '../utils/buildmessage.js'; import { diff --git a/tools/meteor-services/service-connection.js b/tools/meteor-services/service-connection.js index 7cbc80af12..643810036c 100644 --- a/tools/meteor-services/service-connection.js +++ b/tools/meteor-services/service-connection.js @@ -1,6 +1,6 @@ var _ = require("underscore"); import { loadIsopackage } from '../tool-env/isopackets.js'; -var files = require('../fs/files.js'); +var files = require('../fs/files'); var fiberHelpers = require("../utils/fiber-helpers.js"); // Wrapper to manage a connection to a DDP service. The main difference between diff --git a/tools/meteor-services/stats.js b/tools/meteor-services/stats.js index 4c277e94a8..bf02f116eb 100644 --- a/tools/meteor-services/stats.js +++ b/tools/meteor-services/stats.js @@ -2,7 +2,7 @@ var Fiber = require("fibers"); var _ = require("underscore"); var config = require('./config.js'); -var files = require('../fs/files.js'); +var files = require('../fs/files'); var auth = require('./auth.js'); var ServiceConnection = require('./service-connection.js'); var httpHelpers = require('../utils/http-helpers.js'); diff --git a/tools/packaging/catalog/catalog-local.js b/tools/packaging/catalog/catalog-local.js index 3a1ba50150..8b5e612ff7 100644 --- a/tools/packaging/catalog/catalog-local.js +++ b/tools/packaging/catalog/catalog-local.js @@ -1,6 +1,6 @@ var _ = require('underscore'); var buildmessage = require('../../utils/buildmessage.js'); -var files = require('../../fs/files.js'); +var files = require('../../fs/files'); var watch = require('../../fs/watch.js'); var PackageSource = require('../../isobuild/package-source.js'); import { KNOWN_ISOBUILD_FEATURE_PACKAGES } from '../../isobuild/compiler.js'; diff --git a/tools/packaging/catalog/catalog-remote.js b/tools/packaging/catalog/catalog-remote.js index 7ed5aa10c1..f7e3395a42 100644 --- a/tools/packaging/catalog/catalog-remote.js +++ b/tools/packaging/catalog/catalog-remote.js @@ -1,7 +1,7 @@ var _ = require('underscore'); var sqlite3 = require('sqlite3'); -var files = require('../../fs/files.js'); +var files = require('../../fs/files'); var utils = require('../../utils/utils.js'); var buildmessage = require('../../utils/buildmessage.js'); var config = require('../../meteor-services/config.js'); diff --git a/tools/packaging/package-client.js b/tools/packaging/package-client.js index 592b7b17b7..0bf35fb33c 100644 --- a/tools/packaging/package-client.js +++ b/tools/packaging/package-client.js @@ -3,7 +3,7 @@ var _ = require('underscore'); var config = require('../meteor-services/config.js'); var httpHelpers = require('../utils/http-helpers.js'); var release = require('./release.js'); -var files = require('../fs/files.js'); +var files = require('../fs/files'); var utils = require('../utils/utils.js'); var buildmessage = require('../utils/buildmessage.js'); var compiler = require('../isobuild/compiler.js'); diff --git a/tools/packaging/release.js b/tools/packaging/release.js index c951100393..794ac644ef 100644 --- a/tools/packaging/release.js +++ b/tools/packaging/release.js @@ -1,6 +1,6 @@ var _ = require('underscore'); -var files = require('../fs/files.js'); +var files = require('../fs/files'); var catalog = require('./catalog/catalog.js'); var release = exports; diff --git a/tools/packaging/tropohouse.js b/tools/packaging/tropohouse.js index 97cde9670f..a832d6d771 100644 --- a/tools/packaging/tropohouse.js +++ b/tools/packaging/tropohouse.js @@ -1,5 +1,5 @@ var _ = require("underscore"); -var files = require('../fs/files.js'); +var files = require('../fs/files'); var utils = require('../utils/utils.js'); var httpHelpers = require('../utils/http-helpers.js'); var archinfo = require('../utils/archinfo.js'); diff --git a/tools/packaging/updater.js b/tools/packaging/updater.js index 77de994e6a..2786671640 100644 --- a/tools/packaging/updater.js +++ b/tools/packaging/updater.js @@ -7,7 +7,7 @@ var isopack = require('../isobuild/isopack.js'); var buildmessage = require('../utils/buildmessage.js'); var Console = require('../console/console.js').Console; var auth = require('../meteor-services/auth.js'); -var files = require('../fs/files.js'); +var files = require('../fs/files'); var tropohouse = require('./tropohouse.js'); var release = require('./release.js'); diff --git a/tools/packaging/warehouse.js b/tools/packaging/warehouse.js index 5f46ae0278..fcccd45111 100644 --- a/tools/packaging/warehouse.js +++ b/tools/packaging/warehouse.js @@ -39,7 +39,7 @@ var os = require("os"); var _ = require("underscore"); -var files = require('../fs/files.js'); +var files = require('../fs/files'); var httpHelpers = require('../utils/http-helpers.js'); var fiberHelpers = require('../utils/fiber-helpers.js'); var utils = require('../utils/utils.js'); diff --git a/tools/project-context.js b/tools/project-context.js index fdc136b9f2..f7cf432d9c 100644 --- a/tools/project-context.js +++ b/tools/project-context.js @@ -6,7 +6,7 @@ var buildmessage = require('./utils/buildmessage.js'); var catalog = require('./packaging/catalog/catalog.js'); var catalogLocal = require('./packaging/catalog/catalog-local.js'); var Console = require('./console/console.js').Console; -var files = require('./fs/files.js'); +var files = require('./fs/files'); var isopackCacheModule = require('./isobuild/isopack-cache.js'); import { loadIsopackage } from './tool-env/isopackets.js'; var packageMapModule = require('./packaging/package-map.js'); diff --git a/tools/runners/run-all.js b/tools/runners/run-all.js index 5e4370a054..1c46b8ef57 100644 --- a/tools/runners/run-all.js +++ b/tools/runners/run-all.js @@ -1,6 +1,6 @@ const _ = require('underscore'); -const files = require('../fs/files.js'); +const files = require('../fs/files'); const buildmessage = require('../utils/buildmessage.js'); const utils = require('../utils/utils.js'); const runLog = require('./run-log.js'); diff --git a/tools/runners/run-app.js b/tools/runners/run-app.js index f72f6f1163..d79e3a9d31 100644 --- a/tools/runners/run-app.js +++ b/tools/runners/run-app.js @@ -2,7 +2,7 @@ var _ = require('underscore'); var Fiber = require('fibers'); const uuid = require("uuid"); var fiberHelpers = require('../utils/fiber-helpers.js'); -var files = require('../fs/files.js'); +var files = require('../fs/files'); var watch = require('../fs/watch.js'); var bundler = require('../isobuild/bundler.js'); var buildmessage = require('../utils/buildmessage.js'); diff --git a/tools/runners/run-mongo.js b/tools/runners/run-mongo.js index f636d22ca5..18fad130e0 100644 --- a/tools/runners/run-mongo.js +++ b/tools/runners/run-mongo.js @@ -1,4 +1,4 @@ -var files = require('../fs/files.js'); +var files = require('../fs/files'); var utils = require('../utils/utils.js'); var mongoExitCodes = require('../utils/mongo-exit-codes.js'); var fiberHelpers = require('../utils/fiber-helpers.js'); diff --git a/tools/runners/run-selenium.js b/tools/runners/run-selenium.js index 34d1f7fd43..55a2fd4ffe 100644 --- a/tools/runners/run-selenium.js +++ b/tools/runners/run-selenium.js @@ -1,6 +1,6 @@ var _ = require('underscore'); var Fiber = require('fibers'); -var files = require('../fs/files.js'); +var files = require('../fs/files'); var runLog = require('./run-log.js'); var utils = require('../utils/utils.js'); diff --git a/tools/tests/bundle.js b/tools/tests/bundle.js index c7aad89dcb..1bde73ce8c 100644 --- a/tools/tests/bundle.js +++ b/tools/tests/bundle.js @@ -1,6 +1,6 @@ var selftest = require('../tool-testing/selftest.js'); var Sandbox = selftest.Sandbox; -var files = require('../fs/files.js'); +import * as files from "../fs/files"; import { execSync } from 'child_process'; selftest.define("bundle", function () { diff --git a/tools/tests/colon-converter-tests.js b/tools/tests/colon-converter-tests.js index ab1172f446..fea0431d77 100644 --- a/tools/tests/colon-converter-tests.js +++ b/tools/tests/colon-converter-tests.js @@ -1,6 +1,6 @@ var selftest = require('../tool-testing/selftest.js'); var Sandbox = selftest.Sandbox; -var files = require('../fs/files.js'); +var files = require('../fs/files'); var testUtils = require('../tool-testing/test-utils.js'); var utils = require('../utils/utils.js'); var _ = require('underscore'); diff --git a/tools/tests/command-line.js b/tools/tests/command-line.js index 8c590ace51..90d0a350dc 100644 --- a/tools/tests/command-line.js +++ b/tools/tests/command-line.js @@ -3,7 +3,7 @@ var Sandbox = selftest.Sandbox; var archinfo = require('../utils/archinfo.js'); var release = require('../packaging/release.js'); var _ = require('underscore'); -var files = require('../fs/files.js'); +var files = require('../fs/files'); var utils = require('../utils/utils.js'); var runMongo = require('../runners/run-mongo.js'); diff --git a/tools/tests/compiler-plugins.js b/tools/tests/compiler-plugins.js index 8e8abb8381..417eb141c7 100644 --- a/tools/tests/compiler-plugins.js +++ b/tools/tests/compiler-plugins.js @@ -1,6 +1,6 @@ var _ = require('underscore'); var selftest = require('../tool-testing/selftest.js'); -var files = require('../fs/files.js'); +var files = require('../fs/files'); import { getUrl } from '../utils/http-helpers.js'; import { sleepMs } from '../utils/utils.js'; import { host } from '../utils/archinfo.js'; diff --git a/tools/tests/constraint-solver.js b/tools/tests/constraint-solver.js index fdb26f3506..798271a2ed 100644 --- a/tools/tests/constraint-solver.js +++ b/tools/tests/constraint-solver.js @@ -1,6 +1,6 @@ var selftest = require('../tool-testing/selftest.js'); var Sandbox = selftest.Sandbox; -var files = require('../fs/files.js'); +var files = require('../fs/files'); var _= require('underscore'); // Runs all of the constraint-solver tests, including ones that tie up the CPU diff --git a/tools/tests/cordova-append-config.js b/tools/tests/cordova-append-config.js index 62ae25cbf8..0e38bed8a0 100644 --- a/tools/tests/cordova-append-config.js +++ b/tools/tests/cordova-append-config.js @@ -1,4 +1,4 @@ -var files = require('../fs/files.js'); +var files = require('../fs/files'); var selftest = require('../tool-testing/selftest.js'); var testUtils = require('../tool-testing/test-utils.js'); var Sandbox = selftest.Sandbox; diff --git a/tools/tests/cordova-builds.js b/tools/tests/cordova-builds.js index 3e721a5df8..17a4f38740 100644 --- a/tools/tests/cordova-builds.js +++ b/tools/tests/cordova-builds.js @@ -1,4 +1,4 @@ -var files = require('../fs/files.js'); +var files = require('../fs/files'); var selftest = require('../tool-testing/selftest.js'); var testUtils = require('../tool-testing/test-utils.js'); var Sandbox = selftest.Sandbox; diff --git a/tools/tests/cordova-platforms.js b/tools/tests/cordova-platforms.js index cc29ab2480..1888801a29 100644 --- a/tools/tests/cordova-platforms.js +++ b/tools/tests/cordova-platforms.js @@ -1,6 +1,6 @@ var selftest = require('../tool-testing/selftest.js'); var Sandbox = selftest.Sandbox; -var files = require('../fs/files.js'); +var files = require('../fs/files'); selftest.define("add cordova platforms", ["cordova"], function () { var s = new Sandbox(); diff --git a/tools/tests/cordova-plugins.js b/tools/tests/cordova-plugins.js index 7cb089fd30..c78982cc38 100644 --- a/tools/tests/cordova-plugins.js +++ b/tools/tests/cordova-plugins.js @@ -1,6 +1,6 @@ var selftest = require('../tool-testing/selftest.js'); var Sandbox = selftest.Sandbox; -var files = require('../fs/files.js'); +var files = require('../fs/files'); import { execFileSync } from '../utils/processes.js'; var _ = require('underscore'); diff --git a/tools/tests/dynamic-import.js b/tools/tests/dynamic-import.js index 56f2962328..e5ce26ee03 100644 --- a/tools/tests/dynamic-import.js +++ b/tools/tests/dynamic-import.js @@ -1,6 +1,6 @@ var selftest = require('../tool-testing/selftest.js'); var Sandbox = selftest.Sandbox; -const { mkdtemp } = require("../fs/files.js"); +const { mkdtemp } = require("../fs/files"); const offlineStorageQuotaKB = 10000; diff --git a/tools/tests/linter-plugins.js b/tools/tests/linter-plugins.js index ecf9bdd6e1..c28277bc82 100644 --- a/tools/tests/linter-plugins.js +++ b/tools/tests/linter-plugins.js @@ -1,5 +1,5 @@ var selftest = require('../tool-testing/selftest.js'); -var files = require('../fs/files.js'); +var files = require('../fs/files'); var Sandbox = selftest.Sandbox; diff --git a/tools/tests/meteor-script-link-tests.js b/tools/tests/meteor-script-link-tests.js index fd89ed443b..04e8630b79 100644 --- a/tools/tests/meteor-script-link-tests.js +++ b/tools/tests/meteor-script-link-tests.js @@ -1,5 +1,5 @@ var selftest = require('../tool-testing/selftest.js'); -var files = require('../fs/files.js'); +var files = require('../fs/files'); selftest.define("linking to meteor script works correctly on Windows", function () { var location = diff --git a/tools/tests/mongo.js b/tools/tests/mongo.js index 82bff2003e..14bd25eee9 100644 --- a/tools/tests/mongo.js +++ b/tools/tests/mongo.js @@ -4,7 +4,7 @@ var utils = require('../utils/utils.js'); var net = require('net'); var Future = require('fibers/future'); var _ = require('underscore'); -var files = require('../fs/files.js'); +var files = require('../fs/files'); // Tests that observeChanges continues to work even over a mongo failover. selftest.define("mongo failover", ["slow"], function () { diff --git a/tools/tests/npm.js b/tools/tests/npm.js index d6198e784d..049c372aa8 100644 --- a/tools/tests/npm.js +++ b/tools/tests/npm.js @@ -1,5 +1,5 @@ import selftest from '../tool-testing/selftest.js'; -import files from '../fs/files.js'; +import files from '../fs/files'; import { installNpmModule } from '../isobuild/meteor-npm.js'; const Sandbox = selftest.Sandbox; diff --git a/tools/tests/old.js b/tools/tests/old.js index cf0c2cbcff..3168a605e8 100644 --- a/tools/tests/old.js +++ b/tools/tests/old.js @@ -3,7 +3,7 @@ var Future = require('fibers/future'); var selftest = require('../tool-testing/selftest.js'); var Sandbox = selftest.Sandbox; var Run = selftest.Run; -var files = require('../fs/files.js'); +var files = require('../fs/files'); var release = require('../packaging/release.js'); // old tests don't get to test --release, and always run this release diff --git a/tools/tests/old/test-bundler-assets.js b/tools/tests/old/test-bundler-assets.js index 1b815e9c9f..c4eabd3b92 100644 --- a/tools/tests/old/test-bundler-assets.js +++ b/tools/tests/old/test-bundler-assets.js @@ -3,7 +3,7 @@ require('../../tool-env/install-babel.js'); var _ = require('underscore'); var assert = require('assert'); var Future = require('fibers/future'); -var files = require('../../fs/files.js'); +var files = require('../../fs/files'); var bundler = require('../../isobuild/bundler.js'); var isopackets = require('../../tool-env/isopackets.js'); var release = require('../../packaging/release.js'); diff --git a/tools/tests/old/test-bundler-npm.js b/tools/tests/old/test-bundler-npm.js index a14de5168d..d14b295d95 100644 --- a/tools/tests/old/test-bundler-npm.js +++ b/tools/tests/old/test-bundler-npm.js @@ -3,7 +3,7 @@ require('../../tool-env/install-babel.js'); var _ = require('underscore'); var assert = require('assert'); var Fiber = require('fibers'); -var files = require('../../fs/files.js'); +var files = require('../../fs/files'); var bundler = require('../../isobuild/bundler.js'); var release = require('../../packaging/release.js'); var catalog = require('../../packaging/catalog/catalog.js'); diff --git a/tools/tests/old/test-bundler-options.js b/tools/tests/old/test-bundler-options.js index c2df92a0cd..267dbde6ec 100644 --- a/tools/tests/old/test-bundler-options.js +++ b/tools/tests/old/test-bundler-options.js @@ -4,7 +4,7 @@ var _ = require('underscore'); var assert = require('assert'); var bundler = require('../../isobuild/bundler.js'); var release = require('../../packaging/release.js'); -var files = require('../../fs/files.js'); +var files = require('../../fs/files'); var catalog = require('../../packaging/catalog/catalog.js'); var buildmessage = require('../../utils/buildmessage.js'); var isopackets = require('../../tool-env/isopackets.js'); diff --git a/tools/tests/old/test-watch.js b/tools/tests/old/test-watch.js index 30ed478c83..a2550b259b 100644 --- a/tools/tests/old/test-watch.js +++ b/tools/tests/old/test-watch.js @@ -6,7 +6,7 @@ var crypto = require('crypto'); var Fiber = require('fibers'); var Future = require('fibers/future'); var watch = require('../../fs/watch.js'); -var files = require('../../fs/files.js'); +var files = require('../../fs/files'); var tmp = files.mkdtemp('test_watch'); var serial = 0; diff --git a/tools/tests/package-tests.js b/tools/tests/package-tests.js index 3ead9461c8..b362113d65 100644 --- a/tools/tests/package-tests.js +++ b/tools/tests/package-tests.js @@ -2,7 +2,7 @@ var _= require('underscore'); var selftest = require('../tool-testing/selftest.js'); var Sandbox = selftest.Sandbox; -var files = require('../fs/files.js'); +var files = require('../fs/files'); var testUtils = require('../tool-testing/test-utils.js'); var utils = require('../utils/utils.js'); var packageClient = require('../packaging/package-client.js'); diff --git a/tools/tests/parse-stack-test.js b/tools/tests/parse-stack-test.js index f778edfd85..4b63bf930c 100644 --- a/tools/tests/parse-stack-test.js +++ b/tools/tests/parse-stack-test.js @@ -3,7 +3,7 @@ import { parse, markBottom } from '../utils/parse-stack.js'; import _ from 'underscore'; import Fiber from 'fibers'; import Future from 'fibers/future'; -import files from '../fs/files.js'; +import files from '../fs/files'; selftest.define("parse-stack - parse stack traces without fibers", () => { const err = new Error(); diff --git a/tools/tests/releases.js b/tools/tests/releases.js index ace95cf766..9403afd481 100644 --- a/tools/tests/releases.js +++ b/tools/tests/releases.js @@ -1,6 +1,6 @@ var selftest = require('../tool-testing/selftest.js'); var Sandbox = selftest.Sandbox; -var files = require('../fs/files.js'); +var files = require('../fs/files'); var catalog = require('../packaging/catalog/catalog.js'); var DEFAULT_RELEASE_TRACK = catalog.DEFAULT_TRACK; diff --git a/tools/tests/run.js b/tools/tests/run.js index f5a1288738..f6e7537eb2 100644 --- a/tools/tests/run.js +++ b/tools/tests/run.js @@ -4,7 +4,7 @@ var utils = require('../utils/utils.js'); var net = require('net'); var Future = require('fibers/future'); var _ = require('underscore'); -var files = require('../fs/files.js'); +var files = require('../fs/files'); var catalog = require('../packaging/catalog/catalog.js'); var os = require('os'); var isReachable = require("is-reachable"); diff --git a/tools/tests/source-maps.js b/tools/tests/source-maps.js index dcc52a0320..ce0be16a38 100644 --- a/tools/tests/source-maps.js +++ b/tools/tests/source-maps.js @@ -1,6 +1,6 @@ var selftest = require('../tool-testing/selftest.js'); var Sandbox = selftest.Sandbox; -var files = require('../fs/files.js'); +var files = require('../fs/files'); var catalog = require('../packaging/catalog/catalog.js'); function matchPath (text, doubleBS) { diff --git a/tools/tests/static-html.js b/tools/tests/static-html.js index fc17f67373..870f9b67e3 100644 --- a/tools/tests/static-html.js +++ b/tools/tests/static-html.js @@ -1,6 +1,6 @@ var _ = require('underscore'); var selftest = require('../tool-testing/selftest.js'); -var files = require('../fs/files.js'); +var files = require('../fs/files'); import { getUrl } from '../utils/http-helpers.js'; import { sleepMs } from '../utils/utils.js'; diff --git a/tools/tests/tarball.js b/tools/tests/tarball.js index 26e0ed4b74..7e2141f6c2 100644 --- a/tools/tests/tarball.js +++ b/tools/tests/tarball.js @@ -1,5 +1,5 @@ var selftest = require('../tool-testing/selftest.js'); -var files = require('../fs/files.js'); +var files = require('../fs/files'); var expectEqual = selftest.expectEqual; selftest.define("create and extract tarball with long paths", function () { diff --git a/tools/tests/wipe-all-packages.js b/tools/tests/wipe-all-packages.js index 36d717cfa0..14dc8659ae 100644 --- a/tools/tests/wipe-all-packages.js +++ b/tools/tests/wipe-all-packages.js @@ -1,6 +1,6 @@ var selftest = require('../tool-testing/selftest.js'); var Sandbox = selftest.Sandbox; -var files = require('../fs/files.js'); +var files = require('../fs/files'); var utils = require('../utils/utils.js'); var archinfo = require('../utils/archinfo.js'); var _ = require('underscore'); diff --git a/tools/tool-env/install-git-hooks.js b/tools/tool-env/install-git-hooks.js index 1fb75573c2..91926ffccf 100644 --- a/tools/tool-env/install-git-hooks.js +++ b/tools/tool-env/install-git-hooks.js @@ -1,4 +1,4 @@ -import files from '../fs/files.js'; +import files from '../fs/files'; const hookDestination = files.pathJoin(files.getCurrentToolsDir(), '.git', 'hooks'); diff --git a/tools/tool-env/isopackets.js b/tools/tool-env/isopackets.js index 81c945e039..fc3e37699b 100644 --- a/tools/tool-env/isopackets.js +++ b/tools/tool-env/isopackets.js @@ -7,7 +7,7 @@ var compiler = require('../isobuild/compiler.js'); var isopackCacheModule = require('../isobuild/isopack-cache.js'); var buildmessage = require('../utils/buildmessage.js'); -var files = require('../fs/files.js'); +var files = require('../fs/files'); var config = require('../meteor-services/config.js'); var watch = require('../fs/watch.js'); var Console = require('../console/console.js').Console; diff --git a/tools/tool-testing/clients/browserstack/index.js b/tools/tool-testing/clients/browserstack/index.js index c7266de26c..a63e16cb6e 100644 --- a/tools/tool-testing/clients/browserstack/index.js +++ b/tools/tool-testing/clients/browserstack/index.js @@ -13,7 +13,7 @@ import { readFile, createWriteStream, getDevBundle, -} from '../../../fs/files.js'; +} from '../../../fs/files'; const NPM_DEPENDENCIES = { 'browserstack-webdriver': '2.41.1', diff --git a/tools/tool-testing/clients/phantom/index.js b/tools/tool-testing/clients/phantom/index.js index da2e47ba6b..bda8071d31 100644 --- a/tools/tool-testing/clients/phantom/index.js +++ b/tools/tool-testing/clients/phantom/index.js @@ -6,7 +6,7 @@ import { convertToOSPath, pathJoin, getCurrentToolsDir, -} from '../../../fs/files.js'; +} from '../../../fs/files'; const NPM_DEPENDENCIES = { 'phantomjs-prebuilt': '2.1.14', diff --git a/tools/tool-testing/galaxy-utils.js b/tools/tool-testing/galaxy-utils.js index 2d3fa8a58f..5644fe057b 100644 --- a/tools/tool-testing/galaxy-utils.js +++ b/tools/tool-testing/galaxy-utils.js @@ -2,7 +2,7 @@ var _ = require('underscore'); var selftest = require('../tool-testing/selftest.js'); var Run = selftest.Run; var testUtils = require('../tool-testing/test-utils.js'); -var files = require('../fs/files.js'); +var files = require('../fs/files'); var utils = require('../utils/utils.js'); var authClient = require('../meteor-services/auth-client.js'); var auth = require('../meteor-services/auth.js'); diff --git a/tools/tool-testing/run.js b/tools/tool-testing/run.js index 7d64766897..9554ee0a2f 100644 --- a/tools/tool-testing/run.js +++ b/tools/tool-testing/run.js @@ -12,7 +12,7 @@ // Arguments in the 'args' option are not assumed to be standard paths, so // calling any of the 'files.*' methods on them is not safe. import { spawn } from 'child_process'; -import * as files from '../fs/files.js'; +import * as files from '../fs/files'; import { markTop as parseStackMarkTop, parse as parseStackParse, diff --git a/tools/tool-testing/sandbox.js b/tools/tool-testing/sandbox.js index 4eedcec06d..a024977037 100644 --- a/tools/tool-testing/sandbox.js +++ b/tools/tool-testing/sandbox.js @@ -37,7 +37,7 @@ // - clients // - browserstack: true if browserstack clients should be used // - port: the port that the clients should run on -import * as files from '../fs/files.js'; +import * as files from '../fs/files'; import PhantomClient from './clients/phantom/index.js'; import PuppeteerClient from './clients/puppeteer/index.js'; import BrowserStackClient from './clients/browserstack/index.js'; diff --git a/tools/tool-testing/selftest.js b/tools/tool-testing/selftest.js index 4b4d813242..850b1c8a31 100644 --- a/tools/tool-testing/selftest.js +++ b/tools/tool-testing/selftest.js @@ -1,5 +1,5 @@ import { inspect } from 'util'; -import * as files from '../fs/files.js'; +import * as files from '../fs/files'; import { createHash } from 'crypto'; import { markBottom as parseStackMarkBottom, diff --git a/tools/upgraders.js b/tools/upgraders.js index a581c50dfe..efab8af063 100644 --- a/tools/upgraders.js +++ b/tools/upgraders.js @@ -1,7 +1,7 @@ /* eslint no-console: 0 */ var _ = require('underscore'); -var files = require('./fs/files.js'); +var files = require('./fs/files'); var Console = require('./console/console.js').Console; import main from './cli/main.js'; import buildmessage from './utils/buildmessage.js'; diff --git a/tools/utils/buildmessage.js b/tools/utils/buildmessage.js index 4e20200704..86cd6ca355 100644 --- a/tools/utils/buildmessage.js +++ b/tools/utils/buildmessage.js @@ -1,5 +1,5 @@ var _ = require('underscore'); -var files = require('../fs/files.js'); +var files = require('../fs/files'); var parseStack = require('./parse-stack.js'); var fiberHelpers = require('./fiber-helpers.js'); var Progress = require('../console/progress.js').Progress; diff --git a/tools/utils/http-helpers.js b/tools/utils/http-helpers.js index 1f608dd042..71e34303b0 100644 --- a/tools/utils/http-helpers.js +++ b/tools/utils/http-helpers.js @@ -7,7 +7,7 @@ var util = require('util'); var _ = require('underscore'); -var files = require('../fs/files.js'); +var files = require('../fs/files'); var auth = require('../meteor-services/auth.js'); var config = require('../meteor-services/config.js'); var release = require('../packaging/release.js'); diff --git a/tools/utils/utils.js b/tools/utils/utils.js index 9e35b5d262..c5c936421f 100644 --- a/tools/utils/utils.js +++ b/tools/utils/utils.js @@ -6,7 +6,7 @@ var url = require('url'); var fiberHelpers = require('./fiber-helpers.js'); var archinfo = require('./archinfo.js'); var buildmessage = require('./buildmessage.js'); -var files = require('../fs/files.js'); +var files = require('../fs/files'); var packageVersionParser = require('../packaging/package-version-parser.js'); var utils = exports; @@ -747,4 +747,4 @@ export function isEmacs() { // Prior to v22, Emacs only set EMACS. After v27, it only sets INSIDE_EMACS. emacsDetected = !! (process.env.EMACS === "t" || process.env.INSIDE_EMACS); return emacsDetected; -} \ No newline at end of file +} From 62a78c586016464af0c80b012a8fcee32bcfaaf4 Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Sun, 14 Apr 2019 14:54:50 -0400 Subject: [PATCH 134/327] Finish converting tools/fs/files.ts to TypeScript. --- tools/fs/files.ts | 1332 +++++++++++++----------------- tools/fs/fsFixPath.ts | 27 + tools/fs/mini-files.js | 3 +- tools/isobuild/bundler.js | 4 +- tools/isobuild/compiler.js | 18 +- tools/isobuild/isopack.js | 5 +- tools/isobuild/package-source.js | 2 +- 7 files changed, 628 insertions(+), 763 deletions(-) create mode 100644 tools/fs/fsFixPath.ts diff --git a/tools/fs/files.ts b/tools/fs/files.ts index 3f57c4acb8..60854df902 100644 --- a/tools/fs/files.ts +++ b/tools/fs/files.ts @@ -4,14 +4,13 @@ /// (such as testing whether an directory is a meteor app) /// -var assert = require("assert"); -var fs = require("fs"); +import assert from "assert"; +import fs from "fs"; + +// var fs = require("fs"); var path = require('path'); var os = require('os'); -var util = require('util'); var _ = require('underscore'); -var Fiber = require('fibers'); -var crypto = require('crypto'); const { spawn, execFile } = require("child_process"); var rimraf = require('rimraf'); @@ -24,122 +23,119 @@ var buildmessage = require('../utils/buildmessage.js'); var fiberHelpers = require('../utils/fiber-helpers.js'); var colonConverter = require('../utils/colon-converter.js'); -var miniFiles = require('./mini-files.js'); - var Profile = require('../tool-env/profile.js').Profile; -// Attach all exports of miniFiles here to avoid code duplication -var files = exports; -_.extend(files, miniFiles); +export * from './mini-files'; +import { + convertToOSPath, + convertToPosixPath, + convertToStandardLineEndings, + convertToStandardPath, + convertToWindowsPath, + isWindowsLikeFilesystem, + pathBasename, + pathDirname, + pathJoin, + pathNormalize, + pathOsDelimiter, + pathRelative, + pathResolve, + pathSep, +} from "./mini-files"; -var parsedSourceMaps = {}; +var parsedSourceMaps: Record = {}; var nextStackFilenameCounter = 1; // Use the source maps specified to runJavaScript -var useParsedSourceMap = function (pathForSourceMap) { +function useParsedSourceMap(pathForSourceMap: string) { // Check our fancy source map data structure, used for isopacks if (_.has(parsedSourceMaps, pathForSourceMap)) { return {map: parsedSourceMaps[pathForSourceMap]}; } return null; -}; +} // Try this source map first sourceMapRetrieverStack.push(useParsedSourceMap); -// Fibers are disabled by default for files.* operations unless -// process.env.METEOR_DISABLE_FS_FIBERS parses to a falsy value. -const YIELD_ALLOWED = !! ( - _.has(process.env, "METEOR_DISABLE_FS_FIBERS") && - ! JSON.parse(process.env.METEOR_DISABLE_FS_FIBERS)); - function canYield() { return Fiber.current && Fiber.yield && ! Fiber.yield.disallowed; } -function mayYield() { - return YIELD_ALLOWED && canYield(); -} - // given a predicate function and a starting path, traverse upwards // from the path until we find a path that satisfies the predicate. // // returns either the path to the lowest level directory that passed // the test or null for none found. if starting path isn't given, use // cwd. -var findUpwards = function (predicate, startPath) { - var testDir = startPath || files.cwd(); +function findUpwards( + predicate: (path: string) => boolean, + startPath: string = cwd(), +): string | null { + let testDir: string | null = startPath; while (testDir) { if (predicate(testDir)) { break; } - var newDir = files.pathDirname(testDir); + var newDir: string = pathDirname(testDir); if (newDir === testDir) { testDir = null; } else { testDir = newDir; } } - if (!testDir) { - return null; - } + return testDir || null; +} - return testDir; -}; - -files.cwd = function () { - return files.convertToStandardPath(process.cwd()); -}; +export function cwd() { + return convertToStandardPath(process.cwd()); +} // Determine if 'filepath' (a path, or omit for cwd) is within an app // directory. If so, return the top-level app directory. -files.findAppDir = function (filepath) { - var isAppDir = function (filepath) { +export function findAppDir(filepath: string) { + return findUpwards(function isAppDir(filepath) { // XXX once we are done with the transition to engine, this should - // change to: `return files.exists(path.join(filepath, '.meteor', + // change to: `return exists(path.join(filepath, '.meteor', // 'release'))` // .meteor/packages can be a directory, if .meteor is a warehouse // directory. since installing meteor initializes a warehouse at // $HOME/.meteor, we want to make sure your home directory (and all // subdirectories therein) don't count as being within a meteor app. - try { // use try/catch to avoid the additional syscall to files.exists - return files.stat( - files.pathJoin(filepath, '.meteor', 'packages')).isFile(); + try { // use try/catch to avoid the additional syscall to exists + return stat( + pathJoin(filepath, '.meteor', 'packages')).isFile(); } catch (e) { return false; } - }; + }, filepath); +} - return findUpwards(isAppDir, filepath); -}; - -files.findPackageDir = function (filepath) { - var isPackageDir = function (filepath) { +export function findPackageDir(filepath: string) { + return findUpwards(function isPackageDir(filepath) { try { - return files.stat(files.pathJoin(filepath, 'package.js')).isFile(); + return stat(pathJoin(filepath, 'package.js')).isFile(); } catch (e) { return false; } - }; - - return findUpwards(isPackageDir, filepath); -}; + }, filepath); +} // Returns the hash of the current Git HEAD revision of the application, // if possible. Always resolves rather than rejecting (unless something // truly unexpected happens). The result value is a string when a Git // revision was successfully resolved, or undefined otherwise. -files.findGitCommitHash = function (path) { +export function findGitCommitHash(path: string) { return new Promise(resolve => { - const appDir = files.findAppDir(path); + const appDir = findAppDir(path); if (appDir) { - const proc = execFile("git", ["rev-parse", "HEAD"], { - cwd: files.convertToOSPath(appDir), - }, (error, stdout) => { + execFile("git", ["rev-parse", "HEAD"], { + cwd: convertToOSPath(appDir), + }, (error: any, stdout: string) => { if (! error && typeof stdout === "string") { resolve(stdout.trim()); } else { @@ -150,17 +146,17 @@ files.findGitCommitHash = function (path) { resolve(); } }).await(); -}; +} // create a .gitignore file in dirPath if one doesn't exist. add // 'entry' to the .gitignore on its own line at the bottom of the // file, if the exact line does not already exist in the file. -files.addToGitignore = function (dirPath, entry) { - var filepath = files.pathJoin(dirPath, ".gitignore"); - if (files.exists(filepath)) { - var data = files.readFile(filepath, 'utf8'); +export function addToGitignore(dirPath: string, entry: string) { + var filepath = pathJoin(dirPath, ".gitignore"); + if (exists(filepath)) { + var data = readFile(filepath, 'utf8'); var lines = data.split(/\n/); - if (_.any(lines, function (x) { return x === entry; })) { + if (lines.some(line => line === entry)) { // already there do nothing } else { // rewrite file w/ new entry. @@ -168,18 +164,18 @@ files.addToGitignore = function (dirPath, entry) { data = data + "\n"; } data = data + entry + "\n"; - files.writeFile(filepath, data, 'utf8'); + writeFile(filepath, data, 'utf8'); } } else { // doesn't exist, just write it. - files.writeFile(filepath, entry + "\n", 'utf8'); + writeFile(filepath, entry + "\n", 'utf8'); } -}; +} // Are we running Meteor from a git checkout? -files.inCheckout = _.once(function () { +export const inCheckout = _.once(function () { try { - if (files.exists(files.pathJoin(files.getCurrentToolsDir(), '.git'))) { + if (exists(pathJoin(getCurrentToolsDir(), '.git'))) { return true; } } catch (e) { console.log(e); } @@ -190,27 +186,27 @@ files.inCheckout = _.once(function () { // True if we are using a warehouse: either installed Meteor, or if // $METEOR_WAREHOUSE_DIR is set. Otherwise false (we're in a git checkout and // just using packages from the checkout). -files.usesWarehouse = function () { +export function usesWarehouse() { // Test hook: act like we're "installed" using a non-homedir warehouse // directory. if (process.env.METEOR_WAREHOUSE_DIR) { return true; } else { - return ! files.inCheckout(); + return ! inCheckout(); } -}; +} // Read the '.tools_version.txt' file. If in a checkout, throw an error. -files.getToolsVersion = function () { - if (! files.inCheckout()) { - var isopackJsonPath = files.pathJoin(files.getCurrentToolsDir(), +export function getToolsVersion() { + if (! inCheckout()) { + var isopackJsonPath = pathJoin(getCurrentToolsDir(), '..', // get out of tool, back to package 'isopack.json'); var parsed; - if (files.exists(isopackJsonPath)) { - var isopackJson = files.readFile(isopackJsonPath); + if (exists(isopackJsonPath)) { + var isopackJson = readFile(isopackJsonPath); parsed = JSON.parse(isopackJson); // XXX "isopack-1" is duplicate of isopack.currentFormat @@ -219,41 +215,41 @@ files.getToolsVersion = function () { } // XXX COMPAT WITH 0.9.3 - var unipackageJsonPath = files.pathJoin(files.getCurrentToolsDir(), + var unipackageJsonPath = pathJoin( + getCurrentToolsDir(), '..', // get out of tool, back to package - 'unipackage.json'); - var unipackageJson = files.readFile(unipackageJsonPath); + 'unipackage.json' + ); + var unipackageJson = readFile(unipackageJsonPath); parsed = JSON.parse(unipackageJson); return parsed.name + '@' + parsed.version; } else { throw new Error("Unexpected. Git checkouts don't have tools versions."); } -}; +} // Return the root of dev_bundle (probably /usr/local/meteor in an // install, or (checkout root)/dev_bundle in a checkout.). -files.getDevBundle = function () { - return files.pathJoin(files.getCurrentToolsDir(), 'dev_bundle'); -}; +export function getDevBundle() { + return pathJoin(getCurrentToolsDir(), 'dev_bundle'); +} -files.getCurrentNodeBinDir = function () { - return files.pathJoin(files.getDevBundle(), "bin"); +export function getCurrentNodeBinDir() { + return pathJoin(getDevBundle(), "bin"); } // Return the top-level directory for this meteor install or checkout -files.getCurrentToolsDir = function () { - return files.pathDirname( - files.pathDirname( - files.convertToStandardPath(__dirname))); -}; +export function getCurrentToolsDir() { + return pathDirname(pathDirname(convertToStandardPath(__dirname))); +} // Read a settings file and sanity-check it. Returns a string on // success or null on failure (in which case buildmessages will be // emitted). -files.getSettings = function (filename, watchSet) { +export function getSettings(filename: string, watchSet: any) { buildmessage.assertInCapture(); - var absPath = files.pathResolve(filename); + var absPath = pathResolve(filename); var buffer = require("./watch.js").readAndWatchFile(watchSet, absPath); if (buffer === null) { buildmessage.error("file not found (settings file)", @@ -285,33 +281,33 @@ files.getSettings = function (filename, watchSet) { } return str; -}; +} // Try to find the prettiest way to present a path to the // user. Presently, the main thing it does is replace $HOME with ~. -files.prettyPath = function (p) { - p = files.realpath(p); - var home = files.getHomeDir(); +export function prettyPath(p: string) { + p = realpath(p); + var home = getHomeDir(); if (! home) { return p; } - var relativeToHome = files.pathRelative(home, p); - if (relativeToHome.substr(0, 3) === ('..' + files.pathSep)) { + var relativeToHome = pathRelative(home, p); + if (relativeToHome.substr(0, 3) === ('..' + pathSep)) { return p; } - return files.pathJoin('~', relativeToHome); -}; + return pathJoin('~', relativeToHome); +} // Like statSync, but null if file not found -files.statOrNull = function (path) { - return statOrNull(path); -}; +export function statOrNull(path: string) { + return statOrNullHelper(path, false); +} -function statOrNull(path, preserveSymlinks) { +function statOrNullHelper(path: string, preserveSymlinks = false) { try { return preserveSymlinks - ? files.lstat(path) - : files.stat(path); + ? lstat(path) + : stat(path); } catch (e) { if (e.code === "ENOENT") { return null; @@ -320,32 +316,32 @@ function statOrNull(path, preserveSymlinks) { } } -export function realpathOrNull(path) { +export function realpathOrNull(path: string) { try { - return files.realpath(path); + return realpath(path); } catch (e) { if (e.code !== "ENOENT") throw e; return null; } } -files.rm_recursive_async = (path) => { +export function rm_recursive_async(path: string) { return new Promise((resolve, reject) => { - rimraf(files.convertToOSPath(path), err => err + rimraf(convertToOSPath(path), (err: Error) => err ? reject(err) : resolve()); }); -}; +} // Like rm -r. -files.rm_recursive = Profile("files.rm_recursive", (path) => { +export const rm_recursive = Profile("files.rm_recursive", (path: string) => { try { - rimraf.sync(files.convertToOSPath(path)); + rimraf.sync(convertToOSPath(path)); } catch (e) { if ((e.code === "ENOTEMPTY" || e.code === "EPERM") && canYield()) { - files.rm_recursive_async(path).await(); + rm_recursive_async(path).await(); return; } throw e; @@ -353,11 +349,11 @@ files.rm_recursive = Profile("files.rm_recursive", (path) => { }); // Returns the base64 SHA256 of the given file. -files.fileHash = function (filename) { +export function fileHash(filename: string) { var crypto = require('crypto'); var hash = crypto.createHash('sha256'); hash.setEncoding('base64'); - var rs = files.createReadStream(filename); + var rs = createReadStream(filename); return new Promise(function (resolve) { rs.on('end', function () { rs.close(); @@ -365,99 +361,85 @@ files.fileHash = function (filename) { }); rs.pipe(hash, { end: false }); }).await(); -}; +} // This is the result of running fileHash on a blank file. -files.blankHash = "47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU="; +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. -files.treeHash = function (root, options) { - options = _.extend({ - ignore: function (relativePath) { - return false; - } - }, options); - - var crypto = require('crypto'); - var hash = crypto.createHash('sha256'); - - var hashLog = process.env.TREE_HASH_DEBUG ? - ['\n\nTREE HASH for ' + root + '\n'] : null; - - var updateHash = function (text) { - hashLog && hashLog.push(text); - hash.update(text); +export function treeHash(root: string, options: { + ignore: (path: string) => boolean; +}) { + options = { + ignore() { return false; }, + ...options, }; - var traverse = function (relativePath) { + const hash = require('crypto').createHash('sha256'); + + function traverse(relativePath: string) { if (options.ignore(relativePath)) { - hashLog && hashLog.push('SKIP ' + JSON.stringify(relativePath) + '\n'); return; } - var absPath = files.pathJoin(root, relativePath); - var stat = files.lstat(absPath); + var absPath = pathJoin(root, relativePath); + var stat = lstat(absPath); if (stat.isDirectory()) { if (relativePath) { - updateHash('dir ' + JSON.stringify(relativePath) + '\n'); + hash.update('dir ' + JSON.stringify(relativePath) + '\n'); } - _.each(files.readdir(absPath), function (entry) { - traverse(files.pathJoin(relativePath, entry)); + readdir(absPath).forEach(entry => { + traverse(pathJoin(relativePath, entry)); }); } else if (stat.isFile()) { if (!relativePath) { throw Error("must call files.treeHash on a directory"); } - updateHash('file ' + JSON.stringify(relativePath) + ' ' + - stat.size + ' ' + files.fileHash(absPath) + '\n'); + hash.update('file ' + JSON.stringify(relativePath) + ' ' + + stat.size + ' ' + fileHash(absPath) + '\n'); if (stat.mode & 0o100) { - updateHash('exec\n'); + hash.update('exec\n'); } } else if (stat.isSymbolicLink()) { if (!relativePath) { throw Error("must call files.treeHash on a directory"); } - updateHash('symlink ' + JSON.stringify(relativePath) + ' ' + - JSON.stringify(files.readlink(absPath)) + '\n'); + hash.update('symlink ' + JSON.stringify(relativePath) + ' ' + + JSON.stringify(readlink(absPath)) + '\n'); } // ignore anything weirder }; traverse(''); - hashLog && files.appendFile(process.env.TREE_HASH_DEBUG, hashLog.join('')); + return hash.digest('base64'); -}; +} // like mkdir -p. if it returns true, the item is a directory (even if // it was already created). if it returns false, the item is not a // directory and we couldn't make it one. -files.mkdir_p = function (dir, mode) { - var p = files.pathResolve(dir); - var ps = files.pathNormalize(p).split(files.pathSep); +export function mkdir_p(dir: string, mode: number | null = null) { + var p = pathResolve(dir); + var ps = pathNormalize(p).split(pathSep); - var stat = files.statOrNull(p); + var stat = statOrNull(p); if (stat) { return stat.isDirectory(); } // doesn't exist. recurse to build parent. - // Don't use files.pathJoin here because it can strip off the leading slash + // Don't use pathJoin here because it can strip off the leading slash // accidentally. - var parentPath = ps.slice(0, -1).join(files.pathSep); - var success = files.mkdir_p(parentPath, mode); + var parentPath = ps.slice(0, -1).join(pathSep); + var success = mkdir_p(parentPath, mode); // parent is not a directory. if (! success) { return false; } - var pathIsDirectory = function (path) { - var stat = files.statOrNull(path); - return stat && stat.isDirectory(); - }; - try { - files.mkdir(p, mode); + mkdir(p, mode); } catch (err) { if (err.code === "EEXIST") { if (pathIsDirectory(p)) { @@ -474,7 +456,12 @@ files.mkdir_p = function (dir, mode) { // double check we exist now return pathIsDirectory(p); -}; +} + +function pathIsDirectory(path: string) { + const stat = statOrNull(path); + return stat && stat.isDirectory(); +} // Roughly like cp -R. // @@ -490,33 +477,40 @@ files.mkdir_p = function (dir, mode) { // If options.ignore is present, it should be a list of regexps. Any // file whose basename matches one of the regexps, before // transformation, will be skipped. -files.cp_r = function(from, to, options = {}) { - from = files.pathResolve(from); +export function cp_r(from: string, to: string, options: { + preserveSymlinks?: boolean; + ignore?: RegExp[]; + transformFilename?: (f: string) => string; + transformContents?: ( + contents: ReturnType, + file: string, + ) => typeof contents; +} = {}) { + from = pathResolve(from); - const stat = statOrNull(from, options.preserveSymlinks); + const stat = statOrNullHelper(from, options.preserveSymlinks); if (! stat) { return; } if (stat.isDirectory()) { - files.mkdir_p(to, 0o755); + mkdir_p(to, 0o755); - files.readdir(from).forEach(f => { + readdir(from).forEach(f => { if (options.ignore && - _.any(options.ignore, - pattern => f.match(pattern))) { + options.ignore.some(pattern => f.match(pattern))) { return; } - const fullFrom = files.pathJoin(from, f); + const fullFrom = pathJoin(from, f); if (options.transformFilename) { f = options.transformFilename(f); } - files.cp_r( + cp_r( fullFrom, - files.pathJoin(to, f), + pathJoin(to, f), options ); }) @@ -524,15 +518,15 @@ files.cp_r = function(from, to, options = {}) { return; } - files.mkdir_p(files.pathDirname(to)); + mkdir_p(pathDirname(to)); if (stat.isSymbolicLink()) { - symlinkWithOverwrite(files.readlink(from), to); + symlinkWithOverwrite(readlink(from), to); } else if (options.transformContents) { - files.writeFile(to, options.transformContents( - files.readFile(from), - files.pathBasename(from) + writeFile(to, options.transformContents( + readFile(from), + pathBasename(from) ), { // Create the file as readable and writable by everyone, and // executable by everyone if the original file is executable by @@ -544,40 +538,44 @@ files.cp_r = function(from, to, options = {}) { } else { // Note: files.copyFile applies the same stat.mode logic as above. - files.copyFile(from, to); + copyFile(from, to); } -}; +} // create a symlink, overwriting the target link, file, or directory // if it exists -export const symlinkWithOverwrite = Profile("files.symlinkWithOverwrite", function symlinkWithOverwrite(source, target) { - const args = [source, target]; +export const symlinkWithOverwrite = +Profile("files.symlinkWithOverwrite", function symlinkWithOverwrite( + source: string, + target: string, +) { + const args: [string, string, "junction"?] = [source, target]; if (process.platform === "win32") { - const absoluteSource = files.pathResolve(target, source); + const absoluteSource = pathResolve(target, source); - if (files.stat(absoluteSource).isDirectory()) { + if (stat(absoluteSource).isDirectory()) { args[2] = "junction"; } } try { - files.symlink(...args); + symlink(...args); } catch (e) { if (e.code === "EEXIST") { - function normalizePath (path) { - return files.convertToOSPath(path).replace(/[\/\\]$/, "") + function normalizePath(path: string) { + return convertToOSPath(path).replace(/[\/\\]$/, "") } - if (files.lstat(target).isSymbolicLink() && - normalizePath(files.readlink(target)) === normalizePath(source)) { + if (lstat(target).isSymbolicLink() && + normalizePath(readlink(target)) === normalizePath(source)) { // If the target already points to the desired source, we don't // need to do anything. return; } // overwrite existing link, file, or directory - files.rm_recursive(target); - files.symlink(...args); + rm_recursive(target); + symlink(...args); } else { throw e; } @@ -592,39 +590,42 @@ export const symlinkWithOverwrite = Profile("files.symlinkWithOverwrite", functi * @param {String[]} options.output An array to push results to * @return {String[]} All of the paths in the directory recursively */ -files.getPathsInDir = function (dir, options) { +export function getPathsInDir(dir: string, options: { + cwd?: string; + output?: string[]; +}) { // Don't let this function yield so that the file system doesn't get changed // underneath us return fiberHelpers.noYieldsAllowed(function () { - var cwd = options.cwd || files.convertToStandardPath(process.cwd()); + var cwd = options.cwd || convertToStandardPath(process.cwd()); - if (! files.exists(cwd)) { + if (! exists(cwd)) { throw new Error("Specified current working directory doesn't exist: " + cwd); } - var absoluteDir = files.pathResolve(cwd, dir); + var absoluteDir = pathResolve(cwd, dir); - if (! files.exists(absoluteDir)) { + if (! exists(absoluteDir)) { // There are no paths in this dir, so don't do anything return; } var output = options.output || []; - var pathIsDirectory = function (path) { - var stat = files.lstat(path); + function pathIsDirectory(path: string) { + var stat = lstat(path); return stat.isDirectory(); - }; + } - _.each(files.readdir(absoluteDir), function (entry) { - var newPath = files.pathJoin(dir, entry); - var newAbsPath = files.pathJoin(absoluteDir, entry); + readdir(absoluteDir).forEach(entry => { + var newPath = pathJoin(dir, entry); + var newAbsPath = pathJoin(absoluteDir, entry); output.push(newPath); if (pathIsDirectory(newAbsPath)) { - files.getPathsInDir(newPath, { + getPathsInDir(newPath, { cwd: cwd, output: output }); @@ -633,30 +634,39 @@ files.getPathsInDir = function (dir, options) { return output; }); -}; +} -files.findPathsWithRegex = function (dir, regex, options) { - var allPaths = files.getPathsInDir(dir, { +export function findPathsWithRegex( + dir: string, + regex: RegExp, + options: { + cwd: string; + }, +) { + return getPathsInDir(dir, { cwd: options.cwd - }); - - return _.filter(allPaths, function (path) { + }).filter(function (path: string) { return path.match(regex); }); -}; +} // Make a temporary directory. Returns the path to the newly created // directory. Only the current user is allowed to read or write the // files in the directory (or add files to it). The directory will // be cleaned up on exit. const tempDirs = Object.create(null); -files.mkdtemp = function (prefix) { - var make = function () { +export function mkdtemp(prefix: string): string { + function make(): string { prefix = prefix || 'mt-'; // find /tmp - var tmpDir = _.first(_.map(['TMPDIR', 'TMP', 'TEMP'], function (t) { - return process.env[t]; - }).filter(_.identity)); + let tmpDir: string | undefined; + ['TMPDIR', 'TMP', 'TEMP'].some(t => { + const value = process.env[t]; + if (value) { + tmpDir = value; + return true; + } + }); if (! tmpDir && process.platform !== 'win32') { tmpDir = '/tmp'; @@ -666,16 +676,16 @@ files.mkdtemp = function (prefix) { throw new Error("Couldn't create a temporary directory."); } - tmpDir = files.realpath(tmpDir); + tmpDir = realpath(tmpDir); // make the directory. give it 3 tries in case of collisions from // crappy random. var tries = 3; while (tries > 0) { - var dirPath = files.pathJoin( + var dirPath = pathJoin( tmpDir, prefix + (Math.random() * 0x100000000 + 1).toString(36)); try { - files.mkdir(dirPath, 0o700); + mkdir(dirPath, 0o700); return dirPath; } catch (err) { tries--; @@ -686,11 +696,11 @@ files.mkdtemp = function (prefix) { var dir = make(); tempDirs[dir] = true; return dir; -}; +} // Call this if you're done using a temporary directory. It will asynchronously // be deleted. -files.freeTempDir = function (dir) { +export function freeTempDir(dir: string) { if (! tempDirs[dir]) { throw Error("not a tracked temp dir: " + dir); } @@ -699,7 +709,7 @@ files.freeTempDir = function (dir) { return; } - return files.rm_recursive_async(dir).then(() => { + return rm_recursive_async(dir).then(() => { // Delete tempDirs[dir] only when the removal finishes, so that the // cleanup.onExit handler can attempt the removal synchronously if it // fires in the meantime. @@ -709,14 +719,14 @@ files.freeTempDir = function (dir) { // to delete it again when the process exits. console.log(error); }); -}; +} if (! process.env.METEOR_SAVE_TMPDIRS) { - cleanup.onExit(function (sig) { + cleanup.onExit(function () { Object.keys(tempDirs).forEach(dir => { delete tempDirs[dir]; try { - files.rm_recursive(dir); + rm_recursive(dir); } catch (err) { // Don't crash and print a stack trace because we failed to delete // a temp directory. This happens sometimes on Windows and seems @@ -726,15 +736,24 @@ if (! process.env.METEOR_SAVE_TMPDIRS) { }); } +type TarOptions = { + verbose?: boolean; + forceConvert?: boolean; +} + // Takes a buffer containing `.tar.gz` data and extracts the archive // into a destination directory. destPath should not exist yet, and // the archive should contain a single top-level directory, which will // be renamed atomically to destPath. -files.extractTarGz = function (buffer, destPath, options) { +export function extractTarGz( + buffer: Buffer, + destPath: string, + options: TarOptions = {}, +) { var options = options || {}; - var parentDir = files.pathDirname(destPath); - var tempDir = files.pathJoin(parentDir, '.tmp' + utils.randomToken()); - files.mkdir_p(tempDir); + var parentDir = pathDirname(destPath); + var tempDir = pathJoin(parentDir, '.tmp' + utils.randomToken()); + mkdir_p(tempDir); if (! _.has(options, "verbose")) { options.verbose = require("../console/console.js").Console.verbose; @@ -747,13 +766,13 @@ files.extractTarGz = function (buffer, destPath, options) { : tryExtractWithNativeTar(buffer, tempDir, options) promise = promise.catch( - error => tryExtractWithNpmTar(buffer, tempDir, options) + () => tryExtractWithNpmTar(buffer, tempDir, options) ); promise.await(); // succeed! - var topLevelOfArchive = files.readdir(tempDir) + var topLevelOfArchive = readdir(tempDir) // On Windows, the 7z.exe tool sometimes creates an auxiliary // PaxHeader directory. .filter(file => ! file.startsWith("PaxHeader")); @@ -763,22 +782,26 @@ files.extractTarGz = function (buffer, destPath, options) { "Extracted archive '" + tempDir + "' should only contain one entry"); } - var extractDir = files.pathJoin(tempDir, topLevelOfArchive[0]); - files.rename(extractDir, destPath); - files.rm_recursive(tempDir); + var extractDir = pathJoin(tempDir, topLevelOfArchive[0]); + rename(extractDir, destPath); + rm_recursive(tempDir); if (options.verbose) { - console.log("Finished extracting in", new Date - startTime, "ms"); + console.log("Finished extracting in", Date.now() - startTime, "ms"); } -}; +} -function ensureDirectoryEmpty(dir) { - files.readdir(dir).forEach(file => { - files.rm_recursive(files.pathJoin(dir, file)); +function ensureDirectoryEmpty(dir: string) { + readdir(dir).forEach(file => { + rm_recursive(pathJoin(dir, file)); }); } -function tryExtractWithNativeTar(buffer, tempDir, options) { +function tryExtractWithNativeTar( + buffer: Buffer, + tempDir: string, + options: TarOptions = {}, +) { ensureDirectoryEmpty(tempDir); if (options.forceConvert) { @@ -789,7 +812,7 @@ function tryExtractWithNativeTar(buffer, tempDir, options) { return new Promise((resolve, reject) => { const flags = options.verbose ? "-xzvf" : "-xzf"; const tarProc = spawn("tar", [flags, "-"], { - cwd: files.convertToOSPath(tempDir), + cwd: convertToOSPath(tempDir), stdio: options.verbose ? [ "pipe", // Always need to write to tarProc.stdin. process.stdout, @@ -805,7 +828,11 @@ function tryExtractWithNativeTar(buffer, tempDir, options) { }); } -function tryExtractWithNative7z(buffer, tempDir, options) { +function tryExtractWithNative7z( + buffer: Buffer, + tempDir: string, + options: TarOptions = {}, +) { ensureDirectoryEmpty(tempDir); if (options.forceConvert) { @@ -813,15 +840,14 @@ function tryExtractWithNative7z(buffer, tempDir, options) { "Native 7z.exe cannot convert colons in package names")); } - const exeOSPath = files.convertToOSPath( - files.pathJoin(files.getCurrentNodeBinDir(), "7z.exe")); + const exeOSPath = convertToOSPath(pathJoin(getCurrentNodeBinDir(), "7z.exe")); const tarGzBasename = "out.tar.gz"; const spawnOptions = { - cwd: files.convertToOSPath(tempDir), + cwd: convertToOSPath(tempDir), stdio: options.verbose ? "inherit" : "pipe", }; - files.writeFile(files.pathJoin(tempDir, tarGzBasename), buffer); + writeFile(pathJoin(tempDir, tarGzBasename), buffer); return new Promise((resolve, reject) => { spawn(exeOSPath, [ @@ -833,8 +859,8 @@ function tryExtractWithNative7z(buffer, tempDir, options) { }).then(code => { assert.strictEqual(code, 0); - let tarBasename; - const foundTar = files.readdir(tempDir).some(file => { + let tarBasename: string; + const foundTar = readdir(tempDir).some(file => { if (file !== tarGzBasename) { tarBasename = file; return true; @@ -844,8 +870,8 @@ function tryExtractWithNative7z(buffer, tempDir, options) { assert.ok(foundTar, "failed to find .tar file"); function cleanUp() { - files.unlink(files.pathJoin(tempDir, tarGzBasename)); - files.unlink(files.pathJoin(tempDir, tarBasename)); + unlink(pathJoin(tempDir, tarGzBasename)); + unlink(pathJoin(tempDir, tarBasename)); } return new Promise((resolve, reject) => { @@ -865,7 +891,11 @@ function tryExtractWithNative7z(buffer, tempDir, options) { }); } -function tryExtractWithNpmTar(buffer, tempDir, options) { +function tryExtractWithNpmTar( + buffer: Buffer, + tempDir: string, + options: TarOptions = {}, +) { ensureDirectoryEmpty(tempDir); var tar = require("tar"); @@ -874,8 +904,8 @@ function tryExtractWithNpmTar(buffer, tempDir, options) { return new Promise((resolve, reject) => { var gunzip = zlib.createGunzip().on('error', reject); var extractor = new tar.Extract({ - path: files.convertToOSPath(tempDir) - }).on('entry', function (e) { + path: convertToOSPath(tempDir) + }).on('entry', function (e: any) { if (process.platform === "win32" || options.forceConvert) { // On Windows, try to convert old packages that have colons in // paths by blindly replacing all of the paths. Otherwise, we @@ -897,14 +927,14 @@ function tryExtractWithNpmTar(buffer, tempDir, options) { // bit but only if the read bit was present. Same as: // https://github.com/mapbox/node-pre-gyp/blob/7a28f4b0f562ba4712722fefe4eeffb7b20fbf7a/lib/install.js#L71-L77 // and others reported in: https://github.com/npm/node-tar/issues/7 -function addExecBitWhenReadBitPresent(fileMode) { +function addExecBitWhenReadBitPresent(fileMode: number) { return fileMode |= (fileMode >>> 2) & 0o111; } // Tar-gzips a directory, returning a stream that can then be piped as // needed. The tar archive will contain a top-level directory named // after dirPath. -files.createTarGzStream = function (dirPath, options) { +export function createTarGzStream(dirPath: string) { var tar = require("tar"); var fstream = require('fstream'); var zlib = require("zlib"); @@ -939,8 +969,8 @@ files.createTarGzStream = function (dirPath, options) { // an EACCESS when untarring if the first file inside the top-level directory // is not writeable. var fileStream = fstream.Reader({ - path: files.convertToOSPath(dirPath), - filter: function (entry) { + path: convertToOSPath(dirPath), + filter(entry: any) { if (process.platform !== "win32") { return true; } @@ -969,18 +999,18 @@ files.createTarGzStream = function (dirPath, options) { var tarStream = fileStream.pipe(tar.Pack({ noProprietary: true })); return tarStream.pipe(zlib.createGzip()); -}; +} // Tar-gzips a directory into a tarball on disk, synchronously. // The tar archive will contain a top-level directory named after dirPath. -files.createTarball = Profile(function (dirPath, tarball) { - return "files.createTarball " + files.pathBasename(tarball); -}, function (dirPath, tarball, options) { - var out = files.createWriteStream(tarball); +export const createTarball = Profile(function (_: string, tarball: string) { + return "files.createTarball " + pathBasename(tarball); +}, function (dirPath: string, tarball: string) { + var out = createWriteStream(tarball); new Promise(function (resolve, reject) { out.on('error', reject); out.on('close', resolve); - files.createTarGzStream(dirPath, options).pipe(out); + createTarGzStream(dirPath).pipe(out); }).await(); }); @@ -991,93 +1021,91 @@ files.createTarball = Profile(function (dirPath, tarball) { // toDir does not exist" and "you can end up with garbage directories // sitting around", but not "there's any time where toDir exists but // is in a state other than initial or final".) -files.renameDirAlmostAtomically = - Profile("files.renameDirAlmostAtomically", (fromDir, toDir) => { - const garbageDir = files.pathJoin( - files.pathDirname(toDir), - // Begin the base filename with a '.' character so that it can be - // ignored by other directory-scanning code. - `.${files.pathBasename(toDir)}-garbage-${utils.randomToken()}`, - ); +export const renameDirAlmostAtomically = +Profile("files.renameDirAlmostAtomically", (fromDir: string, toDir: string) => { + const garbageDir = pathJoin( + pathDirname(toDir), + // Begin the base filename with a '.' character so that it can be + // ignored by other directory-scanning code. + `.${pathBasename(toDir)}-garbage-${utils.randomToken()}`, + ); - // Get old dir out of the way, if it exists. - let cleanupGarbage = false; - let forceCopy = false; + // Get old dir out of the way, if it exists. + let cleanupGarbage = false; + let forceCopy = false; + try { + rename(toDir, garbageDir); + cleanupGarbage = true; + } catch (e) { + if (e.code === 'EXDEV') { + // Some (notably Docker) file systems will fail to do a seemingly + // harmless operation, such as renaming, on what is apparently the same + // file system. AUFS will do this even if the `fromDir` and `toDir` + // are on the same layer, and OverlayFS will fail if the `fromDir` and + // `toDir` are on different layers. In these cases, we will not be + // atomic and will need to do a recursive copy. + forceCopy = true; + } else if (e.code !== 'ENOENT') { + // No such file or directory is okay, but anything else is not. + throw e; + } + } + + if (! forceCopy) { try { - files.rename(toDir, garbageDir); - cleanupGarbage = true; + rename(fromDir, toDir); } catch (e) { + // It's possible that there may not have been a `toDir` to have + // advanced warning about this, so we're prepared to handle it again. if (e.code === 'EXDEV') { - // Some (notably Docker) file systems will fail to do a seemingly - // harmless operation, such as renaming, on what is apparently the same - // file system. AUFS will do this even if the `fromDir` and `toDir` - // are on the same layer, and OverlayFS will fail if the `fromDir` and - // `toDir` are on different layers. In these cases, we will not be - // atomic and will need to do a recursive copy. forceCopy = true; - } else if (e.code !== 'ENOENT') { - // No such file or directory is okay, but anything else is not. + } else { throw e; } } + } - if (! forceCopy) { - try { - files.rename(fromDir, toDir); - } catch (e) { - // It's possible that there may not have been a `toDir` to have - // advanced warning about this, so we're prepared to handle it again. - if (e.code === 'EXDEV') { - forceCopy = true; - } else { - throw e; - } - } - } + // If we've been forced to jeopardize our atomicity due to file-system + // limitations, we'll resort to copying. + if (forceCopy) { + rm_recursive(toDir); + cp_r(fromDir, toDir, { + preserveSymlinks: true, + }); + } - // If we've been forced to jeopardize our atomicity due to file-system - // limitations, we'll resort to copying. - if (forceCopy) { - files.rm_recursive(toDir); - files.cp_r(fromDir, toDir, { - preserveSymlinks: true, - }); - } + // ... and take out the trash. + if (cleanupGarbage) { + // We don't care about how long this takes, so we'll let it go async. + rm_recursive_async(garbageDir); + } +}); - // ... and take out the trash. - if (cleanupGarbage) { - // We don't care about how long this takes, so we'll let it go async. - files.rm_recursive_async(garbageDir); - } - }); +export const writeFileAtomically = +Profile("files.writeFileAtomically", function (filename: string, contents: string | Buffer) { + const parentDir = pathDirname(filename); + mkdir_p(parentDir); -files.writeFileAtomically = - Profile("files.writeFileAtomically", function (filename, contents) { - const parentDir = files.pathDirname(filename); - files.mkdir_p(parentDir); + const tmpFile = pathJoin( + parentDir, + '.' + pathBasename(filename) + '.' + utils.randomToken() + ); - const tmpFile = files.pathJoin( - parentDir, - '.' + files.pathBasename(filename) + '.' + utils.randomToken() - ); - - files.writeFile(tmpFile, contents); - files.rename(tmpFile, filename); - }); + writeFile(tmpFile, contents); + rename(tmpFile, filename); +}); // Like fs.symlinkSync, but creates a temporay link and renames it over the // file; this means it works even if the file already exists. // Do not use this function on Windows, it won't work. -files.symlinkOverSync = function (linkText, file) { - fiberHelpers.noYieldsAllowed(function () { - file = files.pathResolve(file); - var tmpSymlink = files.pathJoin( - files.pathDirname(file), - "." + files.pathBasename(file) + ".tmp" + utils.randomToken()); - files.symlink(linkText, tmpSymlink); - files.rename(tmpSymlink, file); - }); -}; +export function symlinkOverSync(linkText: string, file: string) { + file = pathResolve(file); + var tmpSymlink = pathJoin( + pathDirname(file), + "." + pathBasename(file) + ".tmp" + utils.randomToken()); + symlink(linkText, tmpSymlink); + rename(tmpSymlink, file); +} // Return the result of evaluating `code` using // `runInThisContext`. `code` will be wrapped in a closure. You can @@ -1097,26 +1125,28 @@ files.symlinkOverSync = function (linkText, file) { // different parser with a better error handling API. Ah well. The // underlying V8 issue is: // https://code.google.com/p/v8/issues/detail?id=1281 -files.runJavaScript = function (code, options) { - if (typeof code !== 'string') { - throw new Error("code must be a string"); - } - - options = options || {}; - var filename = options.filename || ""; - +export function runJavaScript(code: string, { + symbols = Object.create(null), + filename = "", + sourceMap, + sourceMapRoot, +}: { + symbols: Record; + filename: string; + sourceMap?: object; + sourceMapRoot?: string; +}) { return Profile.time('runJavaScript ' + filename, () => { - - var keys = [], values = []; + var keys: string[] = [], values: any[] = []; // don't assume that _.keys and _.values are guaranteed to // enumerate in the same order - _.each(options.symbols, function (value, name) { + _.each(symbols, function (value: any, name: string) { keys.push(name); values.push(value); }); var stackFilename = filename; - if (options.sourceMap) { + if (sourceMap) { // We want to generate an arbitrary filename that we use to associate the // file with its source map. stackFilename = ""; @@ -1125,8 +1155,8 @@ files.runJavaScript = function (code, options) { var chunks = []; var header = "(function(" + keys.join(',') + "){"; chunks.push(header); - if (options.sourceMap) { - var consumer = new sourcemap.SourceMapConsumer(options.sourceMap); + if (sourceMap) { + var consumer = new sourcemap.SourceMapConsumer(sourceMap); chunks.push(sourcemap.SourceNode.fromStringWithSourceMap( code, consumer)); } else { @@ -1137,17 +1167,17 @@ files.runJavaScript = function (code, options) { var wrapped; var parsedSourceMap = null; - if (options.sourceMap) { + if (sourceMap) { var node = new sourcemap.SourceNode(null, null, null, chunks); var results = node.toStringWithSourceMap({ file: stackFilename }); wrapped = results.code; parsedSourceMap = results.map.toJSON(); - if (options.sourceMapRoot) { + if (sourceMapRoot) { // Add the specified root to any root that may be in the file. - parsedSourceMap.sourceRoot = files.pathJoin( - options.sourceMapRoot, parsedSourceMap.sourceRoot || ''); + parsedSourceMap.sourceRoot = pathJoin( + sourceMapRoot, parsedSourceMap.sourceRoot || ''); } // source-map-support doesn't ever look at the sourcesContent field, so // there's no point in keeping it in memory. @@ -1191,7 +1221,7 @@ files.runJavaScript = function (code, options) { throw parseError; } - var err = new files.FancySyntaxError; + var err = new FancySyntaxError; err.message = parseError.message; if (parsedSourceMap) { @@ -1211,7 +1241,7 @@ files.runJavaScript = function (code, options) { err.column = parseError.loc.column; // adjust errors on line 1 to account for our header - if (err.line === 1) { + if (err.line === 1 && typeof err.column === "number") { err.column -= header.length; } @@ -1228,42 +1258,47 @@ files.runJavaScript = function (code, options) { return (buildmessage.markBoundary(func)).apply(null, values); }); -}; +} // - message: an error message from the parser // - file: filename // - line: 1-based // - column: 1-based -files.FancySyntaxError = function () {}; +export class FancySyntaxError { + public file?: string; + public line?: number; + public column?: number; + constructor(public message?: string) {} +} -files.OfflineError = function (error) { - this.error = error; -}; -files.OfflineError.prototype.toString = function () { - return "[Offline: " + this.error.toString() + "]"; -}; +export class OfflineError { + constructor(public error: Error) {} + toString() { + return "[Offline: " + this.error.toString() + "]"; + } +} // Like files.readdir, but skips entries whose names begin with dots, and // converts ENOENT to []. -files.readdirNoDots = function (path) { +export function readdirNoDots(path: string) { try { - var entries = files.readdir(path); + var entries = readdir(path); } catch (e) { if (e.code === 'ENOENT') { return []; } throw e; } - return _.filter(entries, function (entry) { + return entries.filter(entry => { return entry && entry[0] !== '.'; }); -}; +} // Read a file in line by line. Returns an array of lines to be // processed individually. Throws if the file doesn't exist or if // anything else goes wrong. -var getLines = function (file) { - var buffer = files.readFile(file); +export function getLines(file: string) { + var buffer = readFile(file); var lines = exports.splitBufferToLines(buffer); // strip blank lines at the end @@ -1276,16 +1311,14 @@ var getLines = function (file) { } return lines; -}; +} -exports.getLines = getLines; - -exports.splitBufferToLines = function (buffer) { +export function splitBufferToLines(buffer: Buffer) { return buffer.toString('utf8').split(/\r*\n\r*/); -}; +} // Same as `getLines`, but returns [] if the file doesn't exist. -exports.getLinesOrEmpty = function (file) { +export function getLinesOrEmpty(file: string) { try { return getLines(file); } catch (e) { @@ -1294,13 +1327,13 @@ exports.getLinesOrEmpty = function (file) { } throw e; } -}; +} // Returns null if the file does not exist, otherwise returns the parsed JSON in // the file. Throws on errors other than ENOENT (including JSON parse failure). -exports.readJSONOrNull = function (file) { +export function readJSONOrNull(file: string) { try { - var raw = files.readFile(file, 'utf8'); + var raw = readFile(file, 'utf8'); } catch (e) { if (e && e.code === 'ENOENT') { return null; @@ -1308,33 +1341,27 @@ exports.readJSONOrNull = function (file) { throw e; } return JSON.parse(raw); -}; +} // Trims whitespace & other filler characters of a line in a project file. -files.trimSpaceAndComments = function (line) { +export function trimSpaceAndComments(line: string) { var match = line.match(/^([^#]*)#/); if (match) { line = match[1]; } - return files.trimSpace(line); -}; - -// Trims leading and trailing whilespace in a project file. -files.trimSpace = function (line) { - return line.replace(/^\s+|\s+$/g, ''); -}; - - -files.KeyValueFile = function (path) { - var self = this; - self.path = path; + return trimSpace(line); } -_.extend(files.KeyValueFile.prototype, { - set: function (k, v) { - var self = this; +// Trims leading and trailing whilespace in a project file. +export function trimSpace(line: string) { + return line.replace(/^\s+|\s+$/g, ''); +} - var data = self._readAll() || ''; +export class KeyValueFile { + constructor(public path: string) {} + + set(k: string, v: any) { + var data = this.readAll() || ''; var lines = data.split(/\n/); var found = false; @@ -1349,30 +1376,27 @@ _.extend(files.KeyValueFile.prototype, { lines.push(k + "=" + v); } var newdata = lines.join('\n') + '\n'; - files.writeFile(self.path, newdata, 'utf8'); - }, + writeFile(this.path, newdata, 'utf8'); + } - _readAll: function () { - var self = this; - - if (files.exists(self.path)) { - return files.readFile(self.path, 'utf8'); + private readAll() { + if (exists(this.path)) { + return readFile(this.path, 'utf8'); } else { return null; } } -}); +} -files.getHomeDir = function () { +export function getHomeDir() { if (process.platform === "win32") { - return files.pathDirname( - files.convertToStandardPath(process.env.METEOR_INSTALLATION)); + return pathDirname(convertToStandardPath(process.env.METEOR_INSTALLATION)); } else { return process.env.HOME; } -}; +} -files.currentEnvWithPathsAdded = function (...paths) { +export function currentEnvWithPathsAdded(...paths: string[]) { const env = {...process.env}; let pathPropertyName; @@ -1383,7 +1407,7 @@ files.currentEnvWithPathsAdded = function (...paths) { // of setting Path for instance. // We want to make sure we're setting the right property, so we // lookup the property name case insensitively ourselves. - pathPropertyName = _.find(Object.keys(env), (key) => { + pathPropertyName = _.find(Object.keys(env), (key: string) => { return key.toUpperCase() === 'PATH'; }); if (!pathPropertyName) { @@ -1393,28 +1417,25 @@ files.currentEnvWithPathsAdded = function (...paths) { pathPropertyName = 'PATH'; } - const convertedPaths = paths.map(path => files.convertToOSPath(path)); - let pathDecomposed = (env[pathPropertyName] || "").split(files.pathOsDelimiter); + const convertedPaths = paths.map(path => convertToOSPath(path)); + let pathDecomposed = (env[pathPropertyName] || "").split(pathOsDelimiter); pathDecomposed.unshift(...convertedPaths); - env[pathPropertyName] = pathDecomposed.join(files.pathOsDelimiter); + env[pathPropertyName] = pathDecomposed.join(pathOsDelimiter); return env; } // add .bat extension to link file if not present -var ensureBatExtension = function (p) { - if (p.indexOf(".bat") !== p.length - 4) { - p = p + ".bat"; - } - return p; -}; +function ensureBatExtension(p: string) { + return p.endsWith(".bat") ? p : p + ".bat"; +} // Windows-only, generates a bat script that calls the destination bat script -files._generateScriptLinkToMeteorScript = function (scriptLocation) { +export function _generateScriptLinkToMeteorScript(scriptLocation: string) { var scriptLocationIsAbsolutePath = scriptLocation.match(/^\//); var scriptLocationConverted = scriptLocationIsAbsolutePath - ? files.convertToWindowsPath(scriptLocation) - : "%~dp0\\" + files.convertToWindowsPath(scriptLocation); + ? convertToWindowsPath(scriptLocation) + : "%~dp0\\" + convertToWindowsPath(scriptLocation); var newScript = [ "@echo off", @@ -1435,9 +1456,9 @@ files._generateScriptLinkToMeteorScript = function (scriptLocation) { ].join(os.EOL); return newScript; -}; +} -files._getLocationFromScriptLinkToMeteorScript = function (script) { +export function _getLocationFromScriptLinkToMeteorScript(script: string | Buffer) { var lines = _.compact(script.toString().split('\n')); var scriptLocation = _.last(lines) @@ -1453,10 +1474,14 @@ files._getLocationFromScriptLinkToMeteorScript = function (script) { throw new Error('Failed to parse script location from meteor.bat'); } - return files.convertToPosixPath(scriptLocation, ! isAbsolute); -}; + return convertToPosixPath(scriptLocation, ! isAbsolute); +} -files.linkToMeteorScript = function (scriptLocation, linkLocation, platform) { +export function linkToMeteorScript( + scriptLocation: string, + linkLocation: string, + platform: string, +) { platform = platform || process.platform; if (platform === 'win32') { @@ -1464,25 +1489,57 @@ files.linkToMeteorScript = function (scriptLocation, linkLocation, platform) { linkLocation = ensureBatExtension(linkLocation); scriptLocation = ensureBatExtension(scriptLocation); - var script = files._generateScriptLinkToMeteorScript(scriptLocation); + var script = _generateScriptLinkToMeteorScript(scriptLocation); - files.writeFile(linkLocation, script, {encoding: "ascii"}); + writeFile(linkLocation, script, { encoding: "ascii" }); } else { // Symlink meteor tool - files.symlinkOverSync(scriptLocation, linkLocation); + symlinkOverSync(scriptLocation, linkLocation); } -}; +} -files.readLinkToMeteorScript = function (linkLocation, platform) { - platform = platform || process.platform; +export function readLinkToMeteorScript( + linkLocation: string, + platform = process.platform, +) { if (platform === 'win32') { linkLocation = ensureBatExtension(linkLocation); - var script = files.readFile(linkLocation); - return files._getLocationFromScriptLinkToMeteorScript(script); + var script = readFile(linkLocation); + return _getLocationFromScriptLinkToMeteorScript(script); } else { - return files.readlink(linkLocation); + return readlink(linkLocation); } -}; +} + +// The fs.exists method is deprecated in Node v4: +// https://nodejs.org/api/fs.html#fs_fs_exists_path_callback +export function exists(path: string) { + return !! statOrNull(path); +} + +export function readBufferWithLengthAndOffset( + filename: string, + length: number, + offset: number, +) { + const data = Buffer.alloc(length); + // Read the data from disk, if it is non-empty. Avoid doing IO for empty + // files, because (a) unnecessary and (b) fs.readSync with length 0 + // throws instead of acting like POSIX read: + // https://github.com/joyent/node/issues/5685 + if (length > 0) { + const fd = open(filename, "r"); + try { + var count = read(fd, data, 0, length, offset); + } finally { + close(fd); + } + if (count !== length) { + throw new Error("couldn't read entire resource"); + } + } + return data; +} // Summary of cross platform file system handling strategy @@ -1522,185 +1579,81 @@ files.readLinkToMeteorScript = function (linkLocation, platform) { // A helpful file to import for this purpose is colon-converter.js, which also // knows how to convert various configuration file formats. -files.fsFixPath = {}; -/** - * Wrap a function from node's fs module to use the right slashes for this OS - * and run in a fiber, then assign it to the "files" namespace. Each call - * creates a files.func that runs asynchronously with Fibers (yielding and - * until the call is done), unless run outside a Fiber or in noYieldsAllowed, in - * which case it uses fs.funcSync. - * - * Also creates a simpler version on files.fsFixPath.* that just fixes the path - * and fiberizes the Sync version if possible. - * - * @param {String} fsFuncName The name of the node fs function to wrap - * @param {Number[]} pathArgIndices Indices of arguments that have paths, these - * arguments will be converted to the correct OS slashes - * @param {Object} options Some options for lesser-used cases - * @param {Boolean} options.noErr If true, the callback of the wrapped function - * doesn't have a first "error" argument, for example in fs.exists. - * @param {Function} options.modifyReturnValue Pass in a function to modify the - * return value - */ -function wrapFsFunc(fsFuncName, pathArgIndices, options) { - options = options || {}; - - const fsFunc = fs[fsFuncName]; - const fsFuncSync = fs[fsFuncName + "Sync"]; - - function makeWrapper ({alwaysSync, sync}) { - function wrapper(...args) { - for (let j = pathArgIndices.length - 1; j >= 0; --j) { - const i = pathArgIndices[j]; - args[i] = files.convertToOSPath(args[i]); - } - - const shouldBeSync = alwaysSync || sync; - // There's some overhead in awaiting a Promise of an async call, - // vs just doing the sync call, which for a call like "stat" - // takes longer than the call itself. Different parts of the tool - // may perform 1,000s or 10,000s of stats each under certain - // conditions, so we get a nice performance boost from making - // these calls sync. - const isQuickie = (fsFuncName === 'stat' || - fsFuncName === 'rename' || - fsFuncName === 'symlink'); - - const dirty = options && options.dirty; - const dirtyFn = typeof dirty === "function" ? dirty : null; - - if (mayYield() && - shouldBeSync && - ! isQuickie) { - const promise = new Promise((resolve, reject) => { - args.push((err, value) => { - if (options.noErr) { - resolve(err); - } else if (err) { - reject(err); - } else { - resolve(value); - } - }); - - fsFunc.apply(fs, args); - }); - - const result = promise.await(); - - if (dirtyFn) { - dirtyFn(...args); - } - - return options.modifyReturnValue - ? options.modifyReturnValue(result) - : result; - - } else if (shouldBeSync) { - // Should be sync but can't yield: we are not in a Fiber. - // Run the sync version of the fs.* method. - const result = fsFuncSync.apply(fs, args); - - if (dirtyFn) { - dirtyFn(...args); - } - - return options.modifyReturnValue ? - options.modifyReturnValue(result) : result; - - } else if (! sync) { - // wrapping a plain async version - let cb = args[args.length - 1]; - if (typeof cb === "function") { - args.pop(); - } else { - cb = null; - } - - new Promise((resolve, reject) => { - args.push((err, res) => { - err ? reject(err) : resolve(res); - }); - - fsFunc.apply(fs, args); - - }).then(res => { - if (dirtyFn) { - dirtyFn(...args); - } - - if (options.modifyReturnValue) { - res = options.modifyReturnValue(res); - } - - cb && cb(null, res); - - }, cb); - - return; - } - - throw new Error('unexpected'); +function wrapFsFunc< + TArgs extends any[], + TResult, + F extends (...args: TArgs) => TResult, +>( + fn: F, + pathArgIndices: number[], + options?: { + modifyReturnValue?: (result: TResult) => any; + dirty?: (...args: TArgs) => any; + }, +): F { + return function wrapper(...args: TArgs) { + for (let j = pathArgIndices.length - 1; j >= 0; --j) { + const i = pathArgIndices[j]; + args[i] = convertToOSPath(args[i]); } - wrapper.displayName = fsFuncName; - return wrapper; - } + const result = fn.apply(fs, args); - files[fsFuncName] = Profile('files.' + fsFuncName, makeWrapper({ alwaysSync: true })); + if (! options) { + return result; + } - files.fsFixPath[fsFuncName] = - Profile('wrapped.fs.' + fsFuncName, makeWrapper({ sync: false })); - files.fsFixPath[fsFuncName + 'Sync'] = - Profile('wrapped.fs.' + fsFuncName + 'Sync', makeWrapper({ sync: true })); + if (options.dirty) { + options.dirty(...args); + } + + return options.modifyReturnValue + ? options.modifyReturnValue(result) + : result; + } as F; } let dependOnPathSalt = 0; -export const dependOnPath = require("optimism").wrap( +import { wrap } from "optimism"; +export const dependOnPath = wrap( // Always return something different to prevent optimism from // second-guessing the dirtiness of this function. - path => ++dependOnPathSalt, + (_path: string) => ++dependOnPathSalt, // This function is disposable because we don't care about its result, // only its role in optimistic dependency tracking/dirtying. { disposable: true } ); -function wrapDestructiveFsFunc(name, pathArgIndices) { - pathArgIndices = pathArgIndices || [0]; - wrapFsFunc(name, pathArgIndices, { - dirty(...args) { - // Immediately reset all optimistic functions (defined in - // tools/fs/optimistic.js) that depend on these paths. +function wrapDestructiveFsFunc< + TArgs extends any[], + TResult, + F extends (...args: TArgs) => TResult, +>( + fn: F, + pathArgIndices: number[] = [0], +): F { + return wrapFsFunc(fn, pathArgIndices, { + dirty(...args: TArgs) { pathArgIndices.forEach(i => dependOnPath.dirty(args[i])); } - }); + }) as F; } -wrapDestructiveFsFunc("writeFile"); -wrapDestructiveFsFunc("appendFile"); - -wrapFsFunc("readFile", [0], { - modifyReturnValue: function (fileData) { +export const readFile = wrapFsFunc(fs.readFileSync, [0], { + modifyReturnValue: function (fileData: Buffer | string) { if (_.isString(fileData)) { - return files.convertToStandardLineEndings(fileData); + return convertToStandardLineEndings(fileData); } - return fileData; } }); -wrapFsFunc("stat", [0]); -wrapFsFunc("lstat", [0]); - -wrapDestructiveFsFunc("rename", [0, 1]); - -wrapDestructiveFsFunc("copyFile", [0, 1]); -const wrappedCopyFile = files.copyFile; // Copies a file, which is expected to exist. Parent directories of "to" do not // have to exist. Treats symbolic links transparently (copies the contents, not // the link itself, and it's an error if the link doesn't point to a file). -files.copyFile = function copyFile(from, to, flags = 0) { - files.mkdir_p(files.pathDirname(files.pathResolve(to)), 0o755); +const wrappedCopyFile = wrapDestructiveFsFunc(fs.copyFileSync, [0, 1]); +export function copyFile(from: string, to: string, flags = 0) { + mkdir_p(pathDirname(pathResolve(to)), 0o755); wrappedCopyFile(from, to, flags); const stat = statOrNull(from); if (stat && stat.isFile()) { @@ -1709,176 +1662,65 @@ files.copyFile = function copyFile(from, to, flags = 0) { // modified by umask.) We don't copy the mode *directly* because this function // is used by 'meteor create' which is copying from the read-only tools tree // into a writable app. - files.chmod(to, (stat.mode & 0o100) ? 0o777 : 0o666); + chmod(to, (stat.mode & 0o100) ? 0o777 : 0o666); } -}; - -// After the outermost files.withCache call returns, the withCacheCache is -// reset to null so that it does not survive server restarts. -let withCacheCache = null; - -files.withCache = Profile("files.withCache", function (fn) { - const oldCache = withCacheCache; - withCacheCache = oldCache || Object.create(null); - try { - return fn(); - } finally { - withCacheCache = oldCache; - } -}); - -function enableCache(name) { - const method = files[name]; - - function makeCacheKey(args) { - var parts = [name]; - - for (var i = 0; i < args.length; ++i) { - var arg = args[i]; - - if (typeof arg !== "string") { - // If any of the arguments is not a string, then we won't cache - // the result of the corresponding file.* method invocation. - return null; - } - - parts.push(arg); - } - - return parts.join("\0"); - } - - files[name] = function (...args) { - if (withCacheCache) { - var cacheKey = makeCacheKey(args); - if (cacheKey && cacheKey in withCacheCache) { - return withCacheCache[cacheKey]; - } - } - - const result = method.apply(files, args); - - if (withCacheCache && cacheKey !== null) { - // If cacheKey === null, then we called makeCacheKey above and it - // failed because one of the arguments was not a string, so we - // should not try to call makeCacheKey again. - withCacheCache[cacheKey || makeCacheKey(args)] = result; - } - - return result; - }; } -// The fs.exists method is deprecated in Node v4: -// https://nodejs.org/api/fs.html#fs_fs_exists_path_callback -files.exists = -files.existsSync = function (path, callback) { - if (typeof callback === "function") { - throw new Error("Passing a callback to files.exists is no longer supported"); - } - return !! files.statOrNull(path); -}; +const wrappedRename = wrapDestructiveFsFunc(fs.renameSync, [0, 1]); +export const rename = isWindowsLikeFilesystem() ? function (from: string, to: string) { + // Retries are necessary only on Windows, because the rename call can + // fail with EBUSY, which means the file is in use. + let maxTries = 10; + let success = false; + const osTo = convertToOSPath(to); -if (files.isWindowsLikeFilesystem()) { - const rename = files.rename; - - files.rename = function (from, to) { - // Retries are necessary only on Windows, because the rename call can - // fail with EBUSY, which means the file is in use. - let maxTries = 10; - let success = false; - const osTo = files.convertToOSPath(to); - - while (! success && maxTries-- > 0) { - try { - // Despite previous failures, the top-level destination directory - // may have been successfully created, so we must remove it to - // avoid moving the source file *into* the destination directory. - rimraf.sync(osTo); - rename(from, to); - success = true; - } catch (err) { - if (err.code !== 'EPERM' && err.code !== 'EACCES') { - throw err; - } + while (! success && maxTries-- > 0) { + try { + // Despite previous failures, the top-level destination directory + // may have been successfully created, so we must remove it to + // avoid moving the source file *into* the destination directory. + rimraf.sync(osTo); + wrappedRename(from, to); + success = true; + } catch (err) { + if (err.code !== 'EPERM' && err.code !== 'EACCES') { + throw err; } } + } - if (! success) { - files.cp_r(from, to, { preserveSymlinks: true }); - files.rm_recursive(from); - } - }; -} + if (! success) { + cp_r(from, to, { preserveSymlinks: true }); + rm_recursive(from); + } +} : wrappedRename; // Warning: doesn't convert slashes in the second 'cache' arg -wrapFsFunc("realpath", [0], { - modifyReturnValue: files.convertToStandardPath +export const realpath = wrapFsFunc(fs.realpathSync, [0], { + modifyReturnValue: convertToStandardPath }); -wrapFsFunc("readdir", [0], { - modifyReturnValue: function (entries) { - return _.map(entries, files.convertToStandardPath); - } +export const readdir = wrapFsFunc(fs.readdirSync, [0], { + modifyReturnValue(entries: string[]) { + return entries.map(convertToStandardPath); + }, }); -wrapDestructiveFsFunc("rmdir"); -wrapDestructiveFsFunc("mkdir"); -wrapDestructiveFsFunc("unlink"); -wrapDestructiveFsFunc("chmod"); - -wrapFsFunc("open", [0]); - -// XXX this doesn't give you the second argument to the callback -wrapFsFunc("read", []); -wrapFsFunc("write", []); -wrapFsFunc("close", []); -wrapFsFunc("symlink", [0, 1]); -wrapFsFunc("readlink", [0]); - -// These don't need to be Fiberized -files.createReadStream = function (...args) { - args[0] = files.convertToOSPath(args[0]); - return fs.createReadStream(...args); -}; - -files.createWriteStream = function (...args) { - args[0] = files.convertToOSPath(args[0]); - return fs.createWriteStream(...args); -}; - -files.watchFile = function (...args) { - args[0] = files.convertToOSPath(args[0]); - return fs.watchFile(...args); -}; - -files.unwatchFile = function (...args) { - args[0] = files.convertToOSPath(args[0]); - return fs.unwatchFile(...args); -}; - -files.readBufferWithLengthAndOffset = function (filename, length, offset) { - var data = new Buffer(length); - // Read the data from disk, if it is non-empty. Avoid doing IO for empty - // files, because (a) unnecessary and (b) fs.readSync with length 0 - // throws instead of acting like POSIX read: - // https://github.com/joyent/node/issues/5685 - if (length > 0) { - var fd = files.open(filename, "r"); - try { - var count = files.read( - fd, data, 0, length, offset); - } finally { - files.close(fd); - } - if (count !== length) { - throw new Error("couldn't read entire resource"); - } - } - return data; -}; - -enableCache("readdir"); -enableCache("realpath"); -enableCache("stat"); -enableCache("lstat"); +export const appendFile = wrapDestructiveFsFunc(fs.appendFileSync); +export const chmod = wrapDestructiveFsFunc(fs.chmodSync); +export const close = wrapFsFunc(fs.closeSync, []); +export const createReadStream = wrapFsFunc(fs.createReadStream, [0]); +export const createWriteStream = wrapFsFunc(fs.createWriteStream, [0]); +export const lstat = wrapFsFunc(fs.lstatSync, [0]); +export const mkdir = wrapDestructiveFsFunc(fs.mkdirSync); +export const open = wrapFsFunc(fs.openSync, [0]); +export const read = wrapFsFunc(fs.readSync, []); +export const readlink = wrapFsFunc(fs.readlinkSync, [0]); +export const rmdir = wrapDestructiveFsFunc(fs.rmdirSync); +export const stat = wrapFsFunc(fs.statSync, [0]); +export const symlink = wrapFsFunc(fs.symlinkSync, [0, 1]); +export const unlink = wrapDestructiveFsFunc(fs.unlinkSync); +export const unwatchFile = wrapFsFunc(fs.unwatchFile, [0]); +export const watchFile = wrapFsFunc(fs.watchFile, [0]); +export const write = wrapFsFunc(fs.writeSync, []); +export const writeFile = wrapDestructiveFsFunc(fs.writeFileSync); diff --git a/tools/fs/fsFixPath.ts b/tools/fs/fsFixPath.ts new file mode 100644 index 0000000000..31a689e94a --- /dev/null +++ b/tools/fs/fsFixPath.ts @@ -0,0 +1,27 @@ +export { + // The tools/fs/files module used to export wrappers for both fiberized + // and synchronous fs.* functions. This module exists to preserve backwards + // compatibility with that behavior, even though everything is sync now. + appendFile, appendFile as appendFileSync, + chmod, chmod as chmodSync, + close, close as closeSync, + copyFile, copyFile as copyFileSync, + createReadStream, + createWriteStream, + lstat, lstat as lstatSync, + mkdir, mkdir as mkdirSync, + open, open as openSync, + read, read as readSync, + readFile, readFile as readFileSync, + readdir, readdir as readdirSync, + readlink, readlink as readlinkSync, + realpath, realpath as realpathSync, + rename, rename as renameSync, + rmdir, rmdir as rmdirSync, + stat, stat as statSync, + symlink, symlink as symlinkSync, + unlink, unlink as unlinkSync, + watchFile, unwatchFile, + write, write as writeSync, + writeFile, writeFile as writeFileSync, +} from "./files"; diff --git a/tools/fs/mini-files.js b/tools/fs/mini-files.js index 4e4c2f46b1..eb212bb655 100644 --- a/tools/fs/mini-files.js +++ b/tools/fs/mini-files.js @@ -1,2 +1 @@ -var miniFiles = require('../static-assets/server/mini-files.js'); -module.exports = miniFiles; +export * from "../static-assets/server/mini-files.js"; diff --git a/tools/isobuild/bundler.js b/tools/isobuild/bundler.js index e32b74708f..7569c13f75 100644 --- a/tools/isobuild/bundler.js +++ b/tools/isobuild/bundler.js @@ -3109,9 +3109,7 @@ Find out more about Meteor at meteor.com. * you are testing! */ -exports.bundle = Profile("bundler.bundle", function (options) { - return files.withCache(() => bundle(options)); -}); +exports.bundle = Profile("bundler.bundle", bundle); function bundle({ projectContext, diff --git a/tools/isobuild/compiler.js b/tools/isobuild/compiler.js index 051d3930b6..95ba6681fe 100644 --- a/tools/isobuild/compiler.js +++ b/tools/isobuild/compiler.js @@ -182,17 +182,15 @@ compiler.compile = Profile(function (packageSource, options) { return; } - files.withCache(() => { - var unibuildResult = compileUnibuild({ - isopack: isopk, - sourceArch: architecture, - isopackCache: isopackCache, - nodeModulesPath: nodeModulesPath, - }); - - _.extend(pluginProviderPackageNames, - unibuildResult.pluginProviderPackageNames); + var unibuildResult = compileUnibuild({ + isopack: isopk, + sourceArch: architecture, + isopackCache: isopackCache, + nodeModulesPath: nodeModulesPath, }); + + _.extend(pluginProviderPackageNames, + unibuildResult.pluginProviderPackageNames); }); if (options.includePluginProviderPackageMap) { diff --git a/tools/isobuild/isopack.js b/tools/isobuild/isopack.js index 20b366fe57..769a0a85fe 100644 --- a/tools/isobuild/isopack.js +++ b/tools/isobuild/isopack.js @@ -7,7 +7,8 @@ var buildmessage = require('../utils/buildmessage.js'); import Builder from './builder.js'; var bundler = require('./bundler.js'); var watch = require('../fs/watch.js'); -var files = require('../fs/files'); +import * as files from '../fs/files'; +import * as fsFixPath from '../fs/fsFixPath'; import { ISOPACKETS, makeIsopacketBuildContext, @@ -805,7 +806,7 @@ _.extend(Isopack.prototype, { extname: files.pathExtname, sep: files.pathSep }, - fs: files.fsFixPath + fs: fsFixPath, }; return Plugin; }, diff --git a/tools/isobuild/package-source.js b/tools/isobuild/package-source.js index bc146a7060..e9296c2f92 100644 --- a/tools/isobuild/package-source.js +++ b/tools/isobuild/package-source.js @@ -1353,7 +1353,7 @@ _.extend(PackageSource.prototype, { return sources; } - return files.withCache(() => find("", 0, false)); + return find("", 0, false); }), _findAssets({ From 0df070fc5ffc2be7902ff8e03baa0d524051308f Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Thu, 4 Jul 2019 11:57:57 -0400 Subject: [PATCH 135/327] Use const and let more consistently in tools/fs/files. --- tools/fs/files.ts | 196 ++++++++++++++++++++++------------------------ 1 file changed, 95 insertions(+), 101 deletions(-) diff --git a/tools/fs/files.ts b/tools/fs/files.ts index 60854df902..86e9449cff 100644 --- a/tools/fs/files.ts +++ b/tools/fs/files.ts @@ -8,22 +8,23 @@ import assert from "assert"; import fs from "fs"; // var fs = require("fs"); -var path = require('path'); -var os = require('os'); -var _ = require('underscore'); +const path = require('path'); +const os = require('os'); +const _ = require('underscore'); +const Fiber = require("fibers"); const { spawn, execFile } = require("child_process"); -var rimraf = require('rimraf'); -var sourcemap = require('source-map'); -var sourceMapRetrieverStack = require('../tool-env/source-map-retriever-stack.js'); +const rimraf = require('rimraf'); +const sourcemap = require('source-map'); +const sourceMapRetrieverStack = require('../tool-env/source-map-retriever-stack.js'); -var utils = require('../utils/utils.js'); -var cleanup = require('../tool-env/cleanup.js'); -var buildmessage = require('../utils/buildmessage.js'); -var fiberHelpers = require('../utils/fiber-helpers.js'); -var colonConverter = require('../utils/colon-converter.js'); +const utils = require('../utils/utils.js'); +const cleanup = require('../tool-env/cleanup.js'); +const buildmessage = require('../utils/buildmessage.js'); +const fiberHelpers = require('../utils/fiber-helpers.js'); +const colonConverter = require('../utils/colon-converter.js'); -var Profile = require('../tool-env/profile.js').Profile; +const Profile = require('../tool-env/profile.js').Profile; export * from './mini-files'; import { @@ -43,8 +44,8 @@ import { pathSep, } from "./mini-files"; -var parsedSourceMaps: Record = {}; -var nextStackFilenameCounter = 1; +const parsedSourceMaps: Record = {}; +let nextStackFilenameCounter = 1; // Use the source maps specified to runJavaScript function useParsedSourceMap(pathForSourceMap: string) { @@ -152,10 +153,10 @@ export function findGitCommitHash(path: string) { // 'entry' to the .gitignore on its own line at the bottom of the // file, if the exact line does not already exist in the file. export function addToGitignore(dirPath: string, entry: string) { - var filepath = pathJoin(dirPath, ".gitignore"); - if (exists(filepath)) { - var data = readFile(filepath, 'utf8'); - var lines = data.split(/\n/); + const filePath = pathJoin(dirPath, ".gitignore"); + if (exists(filePath)) { + let data = readFile(filePath, 'utf8'); + const lines = data.split(/\n/); if (lines.some(line => line === entry)) { // already there do nothing } else { @@ -164,11 +165,11 @@ export function addToGitignore(dirPath: string, entry: string) { data = data + "\n"; } data = data + entry + "\n"; - writeFile(filepath, data, 'utf8'); + writeFile(filePath, data, 'utf8'); } } else { // doesn't exist, just write it. - writeFile(filepath, entry + "\n", 'utf8'); + writeFile(filePath, entry + "\n", 'utf8'); } } @@ -199,29 +200,25 @@ export function usesWarehouse() { // Read the '.tools_version.txt' file. If in a checkout, throw an error. export function getToolsVersion() { if (! inCheckout()) { - var isopackJsonPath = pathJoin(getCurrentToolsDir(), + const isopackJsonPath = pathJoin(getCurrentToolsDir(), '..', // get out of tool, back to package 'isopack.json'); - var parsed; + let parsed; if (exists(isopackJsonPath)) { - var isopackJson = readFile(isopackJsonPath); - parsed = JSON.parse(isopackJson); - // XXX "isopack-1" is duplicate of isopack.currentFormat - parsed = parsed["isopack-1"]; // get the right format from the JSON + parsed = JSON.parse(readFile(isopackJsonPath))["isopack-1"]; return parsed.name + '@' + parsed.version; } // XXX COMPAT WITH 0.9.3 - var unipackageJsonPath = pathJoin( + const unipackageJsonPath = pathJoin( getCurrentToolsDir(), '..', // get out of tool, back to package 'unipackage.json' ); - var unipackageJson = readFile(unipackageJsonPath); - parsed = JSON.parse(unipackageJson); + parsed = JSON.parse(readFile(unipackageJsonPath)); return parsed.name + '@' + parsed.version; } else { @@ -249,8 +246,8 @@ export function getCurrentToolsDir() { // emitted). export function getSettings(filename: string, watchSet: any) { buildmessage.assertInCapture(); - var absPath = pathResolve(filename); - var buffer = require("./watch.js").readAndWatchFile(watchSet, absPath); + const absPath = pathResolve(filename); + const buffer = require("./watch.js").readAndWatchFile(watchSet, absPath); if (buffer === null) { buildmessage.error("file not found (settings file)", { file: filename }); @@ -263,7 +260,7 @@ export function getSettings(filename: string, watchSet: any) { return null; } - var str = buffer.toString('utf8'); + let str = buffer.toString('utf8'); // The use of a byte order mark crashes JSON parsing. Since a BOM is not // required (or recommended) when using UTF-8, let's remove it if it exists. @@ -287,11 +284,11 @@ export function getSettings(filename: string, watchSet: any) { // user. Presently, the main thing it does is replace $HOME with ~. export function prettyPath(p: string) { p = realpath(p); - var home = getHomeDir(); + const home = getHomeDir(); if (! home) { return p; } - var relativeToHome = pathRelative(home, p); + const relativeToHome = pathRelative(home, p); if (relativeToHome.substr(0, 3) === ('..' + pathSep)) { return p; } @@ -350,10 +347,10 @@ export const rm_recursive = Profile("files.rm_recursive", (path: string) => { // Returns the base64 SHA256 of the given file. export function fileHash(filename: string) { - var crypto = require('crypto'); - var hash = crypto.createHash('sha256'); + const crypto = require('crypto'); + const hash = crypto.createHash('sha256'); hash.setEncoding('base64'); - var rs = createReadStream(filename); + const rs = createReadStream(filename); return new Promise(function (resolve) { rs.on('end', function () { rs.close(); @@ -422,10 +419,10 @@ export function treeHash(root: string, options: { // it was already created). if it returns false, the item is not a // directory and we couldn't make it one. export function mkdir_p(dir: string, mode: number | null = null) { - var p = pathResolve(dir); - var ps = pathNormalize(p).split(pathSep); + const p = pathResolve(dir); + const ps = pathNormalize(p).split(pathSep); - var stat = statOrNull(p); + const stat = statOrNull(p); if (stat) { return stat.isDirectory(); } @@ -433,8 +430,8 @@ export function mkdir_p(dir: string, mode: number | null = null) { // doesn't exist. recurse to build parent. // Don't use pathJoin here because it can strip off the leading slash // accidentally. - var parentPath = ps.slice(0, -1).join(pathSep); - var success = mkdir_p(parentPath, mode); + const parentPath = ps.slice(0, -1).join(pathSep); + const success = mkdir_p(parentPath, mode); // parent is not a directory. if (! success) { return false; } @@ -604,14 +601,14 @@ export function getPathsInDir(dir: string, options: { cwd); } - var absoluteDir = pathResolve(cwd, dir); + const absoluteDir = pathResolve(cwd, dir); if (! exists(absoluteDir)) { // There are no paths in this dir, so don't do anything return; } - var output = options.output || []; + const output = options.output || []; function pathIsDirectory(path: string) { var stat = lstat(path); @@ -619,8 +616,8 @@ export function getPathsInDir(dir: string, options: { } readdir(absoluteDir).forEach(entry => { - var newPath = pathJoin(dir, entry); - var newAbsPath = pathJoin(absoluteDir, entry); + const newPath = pathJoin(dir, entry); + const newAbsPath = pathJoin(absoluteDir, entry); output.push(newPath); @@ -682,8 +679,10 @@ export function mkdtemp(prefix: string): string { // crappy random. var tries = 3; while (tries > 0) { - var dirPath = pathJoin( - tmpDir, prefix + (Math.random() * 0x100000000 + 1).toString(36)); + const dirPath = pathJoin( + tmpDir, + prefix + (Math.random() * 0x100000000 + 1).toString(36), + ); try { mkdir(dirPath, 0o700); return dirPath; @@ -693,7 +692,7 @@ export function mkdtemp(prefix: string): string { } throw new Error("failed to make temporary directory in " + tmpDir); }; - var dir = make(); + const dir = make(); tempDirs[dir] = true; return dir; } @@ -750,9 +749,8 @@ export function extractTarGz( destPath: string, options: TarOptions = {}, ) { - var options = options || {}; - var parentDir = pathDirname(destPath); - var tempDir = pathJoin(parentDir, '.tmp' + utils.randomToken()); + const parentDir = pathDirname(destPath); + const tempDir = pathJoin(parentDir, '.tmp' + utils.randomToken()); mkdir_p(tempDir); if (! _.has(options, "verbose")) { @@ -772,7 +770,7 @@ export function extractTarGz( promise.await(); // succeed! - var topLevelOfArchive = readdir(tempDir) + const topLevelOfArchive = readdir(tempDir) // On Windows, the 7z.exe tool sometimes creates an auxiliary // PaxHeader directory. .filter(file => ! file.startsWith("PaxHeader")); @@ -782,7 +780,7 @@ export function extractTarGz( "Extracted archive '" + tempDir + "' should only contain one entry"); } - var extractDir = pathJoin(tempDir, topLevelOfArchive[0]); + const extractDir = pathJoin(tempDir, topLevelOfArchive[0]); rename(extractDir, destPath); rm_recursive(tempDir); @@ -898,12 +896,12 @@ function tryExtractWithNpmTar( ) { ensureDirectoryEmpty(tempDir); - var tar = require("tar"); - var zlib = require("zlib"); + const tar = require("tar"); + const zlib = require("zlib"); return new Promise((resolve, reject) => { - var gunzip = zlib.createGunzip().on('error', reject); - var extractor = new tar.Extract({ + const gunzip = zlib.createGunzip().on('error', reject); + const extractor = new tar.Extract({ path: convertToOSPath(tempDir) }).on('entry', function (e: any) { if (process.platform === "win32" || options.forceConvert) { @@ -935,15 +933,15 @@ function addExecBitWhenReadBitPresent(fileMode: number) { // needed. The tar archive will contain a top-level directory named // after dirPath. export function createTarGzStream(dirPath: string) { - var tar = require("tar"); - var fstream = require('fstream'); - var zlib = require("zlib"); + const tar = require("tar"); + const fstream = require('fstream'); + const zlib = require("zlib"); // Create a segment of the file path which we will look for to // identify exactly what we think is a "bin" file (that is, something // which should be expected to work within the context of an // 'npm run-script'). - var binPathMatch = ["", "node_modules", ".bin", ""].join(path.sep); + const binPathMatch = ["", "node_modules", ".bin", ""].join(path.sep); // Don't use `{ path: dirPath, type: 'Directory' }` as an argument to // fstream.Reader. This triggers a collection of odd behaviors in fstream @@ -968,7 +966,7 @@ export function createTarGzStream(dirPath: string) { // with the same permissions as the first file inside it. This manifests as // an EACCESS when untarring if the first file inside the top-level directory // is not writeable. - var fileStream = fstream.Reader({ + const fileStream = fstream.Reader({ path: convertToOSPath(dirPath), filter(entry: any) { if (process.platform !== "win32") { @@ -996,9 +994,10 @@ export function createTarGzStream(dirPath: string) { return true; } }); - var tarStream = fileStream.pipe(tar.Pack({ noProprietary: true })); - return tarStream.pipe(zlib.createGzip()); + return fileStream.pipe(tar.Pack({ + noProprietary: true, + })).pipe(zlib.createGzip()); } // Tar-gzips a directory into a tarball on disk, synchronously. @@ -1006,7 +1005,7 @@ export function createTarGzStream(dirPath: string) { export const createTarball = Profile(function (_: string, tarball: string) { return "files.createTarball " + pathBasename(tarball); }, function (dirPath: string, tarball: string) { - var out = createWriteStream(tarball); + const out = createWriteStream(tarball); new Promise(function (resolve, reject) { out.on('error', reject); out.on('close', resolve); @@ -1100,7 +1099,7 @@ Profile("files.writeFileAtomically", function (filename: string, contents: strin // Do not use this function on Windows, it won't work. export function symlinkOverSync(linkText: string, file: string) { file = pathResolve(file); - var tmpSymlink = pathJoin( + const tmpSymlink = pathJoin( pathDirname(file), "." + pathBasename(file) + ".tmp" + utils.randomToken()); symlink(linkText, tmpSymlink); @@ -1137,7 +1136,7 @@ export function runJavaScript(code: string, { sourceMapRoot?: string; }) { return Profile.time('runJavaScript ' + filename, () => { - var keys: string[] = [], values: any[] = []; + const keys: string[] = [], values: any[] = []; // don't assume that _.keys and _.values are guaranteed to // enumerate in the same order _.each(symbols, function (value: any, name: string) { @@ -1145,31 +1144,31 @@ export function runJavaScript(code: string, { values.push(value); }); - var stackFilename = filename; + let stackFilename = filename; if (sourceMap) { // We want to generate an arbitrary filename that we use to associate the // file with its source map. stackFilename = ""; } - var chunks = []; - var header = "(function(" + keys.join(',') + "){"; + const chunks = []; + const header = "(function(" + keys.join(',') + "){"; chunks.push(header); if (sourceMap) { - var consumer = new sourcemap.SourceMapConsumer(sourceMap); chunks.push(sourcemap.SourceNode.fromStringWithSourceMap( - code, consumer)); + code, new sourcemap.SourceMapConsumer(sourceMap))); } else { chunks.push(code); } // \n is necessary in case final line is a //-comment chunks.push("\n})"); - var wrapped; - var parsedSourceMap = null; + let wrapped; + let parsedSourceMap = null; if (sourceMap) { - var node = new sourcemap.SourceNode(null, null, null, chunks); - var results = node.toStringWithSourceMap({ + const results = new sourcemap.SourceNode( + null, null, null, chunks + ).toStringWithSourceMap({ file: stackFilename }); wrapped = results.code; @@ -1213,7 +1212,7 @@ export function runJavaScript(code: string, { // node to run the code and parse its output. We instead run an // entirely different JS parser, from the Babel project, but // which at least has a nice API for reporting errors. - var parse = require('meteor-babel').parse; + const { parse } = require('meteor-babel'); try { parse(wrapped, { strictMode: false }); } catch (parseError) { @@ -1221,7 +1220,7 @@ export function runJavaScript(code: string, { throw parseError; } - var err = new FancySyntaxError; + const err = new FancySyntaxError; err.message = parseError.message; if (parsedSourceMap) { @@ -1254,9 +1253,9 @@ export function runJavaScript(code: string, { throw nodeParseError; } - var func = script.runInThisContext(); - - return (buildmessage.markBoundary(func)).apply(null, values); + return buildmessage.markBoundary( + script.runInThisContext() + ).apply(null, values); }); } @@ -1361,12 +1360,12 @@ export class KeyValueFile { constructor(public path: string) {} set(k: string, v: any) { - var data = this.readAll() || ''; - var lines = data.split(/\n/); + const data = this.readAll() || ''; + const lines = data.split(/\n/); - var found = false; - for (var i = 0; i < lines.length; i++) { - var trimmed = lines[i].trim(); + let found = false; + for (let i = 0; i < lines.length; i++) { + const trimmed = lines[i].trim(); if (trimmed.indexOf(k + '=') == 0) { lines[i] = k + '=' + v; found = true; @@ -1375,7 +1374,7 @@ export class KeyValueFile { if (!found) { lines.push(k + "=" + v); } - var newdata = lines.join('\n') + '\n'; + const newdata = lines.join('\n') + '\n'; writeFile(this.path, newdata, 'utf8'); } @@ -1432,12 +1431,12 @@ function ensureBatExtension(p: string) { // Windows-only, generates a bat script that calls the destination bat script export function _generateScriptLinkToMeteorScript(scriptLocation: string) { - var scriptLocationIsAbsolutePath = scriptLocation.match(/^\//); - var scriptLocationConverted = scriptLocationIsAbsolutePath + const scriptLocationIsAbsolutePath = scriptLocation.match(/^\//); + const scriptLocationConverted = scriptLocationIsAbsolutePath ? convertToWindowsPath(scriptLocation) : "%~dp0\\" + convertToWindowsPath(scriptLocation); - var newScript = [ + return [ "@echo off", "SETLOCAL", "SET METEOR_INSTALLATION=%~dp0%", @@ -1454,16 +1453,13 @@ export function _generateScriptLinkToMeteorScript(scriptLocation: string) { // by files.readLinkToMeteorScript "rem " + scriptLocationConverted, ].join(os.EOL); - - return newScript; } export function _getLocationFromScriptLinkToMeteorScript(script: string | Buffer) { - var lines = _.compact(script.toString().split('\n')); + const lines = _.compact(script.toString().split('\n')); - var scriptLocation = _.last(lines) - .replace(/^rem /g, ''); - var isAbsolute = true; + let scriptLocation = _.last(lines).replace(/^rem /g, ''); + let isAbsolute = true; if (scriptLocation.match(/^%~dp0/)) { isAbsolute = false; @@ -1486,11 +1482,9 @@ export function linkToMeteorScript( if (platform === 'win32') { // Make a meteor batch script that points to current tool - linkLocation = ensureBatExtension(linkLocation); scriptLocation = ensureBatExtension(scriptLocation); - var script = _generateScriptLinkToMeteorScript(scriptLocation); - + const script = _generateScriptLinkToMeteorScript(scriptLocation); writeFile(linkLocation, script, { encoding: "ascii" }); } else { // Symlink meteor tool @@ -1504,7 +1498,7 @@ export function readLinkToMeteorScript( ) { if (platform === 'win32') { linkLocation = ensureBatExtension(linkLocation); - var script = readFile(linkLocation); + const script = readFile(linkLocation); return _getLocationFromScriptLinkToMeteorScript(script); } else { return readlink(linkLocation); From 2c39986f313dd9aaa731f2f187121040fc931117 Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Thu, 4 Jul 2019 11:59:55 -0400 Subject: [PATCH 136/327] Use a few more import declarations in tools/fs/files. --- tools/fs/files.ts | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/tools/fs/files.ts b/tools/fs/files.ts index 86e9449cff..08383a0ed4 100644 --- a/tools/fs/files.ts +++ b/tools/fs/files.ts @@ -6,13 +6,12 @@ import assert from "assert"; import fs from "fs"; +import path from "path"; +import os from "os"; +import { spawn, execFile } from "child_process"; -// var fs = require("fs"); -const path = require('path'); -const os = require('os'); const _ = require('underscore'); const Fiber = require("fibers"); -const { spawn, execFile } = require("child_process"); const rimraf = require('rimraf'); const sourcemap = require('source-map'); @@ -821,8 +820,10 @@ function tryExtractWithNativeTar( tarProc.on("error", reject); tarProc.on("exit", resolve); - tarProc.stdin.write(buffer); - tarProc.stdin.end(); + if (tarProc.stdin) { + tarProc.stdin.write(buffer); + tarProc.stdin.end(); + } }); } @@ -842,7 +843,7 @@ function tryExtractWithNative7z( const tarGzBasename = "out.tar.gz"; const spawnOptions = { cwd: convertToOSPath(tempDir), - stdio: options.verbose ? "inherit" : "pipe", + stdio: (options.verbose ? "inherit" : "pipe") as ("inherit" | "pipe"), }; writeFile(pathJoin(tempDir, tarGzBasename), buffer); From c8766aee77d0a23acdea338edd662f075fb18227 Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Thu, 4 Jul 2019 12:26:57 -0400 Subject: [PATCH 137/327] Bring back files.withCache, with a different implementation. --- tools/fs/files.ts | 69 +++++++++++++++++++++++++------- tools/isobuild/bundler.js | 4 +- tools/isobuild/compiler.js | 18 +++++---- tools/isobuild/package-source.js | 2 +- 4 files changed, 68 insertions(+), 25 deletions(-) diff --git a/tools/fs/files.ts b/tools/fs/files.ts index 08383a0ed4..b33a1ca20c 100644 --- a/tools/fs/files.ts +++ b/tools/fs/files.ts @@ -9,6 +9,7 @@ import fs from "fs"; import path from "path"; import os from "os"; import { spawn, execFile } from "child_process"; +import { Slot } from "@wry/context"; const _ = require('underscore'); const Fiber = require("fibers"); @@ -43,13 +44,15 @@ import { pathSep, } from "./mini-files"; +const { hasOwnProperty } = Object.prototype; + const parsedSourceMaps: Record = {}; let nextStackFilenameCounter = 1; // Use the source maps specified to runJavaScript function useParsedSourceMap(pathForSourceMap: string) { // Check our fancy source map data structure, used for isopacks - if (_.has(parsedSourceMaps, pathForSourceMap)) { + if (hasOwnProperty.call(parsedSourceMaps, pathForSourceMap)) { return {map: parsedSourceMaps[pathForSourceMap]}; } @@ -752,7 +755,7 @@ export function extractTarGz( const tempDir = pathJoin(parentDir, '.tmp' + utils.randomToken()); mkdir_p(tempDir); - if (! _.has(options, "verbose")) { + if (! hasOwnProperty.call(options, "verbose")) { options.verbose = require("../console/console.js").Console.verbose; } @@ -1574,6 +1577,12 @@ export function readBufferWithLengthAndOffset( // A helpful file to import for this purpose is colon-converter.js, which also // knows how to convert various configuration file formats. +type wrapFsFuncOptions = { + cached?: boolean; + modifyReturnValue?: (result: TResult) => any; + dirty?: (...args: TArgs) => any; +} + function wrapFsFunc< TArgs extends any[], TResult, @@ -1581,10 +1590,7 @@ function wrapFsFunc< >( fn: F, pathArgIndices: number[], - options?: { - modifyReturnValue?: (result: TResult) => any; - dirty?: (...args: TArgs) => any; - }, + options?: wrapFsFuncOptions, ): F { return function wrapper(...args: TArgs) { for (let j = pathArgIndices.length - 1; j >= 0; --j) { @@ -1592,22 +1598,51 @@ function wrapFsFunc< args[i] = convertToOSPath(args[i]); } - const result = fn.apply(fs, args); - - if (! options) { - return result; + let cacheKey: string | null = null; + if (options && options.cached) { + const cache = withCacheSlot.getValue(); + if (cache) { + const strings = [fnName]; + const allStrings = args.every(arg => { + if (typeof arg === "string") { + strings.push(arg); + return true; + } + return false; + }); + if (allStrings) { + cacheKey = JSON.stringify(strings); + if (hasOwnProperty.call(cache, cacheKey)) { + return cache[cacheKey]; + } + } + } } - if (options.dirty) { + const result = fn.apply(fs, args); + + if (options && options.dirty) { options.dirty(...args); } - return options.modifyReturnValue + const finalResult = options && options.modifyReturnValue ? options.modifyReturnValue(result) : result; + + if (cacheKey) { + withCacheSlot.getValue()![cacheKey] = finalResult; + } + + return finalResult; } as F; } +const withCacheSlot = new Slot>(); +export function withCache(fn: () => R): R { + const cache = withCacheSlot.getValue(); + return cache ? fn() : withCacheSlot.withValue(Object.create(null), fn); +} + let dependOnPathSalt = 0; import { wrap } from "optimism"; export const dependOnPath = wrap( @@ -1626,8 +1661,10 @@ function wrapDestructiveFsFunc< >( fn: F, pathArgIndices: number[] = [0], + options?: wrapFsFuncOptions, ): F { return wrapFsFunc(fn, pathArgIndices, { + ...options, dirty(...args: TArgs) { pathArgIndices.forEach(i => dependOnPath.dirty(args[i])); } @@ -1692,10 +1729,12 @@ export const rename = isWindowsLikeFilesystem() ? function (from: string, to: st // Warning: doesn't convert slashes in the second 'cache' arg export const realpath = wrapFsFunc(fs.realpathSync, [0], { - modifyReturnValue: convertToStandardPath + cached: true, + modifyReturnValue: convertToStandardPath, }); export const readdir = wrapFsFunc(fs.readdirSync, [0], { + cached: true, modifyReturnValue(entries: string[]) { return entries.map(convertToStandardPath); }, @@ -1706,13 +1745,13 @@ export const chmod = wrapDestructiveFsFunc(fs.chmodSync); export const close = wrapFsFunc(fs.closeSync, []); export const createReadStream = wrapFsFunc(fs.createReadStream, [0]); export const createWriteStream = wrapFsFunc(fs.createWriteStream, [0]); -export const lstat = wrapFsFunc(fs.lstatSync, [0]); +export const lstat = wrapFsFunc(fs.lstatSync, [0], { cached: true }); export const mkdir = wrapDestructiveFsFunc(fs.mkdirSync); export const open = wrapFsFunc(fs.openSync, [0]); export const read = wrapFsFunc(fs.readSync, []); export const readlink = wrapFsFunc(fs.readlinkSync, [0]); export const rmdir = wrapDestructiveFsFunc(fs.rmdirSync); -export const stat = wrapFsFunc(fs.statSync, [0]); +export const stat = wrapFsFunc(fs.statSync, [0], { cached: true }); export const symlink = wrapFsFunc(fs.symlinkSync, [0, 1]); export const unlink = wrapDestructiveFsFunc(fs.unlinkSync); export const unwatchFile = wrapFsFunc(fs.unwatchFile, [0]); diff --git a/tools/isobuild/bundler.js b/tools/isobuild/bundler.js index 7569c13f75..e32b74708f 100644 --- a/tools/isobuild/bundler.js +++ b/tools/isobuild/bundler.js @@ -3109,7 +3109,9 @@ Find out more about Meteor at meteor.com. * you are testing! */ -exports.bundle = Profile("bundler.bundle", bundle); +exports.bundle = Profile("bundler.bundle", function (options) { + return files.withCache(() => bundle(options)); +}); function bundle({ projectContext, diff --git a/tools/isobuild/compiler.js b/tools/isobuild/compiler.js index 95ba6681fe..051d3930b6 100644 --- a/tools/isobuild/compiler.js +++ b/tools/isobuild/compiler.js @@ -182,15 +182,17 @@ compiler.compile = Profile(function (packageSource, options) { return; } - var unibuildResult = compileUnibuild({ - isopack: isopk, - sourceArch: architecture, - isopackCache: isopackCache, - nodeModulesPath: nodeModulesPath, - }); + files.withCache(() => { + var unibuildResult = compileUnibuild({ + isopack: isopk, + sourceArch: architecture, + isopackCache: isopackCache, + nodeModulesPath: nodeModulesPath, + }); - _.extend(pluginProviderPackageNames, - unibuildResult.pluginProviderPackageNames); + _.extend(pluginProviderPackageNames, + unibuildResult.pluginProviderPackageNames); + }); }); if (options.includePluginProviderPackageMap) { diff --git a/tools/isobuild/package-source.js b/tools/isobuild/package-source.js index e9296c2f92..bc146a7060 100644 --- a/tools/isobuild/package-source.js +++ b/tools/isobuild/package-source.js @@ -1353,7 +1353,7 @@ _.extend(PackageSource.prototype, { return sources; } - return find("", 0, false); + return files.withCache(() => find("", 0, false)); }), _findAssets({ From 0d99790127638e69d3d15aff5ff0b5679743b03a Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Thu, 4 Jul 2019 12:43:46 -0400 Subject: [PATCH 138/327] Add back profiling of files.* functions. --- tools/fs/files.ts | 54 ++++++++++++++++++++++++----------------------- 1 file changed, 28 insertions(+), 26 deletions(-) diff --git a/tools/fs/files.ts b/tools/fs/files.ts index b33a1ca20c..a9c2b860cc 100644 --- a/tools/fs/files.ts +++ b/tools/fs/files.ts @@ -1588,11 +1588,12 @@ function wrapFsFunc< TResult, F extends (...args: TArgs) => TResult, >( + fnName: string, fn: F, pathArgIndices: number[], options?: wrapFsFuncOptions, ): F { - return function wrapper(...args: TArgs) { + return Profile("files." + fnName, function (...args: TArgs) { for (let j = pathArgIndices.length - 1; j >= 0; --j) { const i = pathArgIndices[j]; args[i] = convertToOSPath(args[i]); @@ -1634,7 +1635,7 @@ function wrapFsFunc< } return finalResult; - } as F; + }) as F; } const withCacheSlot = new Slot>(); @@ -1659,11 +1660,12 @@ function wrapDestructiveFsFunc< TResult, F extends (...args: TArgs) => TResult, >( + fnName: string, fn: F, pathArgIndices: number[] = [0], options?: wrapFsFuncOptions, ): F { - return wrapFsFunc(fn, pathArgIndices, { + return wrapFsFunc(fnName, fn, pathArgIndices, { ...options, dirty(...args: TArgs) { pathArgIndices.forEach(i => dependOnPath.dirty(args[i])); @@ -1671,7 +1673,7 @@ function wrapDestructiveFsFunc< }) as F; } -export const readFile = wrapFsFunc(fs.readFileSync, [0], { +export const readFile = wrapFsFunc("readFile", fs.readFileSync, [0], { modifyReturnValue: function (fileData: Buffer | string) { if (_.isString(fileData)) { return convertToStandardLineEndings(fileData); @@ -1683,7 +1685,7 @@ export const readFile = wrapFsFunc(fs.readFileSync, [0], { // Copies a file, which is expected to exist. Parent directories of "to" do not // have to exist. Treats symbolic links transparently (copies the contents, not // the link itself, and it's an error if the link doesn't point to a file). -const wrappedCopyFile = wrapDestructiveFsFunc(fs.copyFileSync, [0, 1]); +const wrappedCopyFile = wrapDestructiveFsFunc("copyFile", fs.copyFileSync, [0, 1]); export function copyFile(from: string, to: string, flags = 0) { mkdir_p(pathDirname(pathResolve(to)), 0o755); wrappedCopyFile(from, to, flags); @@ -1698,7 +1700,7 @@ export function copyFile(from: string, to: string, flags = 0) { } } -const wrappedRename = wrapDestructiveFsFunc(fs.renameSync, [0, 1]); +const wrappedRename = wrapDestructiveFsFunc("rename", fs.renameSync, [0, 1]); export const rename = isWindowsLikeFilesystem() ? function (from: string, to: string) { // Retries are necessary only on Windows, because the rename call can // fail with EBUSY, which means the file is in use. @@ -1728,33 +1730,33 @@ export const rename = isWindowsLikeFilesystem() ? function (from: string, to: st } : wrappedRename; // Warning: doesn't convert slashes in the second 'cache' arg -export const realpath = wrapFsFunc(fs.realpathSync, [0], { +export const realpath = wrapFsFunc("realpath", fs.realpathSync, [0], { cached: true, modifyReturnValue: convertToStandardPath, }); -export const readdir = wrapFsFunc(fs.readdirSync, [0], { +export const readdir = wrapFsFunc("readdir", fs.readdirSync, [0], { cached: true, modifyReturnValue(entries: string[]) { return entries.map(convertToStandardPath); }, }); -export const appendFile = wrapDestructiveFsFunc(fs.appendFileSync); -export const chmod = wrapDestructiveFsFunc(fs.chmodSync); -export const close = wrapFsFunc(fs.closeSync, []); -export const createReadStream = wrapFsFunc(fs.createReadStream, [0]); -export const createWriteStream = wrapFsFunc(fs.createWriteStream, [0]); -export const lstat = wrapFsFunc(fs.lstatSync, [0], { cached: true }); -export const mkdir = wrapDestructiveFsFunc(fs.mkdirSync); -export const open = wrapFsFunc(fs.openSync, [0]); -export const read = wrapFsFunc(fs.readSync, []); -export const readlink = wrapFsFunc(fs.readlinkSync, [0]); -export const rmdir = wrapDestructiveFsFunc(fs.rmdirSync); -export const stat = wrapFsFunc(fs.statSync, [0], { cached: true }); -export const symlink = wrapFsFunc(fs.symlinkSync, [0, 1]); -export const unlink = wrapDestructiveFsFunc(fs.unlinkSync); -export const unwatchFile = wrapFsFunc(fs.unwatchFile, [0]); -export const watchFile = wrapFsFunc(fs.watchFile, [0]); -export const write = wrapFsFunc(fs.writeSync, []); -export const writeFile = wrapDestructiveFsFunc(fs.writeFileSync); +export const appendFile = wrapDestructiveFsFunc("appendFile", fs.appendFileSync); +export const chmod = wrapDestructiveFsFunc("chmod", fs.chmodSync); +export const close = wrapFsFunc("close", fs.closeSync, []); +export const createReadStream = wrapFsFunc("createReadStream", fs.createReadStream, [0]); +export const createWriteStream = wrapFsFunc("createWriteStream", fs.createWriteStream, [0]); +export const lstat = wrapFsFunc("lstat", fs.lstatSync, [0], { cached: true }); +export const mkdir = wrapDestructiveFsFunc("mkdir", fs.mkdirSync); +export const open = wrapFsFunc("open", fs.openSync, [0]); +export const read = wrapFsFunc("read", fs.readSync, []); +export const readlink = wrapFsFunc("readlink", fs.readlinkSync, [0]); +export const rmdir = wrapDestructiveFsFunc("rmdir", fs.rmdirSync); +export const stat = wrapFsFunc("stat", fs.statSync, [0], { cached: true }); +export const symlink = wrapFsFunc("symlink", fs.symlinkSync, [0, 1]); +export const unlink = wrapDestructiveFsFunc("unlink", fs.unlinkSync); +export const unwatchFile = wrapFsFunc("unwatchFile", fs.unwatchFile, [0]); +export const watchFile = wrapFsFunc("watchFile", fs.watchFile, [0]); +export const write = wrapFsFunc("write", fs.writeSync, []); +export const writeFile = wrapDestructiveFsFunc("writeFile", fs.writeFileSync); From 8a409d196c885fa25639783f31aeb4c9584c7277 Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Thu, 4 Jul 2019 14:33:00 -0400 Subject: [PATCH 139/327] Convert mini-files.js to TypeScript. --- tools/fs/README.md | 6 -- tools/fs/files.ts | 4 +- tools/fs/mini-files.js | 1 - tools/isobuild/bundler.js | 2 +- tools/static-assets/README.md | 2 +- tools/static-assets/server/boot.js | 2 +- .../server/{mini-files.js => mini-files.ts} | 69 +++++++++---------- tools/static-assets/server/npm-require.js | 2 +- tools/tests/assets.js | 4 +- tools/utils/processes.js | 2 +- 10 files changed, 43 insertions(+), 51 deletions(-) delete mode 100644 tools/fs/mini-files.js rename tools/static-assets/server/{mini-files.js => mini-files.ts} (64%) diff --git a/tools/fs/README.md b/tools/fs/README.md index 28fc31d980..f139e14e89 100644 --- a/tools/fs/README.md +++ b/tools/fs/README.md @@ -25,12 +25,6 @@ Also `files.pathJoin` instead of `path.join` and others to properly preserve the unixy feel of paths: `/C/Users/IEUser/AppData/Local` instead of `C:\Users\IEUser\AppData\Local`. -### `mini-files` - -Some code is shared between the tool libs (this folder) and the code that gets -copied to a built bundle (`boot.js`). The shared code is stored in -`mini-files.js`. - ## File watching Since node.js doesn't ship a stable library to watch a folder on all diff --git a/tools/fs/files.ts b/tools/fs/files.ts index a9c2b860cc..b97d928144 100644 --- a/tools/fs/files.ts +++ b/tools/fs/files.ts @@ -26,7 +26,7 @@ const colonConverter = require('../utils/colon-converter.js'); const Profile = require('../tool-env/profile.js').Profile; -export * from './mini-files'; +export * from '../static-assets/server/mini-files'; import { convertToOSPath, convertToPosixPath, @@ -42,7 +42,7 @@ import { pathRelative, pathResolve, pathSep, -} from "./mini-files"; +} from "../static-assets/server/mini-files"; const { hasOwnProperty } = Object.prototype; diff --git a/tools/fs/mini-files.js b/tools/fs/mini-files.js deleted file mode 100644 index eb212bb655..0000000000 --- a/tools/fs/mini-files.js +++ /dev/null @@ -1 +0,0 @@ -export * from "../static-assets/server/mini-files.js"; diff --git a/tools/isobuild/bundler.js b/tools/isobuild/bundler.js index e32b74708f..f1871631bb 100644 --- a/tools/isobuild/bundler.js +++ b/tools/isobuild/bundler.js @@ -2715,7 +2715,7 @@ class ServerTarget extends JsImageTarget { "boot-utils.js", "debug.ts", "server-json.js", - "mini-files.js", + "mini-files.ts", "npm-require.js", "npm-rebuild.js", "npm-rebuild-args.js", diff --git a/tools/static-assets/README.md b/tools/static-assets/README.md index 6e3707c578..090b5250d0 100644 --- a/tools/static-assets/README.md +++ b/tools/static-assets/README.md @@ -4,7 +4,7 @@ Files here are designed to be copied to the output destination of a Meteor CLI command. Sometimes, for code sharing, the JS files can be imported by parts of the tool -(like `mini-files.js` - it is shared between built apps and tool). +(like `mini-files.ts` - it is shared between built apps and tool). ## skel - App Skeleton diff --git a/tools/static-assets/server/boot.js b/tools/static-assets/server/boot.js index 80592c7c2f..87d4e4d5c1 100644 --- a/tools/static-assets/server/boot.js +++ b/tools/static-assets/server/boot.js @@ -5,7 +5,7 @@ var Future = require("fibers/future"); var sourcemap_support = require('source-map-support'); var bootUtils = require('./boot-utils.js'); -var files = require('./mini-files.js'); +var files = require('./mini-files'); var npmRequire = require('./npm-require.js').require; var Profile = require('./profile.js').Profile; diff --git a/tools/static-assets/server/mini-files.js b/tools/static-assets/server/mini-files.ts similarity index 64% rename from tools/static-assets/server/mini-files.js rename to tools/static-assets/server/mini-files.ts index 30dff0ca25..39684b361f 100644 --- a/tools/static-assets/server/mini-files.js +++ b/tools/static-assets/server/mini-files.ts @@ -1,5 +1,4 @@ -import * as assert from "assert"; -import * as path from "path"; +import path from "path"; import { release, EOL } from "os"; // All of these functions are attached to files.js for the tool; @@ -18,7 +17,7 @@ export function isWindowsLikeFilesystem() { return process.platform === "win32" || release().indexOf("Microsoft") >= 0; } -export function toPosixPath(p, partialPath) { +export function toPosixPath(p: string, partialPath: boolean = false) { // Sometimes, you can have a path like \Users\IEUser on windows, and this // actually means you want C:\Users\IEUser if (p[0] === "\\" && (! partialPath)) { @@ -36,7 +35,7 @@ export function toPosixPath(p, partialPath) { export const convertToPosixPath = toPosixPath; -export function toDosPath(p, partialPath) { +export function toDosPath(p: string, partialPath: boolean = false) { if (p[0] === '/' && ! partialPath) { if (! /^\/[A-Za-z](\/|$)/.test(p)) throw new Error("Surprising path: " + p); @@ -51,27 +50,25 @@ export function toDosPath(p, partialPath) { export const convertToWindowsPath = toDosPath; -export function convertToOSPath(standardPath, partialPath) { +export function convertToOSPath(standardPath: string, partialPath: boolean = false) { if (process.platform === "win32") { return toDosPath(standardPath, partialPath); } - return standardPath; } -export function convertToStandardPath(osPath, partialPath) { +export function convertToStandardPath(osPath: string, partialPath: boolean = false) { if (process.platform === "win32") { return toPosixPath(osPath, partialPath); } - return osPath; } -export function convertToOSLineEndings(fileContents) { +export function convertToOSLineEndings(fileContents: string) { return fileContents.replace(/\n/g, EOL); } -export function convertToStandardLineEndings(fileContents) { +export function convertToStandardLineEndings(fileContents: string) { // Convert all kinds of end-of-line chars to linuxy "\n". return fileContents.replace(new RegExp("\r\n", "g"), "\n") .replace(new RegExp("\r", "g"), "\n"); @@ -80,43 +77,45 @@ export function convertToStandardLineEndings(fileContents) { // Return the Unicode Normalization Form of the passed in path string, using // "Normalization Form Canonical Composition" -export function unicodeNormalizePath(path) { +export function unicodeNormalizePath(path: string) { return (path) ? path.normalize('NFC') : path; } // wrappings for path functions that always run as they were on unix (using // forward slashes) -export function wrapPathFunction(name, partialPaths) { - const f = path[name]; - assert.strictEqual(typeof f, "function"); - - return function () { +export function wrapPathFunction< + TArgs extends any[], + TResult, + F extends (...args: TArgs) => TResult, +>( + f: F, + partialPath: boolean = false, +): F { + return function wrapper() { if (process.platform === 'win32') { - const args = Array.prototype.map.call( + const result = f.apply(path, Array.prototype.map.call( arguments, // if partialPaths is turned on (for path.join mostly) // forget about conversion of absolute paths for Windows - p => toDosPath(p, partialPaths), - ); - const result = f.apply(path, args); - if (typeof result === "string") { - return toPosixPath(result, partialPaths); - } - return result; - } + p => toDosPath(p, partialPath), + ) as TArgs); - return f.apply(path, arguments); - }; + return typeof result === "string" + ? toPosixPath(result, partialPath) + : result; + } + return f.apply(path, arguments as any); + } as F; } -export const pathJoin = wrapPathFunction("join", true); -export const pathNormalize = wrapPathFunction("normalize"); -export const pathRelative = wrapPathFunction("relative"); -export const pathResolve = wrapPathFunction("resolve"); -export const pathDirname = wrapPathFunction("dirname"); -export const pathBasename = wrapPathFunction("basename"); -export const pathExtname = wrapPathFunction("extname"); -export const pathIsAbsolute = wrapPathFunction("isAbsolute"); +export const pathJoin = wrapPathFunction(path.join, true); +export const pathNormalize = wrapPathFunction(path.normalize); +export const pathRelative = wrapPathFunction(path.relative); +export const pathResolve = wrapPathFunction(path.resolve); +export const pathDirname = wrapPathFunction(path.dirname); +export const pathBasename = wrapPathFunction(path.basename); +export const pathExtname = wrapPathFunction(path.extname); +export const pathIsAbsolute = wrapPathFunction(path.isAbsolute); export const pathSep = '/'; export const pathDelimiter = ':'; export const pathOsDelimiter = path.delimiter; diff --git a/tools/static-assets/server/npm-require.js b/tools/static-assets/server/npm-require.js index a508254124..da0879d933 100644 --- a/tools/static-assets/server/npm-require.js +++ b/tools/static-assets/server/npm-require.js @@ -2,7 +2,7 @@ var assert = require("assert"); var fs = require("fs"); var path = require("path"); var _ = require('underscore'); -var files = require('./mini-files.js'); +var files = require('./mini-files'); var serverJson = require("./server-json.js"); var topLevelIdPattern = /^[^./]/; diff --git a/tools/tests/assets.js b/tools/tests/assets.js index 7774e52fb1..c6c5933978 100644 --- a/tools/tests/assets.js +++ b/tools/tests/assets.js @@ -30,11 +30,11 @@ selftest.define("assets - unicode asset names are allowed", () => { }); // Verify path strings can be Unicode normalized through the -// tools/static-assets/server/mini-files.js#unicodeNormalizePath helper +// tools/static-assets/server/mini-files.ts#unicodeNormalizePath helper selftest.define( "assets - helper exists to unicode normalize path strings", () => { - const files = require('../static-assets/server/mini-files.js'); + const files = require('../static-assets/server/mini-files.ts'); selftest.expectEqual(null, files.unicodeNormalizePath(null)); diff --git a/tools/utils/processes.js b/tools/utils/processes.js index da75000241..ec3c9375af 100644 --- a/tools/utils/processes.js +++ b/tools/utils/processes.js @@ -1,6 +1,6 @@ import _ from 'underscore'; import child_process from 'child_process'; -import files from '../fs/mini-files'; +import files from '../static-assets/server/mini-files'; // The execFileSync function is meant to resemble the similarly-named Node 0.12 // synchronous process creation API, but instead of being fully blocking it From cdd8f32196aa398bf7a15c81466477a7f16cadbc Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Thu, 4 Jul 2019 15:02:26 -0400 Subject: [PATCH 140/327] Update npm to 6.10.0 and pacote to 9.5.1. --- History.md | 4 +++- scripts/build-dev-bundle-common.sh | 2 +- scripts/dev-bundle-tool-package.js | 4 ++-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/History.md b/History.md index c8eb09e2ae..2d208b9899 100644 --- a/History.md +++ b/History.md @@ -11,7 +11,9 @@ N/A * Node has been updated to version [8.16.0](https://nodejs.org/en/blog/release/v8.16.0/). -* The `npm` npm package has been updated to version 6.9.2. +* The `npm` npm package has been updated to version 6.10.0, and our + [fork](https://github.com/meteor/pacote/tree/v9.5.1-meteor) of its + `pacote` dependency has been updated to version 9.5.1. * When bundling client code, the Meteor module system now prefers the `"module"` field in `package.json`, if defined. diff --git a/scripts/build-dev-bundle-common.sh b/scripts/build-dev-bundle-common.sh index 196a759718..032977f695 100644 --- a/scripts/build-dev-bundle-common.sh +++ b/scripts/build-dev-bundle-common.sh @@ -8,7 +8,7 @@ ARCH=$(uname -m) NODE_VERSION=8.16.0 MONGO_VERSION_64BIT=4.0.6 MONGO_VERSION_32BIT=3.2.22 -NPM_VERSION=6.9.2 +NPM_VERSION=6.10.0 # If we built Node from source on Jenkins, this is the build number. NODE_BUILD_NUMBER= diff --git a/scripts/dev-bundle-tool-package.js b/scripts/dev-bundle-tool-package.js index 066722d723..6eed33ebc6 100644 --- a/scripts/dev-bundle-tool-package.js +++ b/scripts/dev-bundle-tool-package.js @@ -10,8 +10,8 @@ var packageJson = { dependencies: { // Explicit dependency because we are replacing it with a bundled version // and we want to make sure there are no dependencies on a higher version - npm: "6.9.2", - pacote: "https://github.com/meteor/pacote/tarball/c5043daa1b768594e01d76275e3854fc19f038f9", + npm: "6.10.0", + pacote: "https://github.com/meteor/pacote/tarball/74fafef8d16c3c5bdf4d3aca5123d49db63680e9", "node-gyp": "5.0.1", "node-pre-gyp": "0.13.0", "meteor-babel": "7.4.18", From 150fc9604029b27effb45bebe5258b39e0e38915 Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Thu, 4 Jul 2019 15:03:15 -0400 Subject: [PATCH 141/327] Bump $BUNDLE_VERSION to 8.16.0.17 before rebuilding dev bundle. --- meteor | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meteor b/meteor index e4a747aa43..9b6c762a0a 100755 --- a/meteor +++ b/meteor @@ -1,6 +1,6 @@ #!/usr/bin/env bash -BUNDLE_VERSION=8.16.0.16 +BUNDLE_VERSION=8.16.0.17 # OS Check. Put here because here is where we download the precompiled # bundles that are arch specific. From c632542a040dbd60cc24857366456dad78418fe8 Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Thu, 4 Jul 2019 15:54:13 -0400 Subject: [PATCH 142/327] Update meteor-babel to version 7.5.0. --- History.md | 12 +- .../.npm/package/npm-shrinkwrap.json | 162 +++++++++++------- packages/babel-compiler/package.js | 2 +- .../modules/.npm/package/npm-shrinkwrap.json | 18 +- packages/modules/package.js | 2 +- scripts/dev-bundle-server-package.js | 4 +- scripts/dev-bundle-tool-package.js | 6 +- 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 +- tools/static-assets/skel/package.json | 2 +- 12 files changed, 125 insertions(+), 91 deletions(-) diff --git a/History.md b/History.md index 2d208b9899..38a5692776 100644 --- a/History.md +++ b/History.md @@ -4,7 +4,12 @@ N/A ### Migration Steps -N/A + +* Be sure to update the `@babel/runtime` npm package to its latest version + (currently 7.5.0): + ```sh + meteor npm install @babel/runtime@latest + ``` ### Changes @@ -34,9 +39,9 @@ N/A * The `mongodb` npm package used by the `npm-mongo` Meteor package has been updated to version 3.2.7. -* The `meteor-babel` npm package has been updated to version 7.4.18. +* The `meteor-babel` npm package has been updated to version 7.5.0. -* The `reify` npm package has been updated to version 0.20.11. +* The `reify` npm package has been updated to version 0.20.12. * The `core-js` npm package used by `ecmascript-runtime-client` and `ecmascript-runtime-server` has been updated to version 3.1.4. @@ -224,7 +229,6 @@ N/A ### Migration Steps * Update the `@babel/runtime` npm package to version 7.0.0 or later: - ```sh meteor npm install @babel/runtime@latest ``` diff --git a/packages/babel-compiler/.npm/package/npm-shrinkwrap.json b/packages/babel-compiler/.npm/package/npm-shrinkwrap.json index ea4da79f7e..3953b145d8 100644 --- a/packages/babel-compiler/.npm/package/npm-shrinkwrap.json +++ b/packages/babel-compiler/.npm/package/npm-shrinkwrap.json @@ -7,9 +7,9 @@ "integrity": "sha512-OfC2uemaknXr87bdLUkWog7nYuliM9Ij5HUcajsVcMCpQrcLmtxRbVFTIqmcSkSeYRBFBRxs2FiUqFJDLdiebA==" }, "@babel/core": { - "version": "7.4.5", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.4.5.tgz", - "integrity": "sha512-OvjIh6aqXtlsA8ujtGKfC7LYWksYSX8yQcM8Ay3LuvVeQ63lcOKgoZWVqcpFwkd29aYU9rVx7jxhfhiEDV9MZA==", + "version": "7.5.0", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.5.0.tgz", + "integrity": "sha512-6Isr4X98pwXqHvtigw71CKgmhL1etZjPs5A67jL/w0TkLM9eqmFR40YrnJvEc1WnMZFsskjsmid8bHZyxKEAnw==", "dependencies": { "json5": { "version": "2.1.0", @@ -19,9 +19,9 @@ } }, "@babel/generator": { - "version": "7.4.4", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.4.4.tgz", - "integrity": "sha512-53UOLK6TVNqKxf7RUh8NE851EHRxOOeVXKbK2bivdb+iziMyk03Sr4eaE9OELCbyZAAafAKPDwF2TPUES5QbxQ==" + "version": "7.5.0", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.5.0.tgz", + "integrity": "sha512-1TTVrt7J9rcG5PMjvO7VEG3FrEoEJNHxumRq66GemPmzboLWtIjjcJgk8rokuAS7IiRSpgVSu5Vb9lc99iJkOA==" }, "@babel/helper-annotate-as-pure": { "version": "7.0.0", @@ -44,9 +44,9 @@ "integrity": "sha512-l79boDFJ8S1c5hvQvG+rc+wHw6IuH7YldmRKsYtpbawsxURu/paVy57FZMomGK22/JckepaikOkY0MoAmdyOlQ==" }, "@babel/helper-create-class-features-plugin": { - "version": "7.4.4", - "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.4.4.tgz", - "integrity": "sha512-UbBHIa2qeAGgyiNR9RszVF7bUHEdgS4JAUNT8SiqrAN6YJVxlOxeLr5pBzb5kan302dejJ9nla4RyKcR1XT6XA==" + "version": "7.5.0", + "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.5.0.tgz", + "integrity": "sha512-EAoMc3hE5vE5LNhMqDOwB1usHvmRjCDAnH8CD4PVkX9/Yr3W/tcz8xE8QvdZxfsFBDICwZnF2UTHIqslRpvxmA==" }, "@babel/helper-define-map": { "version": "7.4.4", @@ -129,19 +129,19 @@ "integrity": "sha512-o9fP1BZLLSrYlxYEYyl2aS+Flun5gtjTIG8iln+XuEzQTs0PLagAGSXUcqruJwD5fM48jzIEggCKpIfWTcR7pQ==" }, "@babel/helpers": { - "version": "7.4.4", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.4.4.tgz", - "integrity": "sha512-igczbR/0SeuPR8RFfC7tGrbdTbFL3QTvH6D+Z6zNxnTe//GyqmtHmDkzrqDmyZ3eSwPqB/LhyKoU5DXsp+Vp2A==" + "version": "7.5.0", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.5.0.tgz", + "integrity": "sha512-EgCUEa8cNwuMrwo87l2d7i2oShi8m2Q58H7h3t4TWtqATZalJYFwfL9DulRe02f3KdqM9xmMCw3v/7Ll+EiaWg==" }, "@babel/highlight": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.0.0.tgz", - "integrity": "sha512-UFMC4ZeFC48Tpvj7C8UgLvtkaUuovQX+5xNWrsIoMG8o2z+XFKjKaN9iVmS84dPwVN00W4wPmqvYoZF3EGAsfw==" + "version": "7.5.0", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.5.0.tgz", + "integrity": "sha512-7dV4eu9gBxoM0dAnj/BCFDW9LFU0zvTrkq0ugM7pnHEgguOEeOz1so2ZghEdzviYzQEED0r4EAgpsBChKy1TRQ==" }, "@babel/parser": { - "version": "7.4.5", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.4.5.tgz", - "integrity": "sha512-9mUqkL1FF5T7f0WDFfAoDdiMVPWsdD1gZYzSnaXsxUCUqzuch/8of9G3VUSNiZmMBoRxT3neyVsqeiL/ZPcjew==" + "version": "7.5.0", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.5.0.tgz", + "integrity": "sha512-I5nW8AhGpOXGCCNYGc+p7ExQIBxRFnS2fd/d862bNOKvmoEPjYPcfIjsfdy0ujagYOIYPczKgD9l3FsgTkAzKA==" }, "@babel/plugin-proposal-async-generator-functions": { "version": "7.2.0", @@ -149,14 +149,14 @@ "integrity": "sha512-+Dfo/SCQqrwx48ptLVGLdE39YtWRuKc/Y9I5Fy0P1DDBB9lsAHpjcEJQt+4IifuSOSTLBKJObJqMvaO1pIE8LQ==" }, "@babel/plugin-proposal-class-properties": { - "version": "7.4.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.4.4.tgz", - "integrity": "sha512-WjKTI8g8d5w1Bc9zgwSz2nfrsNQsXcCf9J9cdCvrJV6RF56yztwm4TmJC0MgJ9tvwO9gUA/mcYe89bLdGfiXFg==" + "version": "7.5.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.5.0.tgz", + "integrity": "sha512-9L/JfPCT+kShiiTTzcnBJ8cOwdKVmlC1RcCf9F0F9tERVrM4iWtWnXtjWCRqNm2la2BxO1MPArWNsU9zsSJWSQ==" }, "@babel/plugin-proposal-object-rest-spread": { - "version": "7.4.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.4.4.tgz", - "integrity": "sha512-dMBG6cSPBbHeEBdFXeQ2QLc5gUpg4Vkaz8octD4aoW/ISO+jBOcsuxYL7bsb5WSu8RLP6boxrBIALEHgoHtO9g==" + "version": "7.5.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.5.0.tgz", + "integrity": "sha512-G1qy5EdcO3vYhbxlXjRSR2SXB8GsxYv9hoRKT1Jdn3qy/NUnFqUUnqymKZ00Pbj+3FXNh06B+BUZzecrp3sxNw==" }, "@babel/plugin-syntax-async-generators": { "version": "7.2.0", @@ -194,9 +194,9 @@ "integrity": "sha512-ER77Cax1+8/8jCB9fo4Ud161OZzWN5qawi4GusDuRLcDbDG+bIGYY20zb2dfAFdTRGzrfq2xZPvF0R64EHnimg==" }, "@babel/plugin-transform-async-to-generator": { - "version": "7.4.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.4.4.tgz", - "integrity": "sha512-YiqW2Li8TXmzgbXw+STsSqPBPFnGviiaSp6CYOq55X8GQ2SGVLrXB6pNid8HkqkZAzOH6knbai3snhP7v0fNwA==" + "version": "7.5.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.5.0.tgz", + "integrity": "sha512-mqvkzwIGkq0bEF1zLRRiTdjfomZJDV33AH3oQzHVGkI2VzEmXLpKKOBvEVaFZBJdN0XTyH38s9j/Kiqr68dggg==" }, "@babel/plugin-transform-block-scoped-functions": { "version": "7.2.0", @@ -219,9 +219,9 @@ "integrity": "sha512-kP/drqTxY6Xt3NNpKiMomfgkNn4o7+vKxK2DDKcBG9sHj51vHqMBGy8wbDS/J4lMxnqs153/T3+DmCEAkC5cpA==" }, "@babel/plugin-transform-destructuring": { - "version": "7.4.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.4.4.tgz", - "integrity": "sha512-/aOx+nW0w8eHiEHm+BTERB2oJn5D127iye/SUQl7NjHy0lf+j7h4MKMMSOwdazGq9OxgiNADncE+SRJkCxjZpQ==" + "version": "7.5.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.5.0.tgz", + "integrity": "sha512-YbYgbd3TryYYLGyC7ZR+Tq8H/+bCmwoaxHfJHupom5ECstzbRLTch6gOQbhEY9Z4hiCNHEURgq06ykFv9JZ/QQ==" }, "@babel/plugin-transform-exponentiation-operator": { "version": "7.2.0", @@ -244,9 +244,9 @@ "integrity": "sha512-2ThDhm4lI4oV7fVQ6pNNK+sx+c/GM5/SaML0w/r4ZB7sAneD/piDJtwdKlNckXeyGK7wlwg2E2w33C/Hh+VFCg==" }, "@babel/plugin-transform-modules-commonjs": { - "version": "7.4.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.4.4.tgz", - "integrity": "sha512-4sfBOJt58sEo9a2BQXnZq+Q3ZTSAUXyK3E30o36BOGnJ+tvJ6YSxF0PG6kERvbeISgProodWuI9UVG3/FMY6iw==" + "version": "7.5.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.5.0.tgz", + "integrity": "sha512-xmHq0B+ytyrWJvQTc5OWAC4ii6Dhr0s22STOoydokG51JjWhyYo5mRPXoi+ZmtHQhZZwuXNN+GG5jy5UZZJxIQ==" }, "@babel/plugin-transform-object-super": { "version": "7.2.0", @@ -279,9 +279,9 @@ "integrity": "sha512-v6S5L/myicZEy+jr6ielB0OR8h+EH/1QFx/YJ7c7Ua+7lqsjj/vW6fD5FR9hB/6y7mGbfT4vAURn3xqBxsUcdg==" }, "@babel/plugin-transform-react-jsx-source": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx-source/-/plugin-transform-react-jsx-source-7.2.0.tgz", - "integrity": "sha512-A32OkKTp4i5U6aE88GwwcuV4HAprUgHcTq0sSafLxjr6AW0QahrCRCjxogkbbcdtpbXkuTOlgpjophCxb6sh5g==" + "version": "7.5.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx-source/-/plugin-transform-react-jsx-source-7.5.0.tgz", + "integrity": "sha512-58Q+Jsy4IDCZx7kqEZuSDdam/1oW8OdDX8f+Loo6xyxdfg1yF0GE2XNJQSTZCaMol93+FBzpWiPEwtbMloAcPg==" }, "@babel/plugin-transform-regenerator": { "version": "7.4.5", @@ -289,9 +289,9 @@ "integrity": "sha512-gBKRh5qAaCWntnd09S8QC7r3auLCqq5DI6O0DlfoyDjslSBVqBibrMdsqO+Uhmx3+BlOmE/Kw1HFxmGbv0N9dA==" }, "@babel/plugin-transform-runtime": { - "version": "7.4.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-runtime/-/plugin-transform-runtime-7.4.4.tgz", - "integrity": "sha512-aMVojEjPszvau3NRg+TIH14ynZLvPewH4xhlCW1w6A3rkxTS1m4uwzRclYR9oS+rl/dr+kT+pzbfHuAWP/lc7Q==" + "version": "7.5.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-runtime/-/plugin-transform-runtime-7.5.0.tgz", + "integrity": "sha512-LmPIZOAgTLl+86gR9KjLXex6P/lRz1fWEjTz6V6QZMmKie51ja3tvzdwORqhHc4RWR8TcZ5pClpRWs0mlaA2ng==" }, "@babel/plugin-transform-shorthand-properties": { "version": "7.2.0", @@ -319,9 +319,9 @@ "integrity": "sha512-2LNhETWYxiYysBtrBTqL8+La0jIoQQnIScUJc74OYvUGRmkskNY4EzLCnjHBzdmb38wqtTaixpo1NctEcvMDZw==" }, "@babel/plugin-transform-typescript": { - "version": "7.4.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.4.5.tgz", - "integrity": "sha512-RPB/YeGr4ZrFKNwfuQRlMf2lxoCUaU01MTw39/OFE/RiL8HDjtn68BwEPft1P7JN4akyEmjGWAMNldOV7o9V2g==" + "version": "7.5.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.5.0.tgz", + "integrity": "sha512-z3T4P70XJFUAHzLtEsmJ37BGVDj+55/KX8W8TBSBF0qk0KLazw8xlwVcRHacxNPgprzTdI4QWW+2eS6bTkQbCA==" }, "@babel/plugin-transform-unicode-regex": { "version": "7.4.4", @@ -339,9 +339,9 @@ "integrity": "sha512-mzMVuIP4lqtn4du2ynEfdO0+RYcslwrZiJHXu4MGaC1ctJiW2fyaeDrtjJGs7R/KebZ1sgowcIoWf4uRpEfKEg==" }, "@babel/runtime": { - "version": "7.4.5", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.4.5.tgz", - "integrity": "sha512-TuI4qpWZP6lGOGIuGWtp9sPluqYICmbk8T/1vpSysqJxRPkudh/ofFWyqdcMsDf2s7KvDL4/YHgKyvcS3g9CJQ==" + "version": "7.5.0", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.5.0.tgz", + "integrity": "sha512-2xsuyZ0R0RBFwjgae5NpXk8FcfH4qovj5cEM5VEeB7KXnKqzaisIu2HSV/mCEISolJJuR4wkViUGYujA8MH9tw==" }, "@babel/template": { "version": "7.4.4", @@ -349,19 +349,19 @@ "integrity": "sha512-CiGzLN9KgAvgZsnivND7rkA+AeJ9JB0ciPOD4U59GKbQP2iQl+olF1l76kJOupqidozfZ32ghwBEJDhnk9MEcw==" }, "@babel/traverse": { - "version": "7.4.5", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.4.5.tgz", - "integrity": "sha512-Vc+qjynwkjRmIFGxy0KYoPj4FdVDxLej89kMHFsWScq999uX+pwcX4v9mWRjW0KcAYTPAuVQl2LKP1wEVLsp+A==" + "version": "7.5.0", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.5.0.tgz", + "integrity": "sha512-SnA9aLbyOCcnnbQEGwdfBggnc142h/rbqqsXcaATj2hZcegCl903pUD/lfpsNBlBSuWow/YDfRyJuWi2EPR5cg==" }, "@babel/types": { - "version": "7.4.4", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.4.4.tgz", - "integrity": "sha512-dOllgYdnEFOebhkKCjzSVFqw/PmmB8pH6RGOWkY4GsboQNd47b1fBThBSwlHAq9alF9vc1M3+6oqR47R50L0tQ==" + "version": "7.5.0", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.5.0.tgz", + "integrity": "sha512-UFpDVqRABKsW01bvw7/wSUe56uy6RXM5+VJibVVAybDGxEW25jdwiFJEf7ASvSaC7sN7rbE/l3cLp2izav+CtQ==" }, "acorn": { - "version": "6.1.1", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.1.1.tgz", - "integrity": "sha512-jPTiwtOxaHNaAPg/dmrJ/beuzLRnXtB0kQPQ8JpotKJgTB6rX6c8mlf315941pyjBSaPg8NHXS9fhP4u17DpGA==" + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.2.0.tgz", + "integrity": "sha512-8oe72N3WPMjA+2zVG71Ia0nXZ8DpQH+QyyHO+p06jT8eg8FGG3FbcUIi8KziHlAfheJQZeoqbvq1mQSQHXKYLw==" }, "acorn-dynamic-import": { "version": "4.0.0", @@ -408,6 +408,11 @@ "resolved": "https://registry.npmjs.org/babel-helper-to-multiple-sequence-expressions/-/babel-helper-to-multiple-sequence-expressions-0.5.0.tgz", "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==" + }, "babel-plugin-minify-builtins": { "version": "0.5.0", "resolved": "https://registry.npmjs.org/babel-plugin-minify-builtins/-/babel-plugin-minify-builtins-0.5.0.tgz", @@ -519,9 +524,9 @@ "integrity": "sha1-viQcqBQEAwZ4t0hxcyK4nQyP4oA=" }, "babel-preset-meteor": { - "version": "7.4.3", - "resolved": "https://registry.npmjs.org/babel-preset-meteor/-/babel-preset-meteor-7.4.3.tgz", - "integrity": "sha512-0nxAvTPAQMMIRM64KcQN3sLgQQSjM41vFZY4lqpAc1vZ9SA3UeYbmMaZ6tqONveiQ09IwTukkVIiAeQd5/mw1Q==" + "version": "7.5.0", + "resolved": "https://registry.npmjs.org/babel-preset-meteor/-/babel-preset-meteor-7.5.0.tgz", + "integrity": "sha512-m1fH7DcIC0Kpe+1e6TSF2TwSC0Raqr7UKyzGGsSWgUjqWhRVJSboStMBeeSdGziJemU7mJqXF7MIrbRRFNGYpQ==" }, "babel-preset-minify": { "version": "0.5.0", @@ -553,6 +558,11 @@ "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==" }, + "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==" + }, "escape-string-regexp": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", @@ -563,6 +573,11 @@ "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.2.tgz", "integrity": "sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs=" }, + "function-bind": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==" + }, "globals": { "version": "11.12.0", "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", @@ -573,6 +588,11 @@ "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=" }, + "has-symbols": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.0.tgz", + "integrity": "sha1-uhqPGvKg/DllD1yFA2dwQSIGO0Q=" + }, "js-tokens": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", @@ -609,9 +629,9 @@ "integrity": "sha512-6QK0OpF/phMz0Q2AxILkX2mFhi7m+WMwTRg0LQKq/WBB0cDP4rYH3Wp4/d3OTXlrPLVJT/RFqj8tFeAR4nk8AA==" }, "meteor-babel": { - "version": "7.4.18", - "resolved": "https://registry.npmjs.org/meteor-babel/-/meteor-babel-7.4.18.tgz", - "integrity": "sha512-7nJgy09paSOMlZFonv2qb6nUOiAtYXcg+fN+v/npZ7ToMPCqaLavzjjPj8PMvw7KxcdSBFw+52YVw6XFKm2zcQ==" + "version": "7.5.0", + "resolved": "https://registry.npmjs.org/meteor-babel/-/meteor-babel-7.5.0.tgz", + "integrity": "sha512-WcodS/EkKn6avgG05Q27nmoj/jo3DLMRQcSHnqzlDa+lvUk9SftW2LL9MK6LJWJQtCuxPFuEd/C8mrVd/T/TXg==" }, "meteor-babel-helpers": { "version": "0.0.3", @@ -628,6 +648,16 @@ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" }, + "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==" + }, "path-parse": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz", @@ -681,9 +711,9 @@ } }, "reify": { - "version": "0.20.11", - "resolved": "https://registry.npmjs.org/reify/-/reify-0.20.11.tgz", - "integrity": "sha512-49cFoN92EJW5t4xAJtvRa5ip5Gnuej7k/iiHIQ0qjWcXUCO3gUJrF/HtJIQg8yaFHPdbO+YKKot3CrjHdMM7rw==" + "version": "0.20.12", + "resolved": "https://registry.npmjs.org/reify/-/reify-0.20.12.tgz", + "integrity": "sha512-4BzKwDWyJJbukwI6xIJRh+BDTitoGzxdgYPiQQ1zbcTZW6I8xgHPw1DnVuEs/mEZQlYm1e09DcFSApb4UaR5bQ==" }, "resolve": { "version": "1.11.1", @@ -706,9 +736,9 @@ "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=" }, "sourcemap-codec": { - "version": "1.4.4", - "resolved": "https://registry.npmjs.org/sourcemap-codec/-/sourcemap-codec-1.4.4.tgz", - "integrity": "sha512-CYAPYdBu34781kLHkaW3m6b/uUSyMOC2R61gcYMWooeuaGtjof86ZA/8T+qVPPt7np1085CR9hmMGrySwEc8Xg==" + "version": "1.4.6", + "resolved": "https://registry.npmjs.org/sourcemap-codec/-/sourcemap-codec-1.4.6.tgz", + "integrity": "sha512-1ZooVLYFxC448piVLBbtOxFcXwnymH9oUF8nRd3CuYDVvkRBxRl6pB4Mtas5a4drtL+E8LDgFkQNcgIw6tc8Hg==" }, "supports-color": { "version": "5.5.0", diff --git a/packages/babel-compiler/package.js b/packages/babel-compiler/package.js index fb13083477..2264f4ef30 100644 --- a/packages/babel-compiler/package.js +++ b/packages/babel-compiler/package.js @@ -10,7 +10,7 @@ Package.describe({ }); Npm.depends({ - 'meteor-babel': '7.4.18', + 'meteor-babel': '7.5.0', 'json5': '2.1.0' }); diff --git a/packages/modules/.npm/package/npm-shrinkwrap.json b/packages/modules/.npm/package/npm-shrinkwrap.json index 3a9accd7c4..2a2dad5abb 100644 --- a/packages/modules/.npm/package/npm-shrinkwrap.json +++ b/packages/modules/.npm/package/npm-shrinkwrap.json @@ -2,9 +2,9 @@ "lockfileVersion": 1, "dependencies": { "acorn": { - "version": "6.1.1", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.1.1.tgz", - "integrity": "sha512-jPTiwtOxaHNaAPg/dmrJ/beuzLRnXtB0kQPQ8JpotKJgTB6rX6c8mlf315941pyjBSaPg8NHXS9fhP4u17DpGA==" + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.2.0.tgz", + "integrity": "sha512-8oe72N3WPMjA+2zVG71Ia0nXZ8DpQH+QyyHO+p06jT8eg8FGG3FbcUIi8KziHlAfheJQZeoqbvq1mQSQHXKYLw==" }, "acorn-dynamic-import": { "version": "4.0.0", @@ -22,9 +22,9 @@ "integrity": "sha1-8uXZ+HlvvS6JAQI9dpnlsgLqn7A=" }, "reify": { - "version": "0.20.11", - "resolved": "https://registry.npmjs.org/reify/-/reify-0.20.11.tgz", - "integrity": "sha512-49cFoN92EJW5t4xAJtvRa5ip5Gnuej7k/iiHIQ0qjWcXUCO3gUJrF/HtJIQg8yaFHPdbO+YKKot3CrjHdMM7rw==" + "version": "0.20.12", + "resolved": "https://registry.npmjs.org/reify/-/reify-0.20.12.tgz", + "integrity": "sha512-4BzKwDWyJJbukwI6xIJRh+BDTitoGzxdgYPiQQ1zbcTZW6I8xgHPw1DnVuEs/mEZQlYm1e09DcFSApb4UaR5bQ==" }, "semver": { "version": "5.7.0", @@ -32,9 +32,9 @@ "integrity": "sha512-Ya52jSX2u7QKghxeoFGpLwCtGlt7j0oY9DYb5apt9nPlJ42ID+ulTXESnt/qAQcoSERyZ5sl3LDIOw0nAn/5DA==" }, "sourcemap-codec": { - "version": "1.4.4", - "resolved": "https://registry.npmjs.org/sourcemap-codec/-/sourcemap-codec-1.4.4.tgz", - "integrity": "sha512-CYAPYdBu34781kLHkaW3m6b/uUSyMOC2R61gcYMWooeuaGtjof86ZA/8T+qVPPt7np1085CR9hmMGrySwEc8Xg==" + "version": "1.4.6", + "resolved": "https://registry.npmjs.org/sourcemap-codec/-/sourcemap-codec-1.4.6.tgz", + "integrity": "sha512-1ZooVLYFxC448piVLBbtOxFcXwnymH9oUF8nRd3CuYDVvkRBxRl6pB4Mtas5a4drtL+E8LDgFkQNcgIw6tc8Hg==" } } } diff --git a/packages/modules/package.js b/packages/modules/package.js index 7029fb6cc9..d25f81a182 100644 --- a/packages/modules/package.js +++ b/packages/modules/package.js @@ -6,7 +6,7 @@ Package.describe({ }); Npm.depends({ - reify: "0.20.11", + reify: "0.20.12", "meteor-babel-helpers": "0.0.3" }); diff --git a/scripts/dev-bundle-server-package.js b/scripts/dev-bundle-server-package.js index fd60d1505b..41a15d86db 100644 --- a/scripts/dev-bundle-server-package.js +++ b/scripts/dev-bundle-server-package.js @@ -13,8 +13,8 @@ var packageJson = { fibers: "3.1.1", "meteor-promise": "0.8.7", promise: "8.0.2", - reify: "0.20.11", - "@babel/parser": "7.4.5", + reify: "0.20.12", + "@babel/parser": "7.5.0", // Not yet upgrading Underscore from 1.5.2 to 1.7.0 (which should be done // in the package too) because we should consider using lodash instead // (and there are backwards-incompatible changes either way). diff --git a/scripts/dev-bundle-tool-package.js b/scripts/dev-bundle-tool-package.js index 6eed33ebc6..80351198a5 100644 --- a/scripts/dev-bundle-tool-package.js +++ b/scripts/dev-bundle-tool-package.js @@ -14,14 +14,14 @@ var packageJson = { pacote: "https://github.com/meteor/pacote/tarball/74fafef8d16c3c5bdf4d3aca5123d49db63680e9", "node-gyp": "5.0.1", "node-pre-gyp": "0.13.0", - "meteor-babel": "7.4.18", + "meteor-babel": "7.5.0", // Keep the versions of these packages consistent with the versions // found in dev-bundle-server-package.js. "meteor-promise": "0.8.7", - reify: "0.20.11", + reify: "0.20.12", fibers: "3.1.1", // So that Babel can emit require("@babel/runtime/helpers/...") calls. - "@babel/runtime": "7.4.4", + "@babel/runtime": "7.5.0", // For backwards compatibility with isopackets that still depend on // babel-runtime rather than @babel/runtime. "babel-runtime": "7.0.0-beta.3", diff --git a/tools/static-assets/skel-bare/package.json b/tools/static-assets/skel-bare/package.json index e30b425396..3dc43d00b4 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.3.4", + "@babel/runtime": "^7.5.0", "meteor-node-stubs": "^0.4.1" } } diff --git a/tools/static-assets/skel-full/package.json b/tools/static-assets/skel-full/package.json index c2a6c53200..fd4d441b11 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.3.4", + "@babel/runtime": "^7.5.0", "meteor-node-stubs": "^0.4.1" }, "devDependencies": { diff --git a/tools/static-assets/skel-minimal/package.json b/tools/static-assets/skel-minimal/package.json index 035cf4e410..6c07cd1d1d 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.3.4", + "@babel/runtime": "^7.5.0", "meteor-node-stubs": "^0.4.1" }, "meteor": { diff --git a/tools/static-assets/skel-react/package.json b/tools/static-assets/skel-react/package.json index 28c59f73eb..a4bb11df78 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.3.4", + "@babel/runtime": "^7.5.0", "meteor-node-stubs": "^0.4.1", "react": "^16.5.0", "react-dom": "^16.5.0" diff --git a/tools/static-assets/skel/package.json b/tools/static-assets/skel/package.json index 035cf4e410..6c07cd1d1d 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.3.4", + "@babel/runtime": "^7.5.0", "meteor-node-stubs": "^0.4.1" }, "meteor": { From c1520052f50427fa342e3dd2e5d4a718aedd4196 Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Thu, 4 Jul 2019 15:58:01 -0400 Subject: [PATCH 143/327] Bump $BUNDLE_VERSION to 8.16.0.18 before rebuilding dev bundle. --- meteor | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meteor b/meteor index 9b6c762a0a..99bc288c9c 100755 --- a/meteor +++ b/meteor @@ -1,6 +1,6 @@ #!/usr/bin/env bash -BUNDLE_VERSION=8.16.0.17 +BUNDLE_VERSION=8.16.0.18 # OS Check. Put here because here is where we download the precompiled # bundles that are arch specific. From 146e6ba1d425ec6b97f50c988b735a0b5652129d Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Thu, 4 Jul 2019 16:04:23 -0400 Subject: [PATCH 144/327] Update @babel/{runtime,...} dependencies of modules test app. --- tools/tests/apps/modules/package-lock.json | 174 +++++++++++---------- tools/tests/apps/modules/package.json | 6 +- 2 files changed, 93 insertions(+), 87 deletions(-) diff --git a/tools/tests/apps/modules/package-lock.json b/tools/tests/apps/modules/package-lock.json index e2de6d95fe..275ab1032b 100644 --- a/tools/tests/apps/modules/package-lock.json +++ b/tools/tests/apps/modules/package-lock.json @@ -12,17 +12,17 @@ } }, "@babel/core": { - "version": "7.4.5", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.4.5.tgz", - "integrity": "sha512-OvjIh6aqXtlsA8ujtGKfC7LYWksYSX8yQcM8Ay3LuvVeQ63lcOKgoZWVqcpFwkd29aYU9rVx7jxhfhiEDV9MZA==", + "version": "7.5.0", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.5.0.tgz", + "integrity": "sha512-6Isr4X98pwXqHvtigw71CKgmhL1etZjPs5A67jL/w0TkLM9eqmFR40YrnJvEc1WnMZFsskjsmid8bHZyxKEAnw==", "requires": { "@babel/code-frame": "^7.0.0", - "@babel/generator": "^7.4.4", - "@babel/helpers": "^7.4.4", - "@babel/parser": "^7.4.5", + "@babel/generator": "^7.5.0", + "@babel/helpers": "^7.5.0", + "@babel/parser": "^7.5.0", "@babel/template": "^7.4.4", - "@babel/traverse": "^7.4.5", - "@babel/types": "^7.4.4", + "@babel/traverse": "^7.5.0", + "@babel/types": "^7.5.0", "convert-source-map": "^1.1.0", "debug": "^4.1.0", "json5": "^2.1.0", @@ -33,11 +33,11 @@ } }, "@babel/generator": { - "version": "7.4.4", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.4.4.tgz", - "integrity": "sha512-53UOLK6TVNqKxf7RUh8NE851EHRxOOeVXKbK2bivdb+iziMyk03Sr4eaE9OELCbyZAAafAKPDwF2TPUES5QbxQ==", + "version": "7.5.0", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.5.0.tgz", + "integrity": "sha512-1TTVrt7J9rcG5PMjvO7VEG3FrEoEJNHxumRq66GemPmzboLWtIjjcJgk8rokuAS7IiRSpgVSu5Vb9lc99iJkOA==", "requires": { - "@babel/types": "^7.4.4", + "@babel/types": "^7.5.0", "jsesc": "^2.5.1", "lodash": "^4.17.11", "source-map": "^0.5.0", @@ -92,19 +92,19 @@ } }, "@babel/helpers": { - "version": "7.4.4", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.4.4.tgz", - "integrity": "sha512-igczbR/0SeuPR8RFfC7tGrbdTbFL3QTvH6D+Z6zNxnTe//GyqmtHmDkzrqDmyZ3eSwPqB/LhyKoU5DXsp+Vp2A==", + "version": "7.5.0", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.5.0.tgz", + "integrity": "sha512-EgCUEa8cNwuMrwo87l2d7i2oShi8m2Q58H7h3t4TWtqATZalJYFwfL9DulRe02f3KdqM9xmMCw3v/7Ll+EiaWg==", "requires": { "@babel/template": "^7.4.4", - "@babel/traverse": "^7.4.4", - "@babel/types": "^7.4.4" + "@babel/traverse": "^7.5.0", + "@babel/types": "^7.5.0" } }, "@babel/highlight": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.0.0.tgz", - "integrity": "sha512-UFMC4ZeFC48Tpvj7C8UgLvtkaUuovQX+5xNWrsIoMG8o2z+XFKjKaN9iVmS84dPwVN00W4wPmqvYoZF3EGAsfw==", + "version": "7.5.0", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.5.0.tgz", + "integrity": "sha512-7dV4eu9gBxoM0dAnj/BCFDW9LFU0zvTrkq0ugM7pnHEgguOEeOz1so2ZghEdzviYzQEED0r4EAgpsBChKy1TRQ==", "requires": { "chalk": "^2.0.0", "esutils": "^2.0.2", @@ -112,14 +112,14 @@ } }, "@babel/parser": { - "version": "7.4.5", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.4.5.tgz", - "integrity": "sha512-9mUqkL1FF5T7f0WDFfAoDdiMVPWsdD1gZYzSnaXsxUCUqzuch/8of9G3VUSNiZmMBoRxT3neyVsqeiL/ZPcjew==" + "version": "7.5.0", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.5.0.tgz", + "integrity": "sha512-I5nW8AhGpOXGCCNYGc+p7ExQIBxRFnS2fd/d862bNOKvmoEPjYPcfIjsfdy0ujagYOIYPczKgD9l3FsgTkAzKA==" }, "@babel/plugin-proposal-do-expressions": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-do-expressions/-/plugin-proposal-do-expressions-7.2.0.tgz", - "integrity": "sha512-2bWN48zQHf/W5T8XvemGQJSi8hzhIo7y4kv/RiA08UcMLQ73lkTknhlaFGf1HjCJzG8FGopgsq6pSe1C+10fPg==", + "version": "7.5.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-do-expressions/-/plugin-proposal-do-expressions-7.5.0.tgz", + "integrity": "sha512-xe0QQrhm+DGj6H23a6XtwkJNimy1fo71O/YVBfrfvfSl0fsq9T9dfoQBIY4QceEIdUo7u9s7OPEdsWEuizfGeg==", "requires": { "@babel/helper-plugin-utils": "^7.0.0", "@babel/plugin-syntax-do-expressions": "^7.2.0" @@ -151,9 +151,9 @@ } }, "@babel/runtime": { - "version": "7.4.5", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.4.5.tgz", - "integrity": "sha512-TuI4qpWZP6lGOGIuGWtp9sPluqYICmbk8T/1vpSysqJxRPkudh/ofFWyqdcMsDf2s7KvDL4/YHgKyvcS3g9CJQ==", + "version": "7.5.0", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.5.0.tgz", + "integrity": "sha512-2xsuyZ0R0RBFwjgae5NpXk8FcfH4qovj5cEM5VEeB7KXnKqzaisIu2HSV/mCEISolJJuR4wkViUGYujA8MH9tw==", "requires": { "regenerator-runtime": "^0.13.2" }, @@ -176,25 +176,25 @@ } }, "@babel/traverse": { - "version": "7.4.5", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.4.5.tgz", - "integrity": "sha512-Vc+qjynwkjRmIFGxy0KYoPj4FdVDxLej89kMHFsWScq999uX+pwcX4v9mWRjW0KcAYTPAuVQl2LKP1wEVLsp+A==", + "version": "7.5.0", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.5.0.tgz", + "integrity": "sha512-SnA9aLbyOCcnnbQEGwdfBggnc142h/rbqqsXcaATj2hZcegCl903pUD/lfpsNBlBSuWow/YDfRyJuWi2EPR5cg==", "requires": { "@babel/code-frame": "^7.0.0", - "@babel/generator": "^7.4.4", + "@babel/generator": "^7.5.0", "@babel/helper-function-name": "^7.1.0", "@babel/helper-split-export-declaration": "^7.4.4", - "@babel/parser": "^7.4.5", - "@babel/types": "^7.4.4", + "@babel/parser": "^7.5.0", + "@babel/types": "^7.5.0", "debug": "^4.1.0", "globals": "^11.1.0", "lodash": "^4.17.11" } }, "@babel/types": { - "version": "7.4.4", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.4.4.tgz", - "integrity": "sha512-dOllgYdnEFOebhkKCjzSVFqw/PmmB8pH6RGOWkY4GsboQNd47b1fBThBSwlHAq9alF9vc1M3+6oqR47R50L0tQ==", + "version": "7.5.0", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.5.0.tgz", + "integrity": "sha512-UFpDVqRABKsW01bvw7/wSUe56uy6RXM5+VJibVVAybDGxEW25jdwiFJEf7ASvSaC7sN7rbE/l3cLp2izav+CtQ==", "requires": { "esutils": "^2.0.2", "lodash": "^4.17.11", @@ -232,11 +232,17 @@ "resolved": "https://registry.npmjs.org/@terebentina/react-popover/-/react-popover-2.0.0.tgz", "integrity": "sha1-RqRgUqiJ1CNkbaoQV7uweHnRmQg=" }, + "@types/node": { + "version": "12.0.12", + "resolved": "https://registry.npmjs.org/@types/node/-/node-12.0.12.tgz", + "integrity": "sha512-Uy0PN4R5vgBUXFoJrKryf5aTk3kJ8Rv3PdlHjl6UaX+Cqp1QE0yPQ68MPXGrZOfG7gZVNDIJZYyot0B9ubXUrQ==" + }, "@wry/context": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/@wry/context/-/context-0.4.0.tgz", - "integrity": "sha512-rVjwzFjVYXJ8pWJ8ZRCHv6meOebQvfTlvnUYUNX93Ce0KNeMTqCkf0GiOJc6BNVB96s7qfvwoLN3nUgDnSFOOg==", + "version": "0.4.4", + "resolved": "https://registry.npmjs.org/@wry/context/-/context-0.4.4.tgz", + "integrity": "sha512-LrKVLove/zw6h2Md/KZyWxIkFM6AoyKp71OqpH9Hiip1csjPVoD3tPxlbQUNxEnHENks3UGgNpSBCAfq9KWuag==", "requires": { + "@types/node": ">=6", "tslib": "^1.9.3" } }, @@ -244,9 +250,9 @@ "version": "file:imports/links/acorn" }, "agent-base": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-4.2.1.tgz", - "integrity": "sha512-JVwXMr9nHYTUXsBFKUqhJwvlcYU/blreOEUkhNR2eXZIvwd+c+o5V4MgDPKWnMS/56awN3TRzIP+KoPn+roQtg==", + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-4.3.0.tgz", + "integrity": "sha512-salcGninV0nPrwpGNn4VTXBb1SOuXQBiqbrNXoeizJsHrsL6ERFM2Ne3JUSBWRE6aeNJI2ROP/WEEIDUiDe3cg==", "requires": { "es6-promisify": "^5.0.0" } @@ -275,9 +281,9 @@ "integrity": "sha512-jp/uFnooOiO+L211eZOoSyzpOITMXx1rBITauYykG3BRYPu8h0UcxsPNB04RR5vo4Tyz3+ay17tR6JVf9qzYWg==" }, "aws-sdk": { - "version": "2.437.0", - "resolved": "https://registry.npmjs.org/aws-sdk/-/aws-sdk-2.437.0.tgz", - "integrity": "sha512-sDZb5QBOO6FOMvuKDEdO16YQRk0WUhnQd38EaSt0yUCi4Gev8uypODyYONgODZcXe8Cr1GMwC8scUKr00S/I5w==", + "version": "2.488.0", + "resolved": "https://registry.npmjs.org/aws-sdk/-/aws-sdk-2.488.0.tgz", + "integrity": "sha512-9AP48tyF1E5+x1CKeiRlj0Sv1YF7KI0BdSW9JP8x3ClhPWNUHjDYNH2OwsALuG1BloeY2ZigYqfI2fB7g3rNHQ==", "requires": { "buffer": "4.9.1", "events": "1.1.1", @@ -335,9 +341,9 @@ "integrity": "sha1-rHMCDApZu3nrF8LOLbd/d9l04BM=" }, "bignumber.js": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-4.1.0.tgz", - "integrity": "sha512-eJzYkFYy9L4JzXsbymsFn3p54D+llV27oTQ+ziJG7WFRheJcNZilgVXMG0LoZtlQSKBsJdWtLFqOD0u+U0jZKA==" + "version": "7.2.1", + "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-7.2.1.tgz", + "integrity": "sha512-S4XzBk5sMB+Rcb/LNcpzXr57VRTxgAvaAEDAl1AwRx27j00hT84O6OkteE7u8UB3NuaaygCRrEpqox4uDOrbdQ==" }, "bl": { "version": "1.2.2", @@ -525,9 +531,9 @@ "integrity": "sha1-0uMJ0fIjsHGGSINaz1uII6gGH4o=" }, "es6-promise": { - "version": "4.2.6", - "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-4.2.6.tgz", - "integrity": "sha512-aRVgGdnmW2OiySVPUC9e6m+plolMAJKjZnQlCwNSuK5yQ0JN61DZSO1X1Ufd1foqWRAlig0rhduTCHe7sVtK5Q==" + "version": "4.2.8", + "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-4.2.8.tgz", + "integrity": "sha512-HJDGx5daxeIvxdBxvG2cb9g4tEvwIk3i8+nhX0yGrYmZUzbkdg8QbDevheDB8gd0//uPj4c1EQua8Q+MViT0/w==" }, "es6-promisify": { "version": "5.0.0", @@ -642,9 +648,9 @@ } }, "glob": { - "version": "7.1.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz", - "integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==", + "version": "7.1.4", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.4.tgz", + "integrity": "sha512-hkLPepehmnKk41pUGm3sYxoFs/umurYfYJCerbXEyFIWcAzvpipAgVkBqqT9RBKMGjnq6kMuyYwha6csxbiM1A==", "requires": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", @@ -660,9 +666,9 @@ "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==" }, "graphql": { - "version": "14.3.1", - "resolved": "https://registry.npmjs.org/graphql/-/graphql-14.3.1.tgz", - "integrity": "sha512-FZm7kAa3FqKdXy8YSSpAoTtyDFMIYSpCDOr+3EqlI1bxmtHu+Vv/I2vrSeT1sBOEnEniX3uo4wFhFdS/8XN6gA==", + "version": "14.4.2", + "resolved": "https://registry.npmjs.org/graphql/-/graphql-14.4.2.tgz", + "integrity": "sha512-6uQadiRgnpnSS56hdZUSvFrVcQ6OF9y6wkxJfKquFtHlnl7+KSuWwSJsdwiK1vybm1HgcdbpGkCpvhvsVQ0UZQ==", "requires": { "iterall": "^1.2.2" } @@ -748,9 +754,9 @@ } }, "inherits": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", - "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" }, "invariant": { "version": "2.2.4", @@ -1543,9 +1549,9 @@ "integrity": "sha512-bV7f+6l2QigeBBZSM/6yTNq4P2fNpSWj/0e7jQcy87A8e7o2nAfP/34/2ky5Vw4B9S446EtIhodAzkFCcR4dQg==" }, "ms": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", - "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==" + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" }, "mssql": { "version": "3.3.0", @@ -1558,11 +1564,11 @@ } }, "mysql": { - "version": "2.16.0", - "resolved": "https://registry.npmjs.org/mysql/-/mysql-2.16.0.tgz", - "integrity": "sha512-dPbN2LHonQp7D5ja5DJXNbCLe/HRdu+f3v61aguzNRQIrmZLOeRoymBYyeThrR6ug+FqzDL95Gc9maqZUJS+Gw==", + "version": "2.17.1", + "resolved": "https://registry.npmjs.org/mysql/-/mysql-2.17.1.tgz", + "integrity": "sha512-7vMqHQ673SAk5C8fOzTG2LpPcf3bNt0oL3sFpxPEEFp1mdlDcrLK0On7z8ZYKaaHrHwNcQ/MTUz7/oobZ2OyyA==", "requires": { - "bignumber.js": "4.1.0", + "bignumber.js": "7.2.1", "readable-stream": "2.3.6", "safe-buffer": "5.1.2", "sqlstring": "2.3.1" @@ -1634,9 +1640,9 @@ "integrity": "sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==" }, "process-nextick-args": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.0.tgz", - "integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw==" + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", + "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==" }, "progress": { "version": "2.0.3", @@ -1672,9 +1678,9 @@ "integrity": "sha1-llOgNvt8HuQjQvIyXM7v6jkmxI0=" }, "puppeteer": { - "version": "1.14.0", - "resolved": "https://registry.npmjs.org/puppeteer/-/puppeteer-1.14.0.tgz", - "integrity": "sha512-SayS2wUX/8LF8Yo2Rkpc5nkAu4Jg3qu+OLTDSOZtisVQMB2Z5vjlY2TdPi/5CgZKiZroYIiyUN3sRX63El9iaw==", + "version": "1.18.1", + "resolved": "https://registry.npmjs.org/puppeteer/-/puppeteer-1.18.1.tgz", + "integrity": "sha512-luUy0HPSuWPsPZ1wAp6NinE0zgetWtudf5zwZ6dHjMWfYpTQcmKveFRox7VBNhQ98OjNA9PQ9PzQyX8k/KrxTg==", "requires": { "debug": "^4.1.0", "extract-zip": "^1.6.6", @@ -1687,9 +1693,9 @@ }, "dependencies": { "mime": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/mime/-/mime-2.4.2.tgz", - "integrity": "sha512-zJBfZDkwRu+j3Pdd2aHsR5GfH2jIWhmL1ZzBoc+X+3JEti2hbArWcyJ+1laC1D2/U/W1a/+Cegj0/OnEU2ybjg==" + "version": "2.4.4", + "resolved": "https://registry.npmjs.org/mime/-/mime-2.4.4.tgz", + "integrity": "sha512-LRxmNwziLPT828z+4YkNzloCFC2YM4wrB99k+AV5ZbEyfGNWfG8SO1FUXLmLDBSo89NrJZ4DIWeLjy1CHGhMGA==" } } }, @@ -2055,9 +2061,9 @@ "integrity": "sha512-tdzBRDGWcI1OpPVmChbdSKhvSVurznZ8X36AYURAcl+0o2ldlCY2XPzyXNNxwJwwyIU+rIglTCG4kxtNKBQH7Q==" }, "tslib": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.9.3.tgz", - "integrity": "sha512-4krF8scpejhaOgqzBEcGM7yDIEfi0/8+8zDRZhNZZ2kjmHJ4hv3zCbQWxoJGz1iw5U0Jl0nma13xzHXcncMavQ==" + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.10.0.tgz", + "integrity": "sha512-qOebF53frne81cf0S9B41ByenJ3/IuH8yJKngAX35CmiZySA0khhkovshKK+jGCaMnVomla7gVlIcc3EvKPbTQ==" }, "typedarray": { "version": "0.0.6", @@ -2065,9 +2071,9 @@ "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=" }, "ua-parser-js": { - "version": "0.7.19", - "resolved": "https://registry.npmjs.org/ua-parser-js/-/ua-parser-js-0.7.19.tgz", - "integrity": "sha512-T3PVJ6uz8i0HzPxOF9SWzWAlfN/DavlpQqepn22xgve/5QecC+XMCAtmUNnY7C9StehaV6exjUCI801lOI7QlQ==" + "version": "0.7.20", + "resolved": "https://registry.npmjs.org/ua-parser-js/-/ua-parser-js-0.7.20.tgz", + "integrity": "sha512-8OaIKfzL5cpx8eCMAhhvTlft8GYF8b2eQr6JkCyVdrgjcytyOmPCXrqXFcUnhonRpLlh5yxEZVohm6mzaowUOw==" }, "unherit": { "version": "1.1.2", diff --git a/tools/tests/apps/modules/package.json b/tools/tests/apps/modules/package.json index abab3b49eb..80206d0fdb 100644 --- a/tools/tests/apps/modules/package.json +++ b/tools/tests/apps/modules/package.json @@ -4,10 +4,10 @@ "description": "Test app exercising many aspects of the Meteor module system.", "private": true, "dependencies": { - "@babel/core": "^7.4.5", - "@babel/plugin-proposal-do-expressions": "^7.2.0", + "@babel/core": "^7.5.0", + "@babel/plugin-proposal-do-expressions": "^7.5.0", "@babel/plugin-proposal-optional-chaining": "^7.2.0", - "@babel/runtime": "^7.4.5", + "@babel/runtime": "^7.5.0", "@polymer/lit-element": "0.7.1", "@wry/context": "^0.4.0", "acorn": "file:imports/links/acorn", From 6d24ab52937ea301cb811efd30f487f4f379a971 Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Thu, 4 Jul 2019 16:11:10 -0400 Subject: [PATCH 145/327] Update all dependencies of dynamic-import test app. --- .../apps/dynamic-import/package-lock.json | 702 +++++++----------- tools/tests/apps/dynamic-import/package.json | 22 +- 2 files changed, 273 insertions(+), 451 deletions(-) diff --git a/tools/tests/apps/dynamic-import/package-lock.json b/tools/tests/apps/dynamic-import/package-lock.json index c31f939fd4..b282feb653 100644 --- a/tools/tests/apps/dynamic-import/package-lock.json +++ b/tools/tests/apps/dynamic-import/package-lock.json @@ -4,29 +4,36 @@ "lockfileVersion": 1, "dependencies": { "@babel/runtime": { - "version": "7.1.2", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.1.2.tgz", - "integrity": "sha512-Y3SCjmhSupzFB6wcv1KmmFucH6gDVnI30WjOcicV10ju0cZjak3Jcs67YLIXBrmZYw1xCrVeJPbycFwrqNyxpg==", + "version": "7.5.0", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.5.0.tgz", + "integrity": "sha512-2xsuyZ0R0RBFwjgae5NpXk8FcfH4qovj5cEM5VEeB7KXnKqzaisIu2HSV/mCEISolJJuR4wkViUGYujA8MH9tw==", "requires": { - "regenerator-runtime": "^0.12.0" - }, - "dependencies": { - "regenerator-runtime": { - "version": "0.12.1", - "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.12.1.tgz", - "integrity": "sha512-odxIc1/vDlo4iZcfXqRYFj0vpXFNoGdKMAUieAlFYO6m/nl5e9KR/beGf41z4a1FI+aQgtjhuaSlDxQ0hmkrHg==" - } + "regenerator-runtime": "^0.13.2" + } + }, + "@types/node": { + "version": "12.0.12", + "resolved": "https://registry.npmjs.org/@types/node/-/node-12.0.12.tgz", + "integrity": "sha512-Uy0PN4R5vgBUXFoJrKryf5aTk3kJ8Rv3PdlHjl6UaX+Cqp1QE0yPQ68MPXGrZOfG7gZVNDIJZYyot0B9ubXUrQ==" + }, + "@wry/context": { + "version": "0.4.4", + "resolved": "https://registry.npmjs.org/@wry/context/-/context-0.4.4.tgz", + "integrity": "sha512-LrKVLove/zw6h2Md/KZyWxIkFM6AoyKp71OqpH9Hiip1csjPVoD3tPxlbQUNxEnHENks3UGgNpSBCAfq9KWuag==", + "requires": { + "@types/node": ">=6", + "tslib": "^1.9.3" } }, "acorn": { - "version": "4.0.13", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-4.0.13.tgz", - "integrity": "sha1-EFSVrlNh1pe9GVyCUZLhrX8lN4c=" + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.2.0.tgz", + "integrity": "sha512-8oe72N3WPMjA+2zVG71Ia0nXZ8DpQH+QyyHO+p06jT8eg8FGG3FbcUIi8KziHlAfheJQZeoqbvq1mQSQHXKYLw==" }, "agent-base": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-4.2.1.tgz", - "integrity": "sha512-JVwXMr9nHYTUXsBFKUqhJwvlcYU/blreOEUkhNR2eXZIvwd+c+o5V4MgDPKWnMS/56awN3TRzIP+KoPn+roQtg==", + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-4.3.0.tgz", + "integrity": "sha512-salcGninV0nPrwpGNn4VTXBb1SOuXQBiqbrNXoeizJsHrsL6ERFM2Ne3JUSBWRE6aeNJI2ROP/WEEIDUiDe3cg==", "requires": { "es6-promisify": "^5.0.0" } @@ -36,11 +43,6 @@ "resolved": "https://registry.npmjs.org/arson/-/arson-0.2.6.tgz", "integrity": "sha512-wVRnIfjOaCWu3jrf3j1CU/eotDf7tuM34cBswo32EwyLPaMiaWgETfROdYVv47VWEbWSOaZaDnkypGQtQduLbw==" }, - "asap": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/asap/-/asap-2.0.6.tgz", - "integrity": "sha1-5QNHYR1+aQlDIIu9r+vLwvuGbUY=" - }, "async-limiter": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/async-limiter/-/async-limiter-1.0.0.tgz", @@ -81,36 +83,23 @@ "typedarray": "^0.0.6" } }, - "core-js": { - "version": "1.2.7", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-1.2.7.tgz", - "integrity": "sha1-ZSKUwUZR2yj6k70tX/KYOk8IxjY=" - }, "core-util-is": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" }, "debug": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", - "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", + "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", "requires": { - "ms": "2.0.0" - } - }, - "encoding": { - "version": "0.1.12", - "resolved": "https://registry.npmjs.org/encoding/-/encoding-0.1.12.tgz", - "integrity": "sha1-U4tm8+5izRq1HsMjgp0flIDHS+s=", - "requires": { - "iconv-lite": "~0.4.13" + "ms": "^2.1.1" } }, "es6-promise": { - "version": "4.2.4", - "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-4.2.4.tgz", - "integrity": "sha512-/NdNZVJg+uZgtm9eS3O6lrOLYmQag2DjdEXuPaHlZ6RuVqgqaVZfgYCepEIKsLqwdQArOPtC3XzRLqGGfT8KQQ==" + "version": "4.2.8", + "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-4.2.8.tgz", + "integrity": "sha512-HJDGx5daxeIvxdBxvG2cb9g4tEvwIk3i8+nhX0yGrYmZUzbkdg8QbDevheDB8gd0//uPj4c1EQua8Q+MViT0/w==" }, "es6-promisify": { "version": "5.0.0", @@ -138,23 +127,14 @@ "requires": { "ms": "2.0.0" } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" } } }, - "fbjs": { - "version": "0.8.17", - "resolved": "https://registry.npmjs.org/fbjs/-/fbjs-0.8.17.tgz", - "integrity": "sha1-xNWY6taUkRJlPWWIsBpc3Nn5D90=", - "requires": { - "core-js": "^1.0.0", - "isomorphic-fetch": "^2.1.1", - "loose-envify": "^1.0.0", - "object-assign": "^4.1.0", - "promise": "^7.1.1", - "setimmediate": "^1.0.5", - "ua-parser-js": "^0.7.18" - } - }, "fd-slicer": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/fd-slicer/-/fd-slicer-1.0.1.tgz", @@ -169,9 +149,9 @@ "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" }, "glob": { - "version": "7.1.2", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz", - "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==", + "version": "7.1.4", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.4.tgz", + "integrity": "sha512-hkLPepehmnKk41pUGm3sYxoFs/umurYfYJCerbXEyFIWcAzvpipAgVkBqqT9RBKMGjnq6kMuyYwha6csxbiM1A==", "requires": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", @@ -188,14 +168,16 @@ "requires": { "agent-base": "^4.1.0", "debug": "^3.1.0" - } - }, - "iconv-lite": { - "version": "0.4.23", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.23.tgz", - "integrity": "sha512-neyTUVFtahjf0mB3dZT77u+8O0QB89jFdnBkd5P1JgYPbPaia3gXXOVL2fq8VyU2gMMD7SaN7QukTB/pmXYvDA==", - "requires": { - "safer-buffer": ">= 2.1.2 < 3" + }, + "dependencies": { + "debug": { + "version": "3.2.6", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", + "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", + "requires": { + "ms": "^2.1.1" + } + } } }, "inflight": { @@ -208,29 +190,15 @@ } }, "inherits": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", - "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" - }, - "is-stream": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", - "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=" + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" }, "isarray": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" }, - "isomorphic-fetch": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/isomorphic-fetch/-/isomorphic-fetch-2.2.1.tgz", - "integrity": "sha1-YRrhrPFPXoH3KVB0coGf6XM1WKk=", - "requires": { - "node-fetch": "^1.0.1", - "whatwg-fetch": ">=0.10.0" - } - }, "js-tokens": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", @@ -244,49 +212,39 @@ "js-tokens": "^3.0.0 || ^4.0.0" } }, - "lru-cache": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.0.2.tgz", - "integrity": "sha1-HRdnnAac2l0ECZGgnbwsDbN35V4=", - "requires": { - "pseudomap": "^1.0.1", - "yallist": "^2.0.0" - } - }, "meteor-node-stubs": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/meteor-node-stubs/-/meteor-node-stubs-1.0.0.tgz", - "integrity": "sha512-QJwyv23wyXD3uEMzk5Xr/y5ezoVlCbHvBbrgdkVadn84dmifLRbs0PtD6EeNw5NLIk+SQSfxld7IMdEsneGz5w==", + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/meteor-node-stubs/-/meteor-node-stubs-0.4.1.tgz", + "integrity": "sha512-UO2OStvLOKoApmOdIP5eCqoLaa/ritMXRg4ffJVdkNLEsczzPvTjgC0Mxk4cM4R8MZkwll90FYgjDf5qUTJdMA==", "requires": { "assert": "^1.4.1", - "browserify-zlib": "^0.2.0", - "buffer": "^5.2.1", + "browserify-zlib": "^0.1.4", + "buffer": "^4.9.1", "console-browserify": "^1.1.0", "constants-browserify": "^1.0.0", - "crypto-browserify": "^3.12.0", - "domain-browser": "^1.2.0", - "events": "^3.0.0", - "https-browserify": "^1.0.0", - "os-browserify": "^0.3.0", - "path-browserify": "^1.0.0", - "process": "^0.11.10", - "punycode": "^2.1.1", + "crypto-browserify": "^3.11.0", + "domain-browser": "^1.1.7", + "events": "^1.1.1", + "https-browserify": "0.0.1", + "os-browserify": "^0.2.1", + "path-browserify": "0.0.0", + "process": "^0.11.9", + "punycode": "^1.4.1", "querystring-es3": "^0.2.1", - "readable-stream": "^3.3.0", - "stream-browserify": "^2.0.2", - "stream-http": "^3.0.0", - "string_decoder": "^1.2.0", - "timers-browserify": "^2.0.10", - "tty-browserify": "0.0.1", + "readable-stream": "^2.3.6", + "stream-browserify": "^2.0.1", + "stream-http": "^2.8.0", + "string_decoder": "^1.1.0", + "timers-browserify": "^1.4.2", + "tty-browserify": "0.0.0", "url": "^0.11.0", - "util": "^0.11.1", - "vm-browserify": "^1.1.0" + "util": "^0.10.3", + "vm-browserify": "0.0.4" }, "dependencies": { "asn1.js": { "version": "4.10.1", - "resolved": false, - "integrity": "sha512-p32cOF5q0Zqs9uBiONKYLm6BClCoBCM5O9JfeUSlnQLBTxYdTK+pW+nXflm8UkKd2UYlEbYz5qEi0JuZR9ckSw==", + "bundled": true, "requires": { "bn.js": "^4.0.0", "inherits": "^2.0.1", @@ -295,41 +253,26 @@ }, "assert": { "version": "1.4.1", - "resolved": false, - "integrity": "sha1-mZEtWRg2tab1s0XA8H7vwI/GXZE=", + "bundled": true, "requires": { "util": "0.10.3" - }, - "dependencies": { - "util": { - "version": "0.10.3", - "resolved": "https://registry.npmjs.org/util/-/util-0.10.3.tgz", - "integrity": "sha1-evsa/lCAUkZInj23/g7TeTNqwPk=", - "requires": { - "inherits": "2.0.1" - } - } } }, "base64-js": { "version": "1.3.0", - "resolved": false, - "integrity": "sha512-ccav/yGvoa80BQDljCxsmmQ3Xvx60/UpBIij5QN21W3wBi/hhIC9OoO+KLpu9IJTS9j4DRVJ3aDDF9cMSoa2lw==" + "bundled": true }, "bn.js": { "version": "4.11.8", - "resolved": false, - "integrity": "sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA==" + "bundled": true }, "brorand": { "version": "1.1.0", - "resolved": false, - "integrity": "sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8=" + "bundled": true }, "browserify-aes": { "version": "1.2.0", - "resolved": false, - "integrity": "sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA==", + "bundled": true, "requires": { "buffer-xor": "^1.0.3", "cipher-base": "^1.0.0", @@ -341,8 +284,7 @@ }, "browserify-cipher": { "version": "1.0.1", - "resolved": false, - "integrity": "sha512-sPhkz0ARKbf4rRQt2hTpAHqn47X3llLkUGn+xEJzLjwY8LRs2p0v7ljvI5EyoRO/mexrNunNECisZs+gw2zz1w==", + "bundled": true, "requires": { "browserify-aes": "^1.0.4", "browserify-des": "^1.0.0", @@ -350,20 +292,17 @@ } }, "browserify-des": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/browserify-des/-/browserify-des-1.0.2.tgz", - "integrity": "sha512-BioO1xf3hFwz4kc6iBhI3ieDFompMhrMlnDFC4/0/vd5MokpuAc3R+LYbwTA9A5Yc9pq9UYPqffKpW2ObuwX5A==", + "version": "1.0.1", + "bundled": true, "requires": { "cipher-base": "^1.0.1", "des.js": "^1.0.0", - "inherits": "^2.0.1", - "safe-buffer": "^5.1.2" + "inherits": "^2.0.1" } }, "browserify-rsa": { "version": "4.0.1", - "resolved": false, - "integrity": "sha1-IeCr+vbyApzy+vsTNWenAdQTVSQ=", + "bundled": true, "requires": { "bn.js": "^4.1.0", "randombytes": "^2.0.1" @@ -371,8 +310,7 @@ }, "browserify-sign": { "version": "4.0.4", - "resolved": false, - "integrity": "sha1-qk62jl17ZYuqa/alfmMMvXqT0pg=", + "bundled": true, "requires": { "bn.js": "^4.1.1", "browserify-rsa": "^4.0.0", @@ -384,36 +322,32 @@ } }, "browserify-zlib": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/browserify-zlib/-/browserify-zlib-0.2.0.tgz", - "integrity": "sha512-Z942RysHXmJrhqk88FmKBVq/v5tqmSkDz7p54G/MGyjMnCFFnC79XWNbg+Vta8W6Wb2qtSZTSxIGkJrRpCFEiA==", + "version": "0.1.4", + "bundled": true, "requires": { - "pako": "~1.0.5" + "pako": "~0.2.0" } }, "buffer": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.2.1.tgz", - "integrity": "sha512-c+Ko0loDaFfuPWiL02ls9Xd3GO3cPVmUobQ6t3rXNUk304u6hGq+8N/kFi+QEIKhzK3uwolVhLzszmfLmMLnqg==", + "version": "4.9.1", + "bundled": true, "requires": { "base64-js": "^1.0.2", - "ieee754": "^1.1.4" + "ieee754": "^1.1.4", + "isarray": "^1.0.0" } }, "buffer-xor": { "version": "1.0.3", - "resolved": false, - "integrity": "sha1-JuYe0UIvtw3ULm42cp7VHYVf6Nk=" + "bundled": true }, "builtin-status-codes": { "version": "3.0.0", - "resolved": false, - "integrity": "sha1-hZgoeOIbmOHGZCXgPQF0eI9Wnug=" + "bundled": true }, "cipher-base": { "version": "1.0.4", - "resolved": false, - "integrity": "sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q==", + "bundled": true, "requires": { "inherits": "^2.0.1", "safe-buffer": "^5.0.1" @@ -421,26 +355,22 @@ }, "console-browserify": { "version": "1.1.0", - "resolved": false, - "integrity": "sha1-8CQcRXMKn8YyOyBtvzjtx0HQuxA=", + "bundled": true, "requires": { "date-now": "^0.1.4" } }, "constants-browserify": { "version": "1.0.0", - "resolved": false, - "integrity": "sha1-wguW2MYXdIqvHBYCF2DNJ/y4y3U=" + "bundled": true }, "core-util-is": { "version": "1.0.2", - "resolved": false, - "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" + "bundled": true }, "create-ecdh": { "version": "4.0.3", - "resolved": false, - "integrity": "sha512-GbEHQPMOswGpKXM9kCWVrremUcBmjteUaQ01T9rkKCPDXfUHX0IoP9LpHYo2NPFampa4e+/pFDc3jQdxrxQLaw==", + "bundled": true, "requires": { "bn.js": "^4.1.0", "elliptic": "^6.0.0" @@ -448,8 +378,7 @@ }, "create-hash": { "version": "1.2.0", - "resolved": false, - "integrity": "sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg==", + "bundled": true, "requires": { "cipher-base": "^1.0.1", "inherits": "^2.0.1", @@ -460,8 +389,7 @@ }, "create-hmac": { "version": "1.1.7", - "resolved": false, - "integrity": "sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg==", + "bundled": true, "requires": { "cipher-base": "^1.0.3", "create-hash": "^1.1.0", @@ -473,8 +401,7 @@ }, "crypto-browserify": { "version": "3.12.0", - "resolved": false, - "integrity": "sha512-fz4spIh+znjO2VjL+IdhEpRJ3YN6sMzITSBijk6FK2UvTqruSQW+/cCZTSNsMiZNvUeq0CqurF+dAbyiGOY6Wg==", + "bundled": true, "requires": { "browserify-cipher": "^1.0.0", "browserify-sign": "^4.0.0", @@ -491,13 +418,11 @@ }, "date-now": { "version": "0.1.4", - "resolved": false, - "integrity": "sha1-6vQ5/U1ISK105cx9vvIAZyueNFs=" + "bundled": true }, "des.js": { "version": "1.0.0", - "resolved": false, - "integrity": "sha1-wHTS4qpqipoH29YfmhXCzYPsjsw=", + "bundled": true, "requires": { "inherits": "^2.0.1", "minimalistic-assert": "^1.0.0" @@ -505,8 +430,7 @@ }, "diffie-hellman": { "version": "5.0.3", - "resolved": false, - "integrity": "sha512-kqag/Nl+f3GwyK25fhUMYj81BUOrZ9IuJsjIcDE5icNM9FJHAVm3VcUDxdLPoQtTuUylWm6ZIknYJwwaPxsUzg==", + "bundled": true, "requires": { "bn.js": "^4.1.0", "miller-rabin": "^4.0.0", @@ -515,13 +439,11 @@ }, "domain-browser": { "version": "1.2.0", - "resolved": false, - "integrity": "sha512-jnjyiM6eRyZl2H+W8Q/zLMA481hzi0eszAaBUzIVnmYVDBbnLxVNnfu1HgEBvCbL+71FrxMl3E6lpKH7Ge3OXA==" + "bundled": true }, "elliptic": { - "version": "6.4.1", - "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.4.1.tgz", - "integrity": "sha512-BsXLz5sqX8OHcsh7CqBMztyXARmGQ3LWPtGjJi6DiJHq5C/qvi9P3OqgswKSDftbu8+IoI/QDTAm2fFnQ9SZSQ==", + "version": "6.4.0", + "bundled": true, "requires": { "bn.js": "^4.4.0", "brorand": "^1.0.1", @@ -533,14 +455,12 @@ } }, "events": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/events/-/events-3.0.0.tgz", - "integrity": "sha512-Dc381HFWJzEOhQ+d8pkNon++bk9h6cdAoAj4iE6Q4y6xgTzySWXlKn05/TVNpjnfRqi/X0EpJEJohPjNI3zpVA==" + "version": "1.1.1", + "bundled": true }, "evp_bytestokey": { "version": "1.0.3", - "resolved": false, - "integrity": "sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA==", + "bundled": true, "requires": { "md5.js": "^1.3.4", "safe-buffer": "^5.1.1" @@ -548,33 +468,29 @@ }, "hash-base": { "version": "3.0.4", - "resolved": false, - "integrity": "sha1-X8hoaEfs1zSZQDMZprCj8/auSRg=", + "bundled": true, "requires": { "inherits": "^2.0.1", "safe-buffer": "^5.0.1" } }, "hash.js": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.7.tgz", - "integrity": "sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==", + "version": "1.1.3", + "bundled": true, "requires": { "inherits": "^2.0.3", - "minimalistic-assert": "^1.0.1" + "minimalistic-assert": "^1.0.0" }, "dependencies": { "inherits": { "version": "2.0.3", - "resolved": false, - "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" + "bundled": true } } }, "hmac-drbg": { "version": "1.0.1", - "resolved": false, - "integrity": "sha1-0nRXAQJabHdabFRXk+1QL8DGSaE=", + "bundled": true, "requires": { "hash.js": "^1.0.3", "minimalistic-assert": "^1.0.0", @@ -582,39 +498,36 @@ } }, "https-browserify": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/https-browserify/-/https-browserify-1.0.0.tgz", - "integrity": "sha1-7AbBDgo0wPL68Zn3/X/Hj//QPHM=" + "version": "0.0.1", + "bundled": true }, "ieee754": { - "version": "1.1.13", - "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.1.13.tgz", - "integrity": "sha512-4vf7I2LYV/HaWerSo3XmlMkp5eZ83i+/CDluXi/IGTs/O1sejBNhTtnxzmRZfvOUqj7lZjqHkeTvpgSFDlWZTg==" + "version": "1.1.11", + "bundled": true + }, + "indexof": { + "version": "0.0.1", + "bundled": true }, "inherits": { "version": "2.0.1", - "resolved": false, - "integrity": "sha1-sX0I0ya0Qj5Wjv9xn5GwscvfafE=" + "bundled": true }, "isarray": { "version": "1.0.0", - "resolved": false, - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" + "bundled": true }, "md5.js": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/md5.js/-/md5.js-1.3.5.tgz", - "integrity": "sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg==", + "version": "1.3.4", + "bundled": true, "requires": { "hash-base": "^3.0.0", - "inherits": "^2.0.1", - "safe-buffer": "^5.1.2" + "inherits": "^2.0.1" } }, "miller-rabin": { "version": "4.0.1", - "resolved": false, - "integrity": "sha512-115fLhvZVqWwHPbClyntxEVfVDfl9DLLTuJvq3g2O/Oxi8AiNouAHvDSzHS0viUJc+V5vm3eq91Xwqn9dp4jRA==", + "bundled": true, "requires": { "bn.js": "^4.0.0", "brorand": "^1.0.1" @@ -622,46 +535,38 @@ }, "minimalistic-assert": { "version": "1.0.1", - "resolved": false, - "integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==" + "bundled": true }, "minimalistic-crypto-utils": { "version": "1.0.1", - "resolved": false, - "integrity": "sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo=" + "bundled": true }, "os-browserify": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/os-browserify/-/os-browserify-0.3.0.tgz", - "integrity": "sha1-hUNzx/XCMVkU/Jv8a9gjj92h7Cc=" + "version": "0.2.1", + "bundled": true }, "pako": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.10.tgz", - "integrity": "sha512-0DTvPVU3ed8+HNXOu5Bs+o//Mbdj9VNQMUOe9oKCwh8l0GNwpTDMKCWbRjgtD291AWnkAgkqA/LOnQS8AmS1tw==" + "version": "0.2.9", + "bundled": true }, "parse-asn1": { - "version": "5.1.4", - "resolved": "https://registry.npmjs.org/parse-asn1/-/parse-asn1-5.1.4.tgz", - "integrity": "sha512-Qs5duJcuvNExRfFZ99HDD3z4mAi3r9Wl/FOjEOijlxwCZs7E7mW2vjTpgQ4J8LpTF8x5v+1Vn5UQFejmWT11aw==", + "version": "5.1.1", + "bundled": true, "requires": { "asn1.js": "^4.0.0", "browserify-aes": "^1.0.0", "create-hash": "^1.1.0", "evp_bytestokey": "^1.0.0", - "pbkdf2": "^3.0.3", - "safe-buffer": "^5.1.1" + "pbkdf2": "^3.0.3" } }, "path-browserify": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/path-browserify/-/path-browserify-1.0.0.tgz", - "integrity": "sha512-Hkavx/nY4/plImrZPHRk2CL9vpOymZLgEbMNX1U0bjcBL7QN9wODxyx0yaMZURSQaUtSEvDrfAvxa9oPb0at9g==" + "version": "0.0.0", + "bundled": true }, "pbkdf2": { - "version": "3.0.17", - "resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.0.17.tgz", - "integrity": "sha512-U/il5MsrZp7mGg3mSQfn742na2T+1/vHDCG5/iTI3X9MKUuYUZVLQhyRsg06mCgDBTd57TxzgZt7P+fYfjRLtA==", + "version": "3.0.16", + "bundled": true, "requires": { "create-hash": "^1.1.2", "create-hmac": "^1.1.4", @@ -672,80 +577,72 @@ }, "process": { "version": "0.11.10", - "resolved": false, - "integrity": "sha1-czIwDoQBYb2j5podHZGn1LwW8YI=" + "bundled": true }, "process-nextick-args": { "version": "2.0.0", - "resolved": false, - "integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw==" + "bundled": true }, "public-encrypt": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/public-encrypt/-/public-encrypt-4.0.3.tgz", - "integrity": "sha512-zVpa8oKZSz5bTMTFClc1fQOnyyEzpl5ozpi1B5YcvBrdohMjH2rfsBtyXcuNuwjsDIXmBYlF2N5FlJYhR29t8Q==", + "version": "4.0.2", + "bundled": true, "requires": { "bn.js": "^4.1.0", "browserify-rsa": "^4.0.0", "create-hash": "^1.1.0", "parse-asn1": "^5.0.0", - "randombytes": "^2.0.1", - "safe-buffer": "^5.1.2" + "randombytes": "^2.0.1" } }, "punycode": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", - "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==" + "version": "1.4.1", + "bundled": true }, "querystring": { "version": "0.2.0", - "resolved": false, - "integrity": "sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA=" + "bundled": true }, "querystring-es3": { "version": "0.2.1", - "resolved": false, - "integrity": "sha1-nsYfeQSYdXB9aUFFlv2Qek1xHnM=" + "bundled": true }, "randombytes": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", - "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", + "version": "2.0.6", + "bundled": true, "requires": { "safe-buffer": "^5.1.0" } }, "randomfill": { "version": "1.0.4", - "resolved": false, - "integrity": "sha512-87lcbR8+MhcWcUiQ+9e+Rwx8MyR2P7qnt15ynUlbm3TU/fjbgz4GsvfSUDTemtCCtVCqb4ZcEFlyPNTh9bBTLw==", + "bundled": true, "requires": { "randombytes": "^2.0.5", "safe-buffer": "^5.1.0" } }, "readable-stream": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.3.0.tgz", - "integrity": "sha512-EsI+s3k3XsW+fU8fQACLN59ky34AZ14LoeVZpYwmZvldCFo0r0gnelwF2TcMjLor/BTL5aDJVBMkss0dthToPw==", + "version": "2.3.6", + "bundled": true, "requires": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" }, "dependencies": { "inherits": { "version": "2.0.3", - "resolved": false, - "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" + "bundled": true } } }, "ripemd160": { "version": "2.0.2", - "resolved": false, - "integrity": "sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA==", + "bundled": true, "requires": { "hash-base": "^3.0.0", "inherits": "^2.0.1" @@ -753,99 +650,60 @@ }, "safe-buffer": { "version": "5.1.2", - "resolved": false, - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" - }, - "setimmediate": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz", - "integrity": "sha1-KQy7Iy4waULX1+qbg3Mqt4VvgoU=" + "bundled": true }, "sha.js": { "version": "2.4.11", - "resolved": false, - "integrity": "sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==", + "bundled": true, "requires": { "inherits": "^2.0.1", "safe-buffer": "^5.0.1" } }, "stream-browserify": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/stream-browserify/-/stream-browserify-2.0.2.tgz", - "integrity": "sha512-nX6hmklHs/gr2FuxYDltq8fJA1GDlxKQCz8O/IM4atRqBH8OORmBNgfvW5gG10GT/qQ9u0CzIvr2X5Pkt6ntqg==", + "version": "2.0.1", + "bundled": true, "requires": { "inherits": "~2.0.1", "readable-stream": "^2.0.2" - }, - "dependencies": { - "readable-stream": { - "version": "2.3.6", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", - "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - }, - "dependencies": { - "inherits": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", - "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" - } - } - }, - "string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "requires": { - "safe-buffer": "~5.1.0" - } - } } }, "stream-http": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/stream-http/-/stream-http-3.0.0.tgz", - "integrity": "sha512-JELJfd+btL9GHtxU3+XXhg9NLYrKFnhybfvRuDghtyVkOFydz3PKNT1df07AMr88qW03WHF+FSV0PySpXignCA==", + "version": "2.8.1", + "bundled": true, "requires": { "builtin-status-codes": "^3.0.0", "inherits": "^2.0.1", - "readable-stream": "^3.0.6", + "readable-stream": "^2.3.3", + "to-arraybuffer": "^1.0.0", "xtend": "^4.0.0" } }, "string_decoder": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.2.0.tgz", - "integrity": "sha512-6YqyX6ZWEYguAxgZzHGL7SsCeGx3V2TtOTqZz1xSTSWnqsbWwbptafNyvf/ACquZUXV3DANr5BDIwNYe1mN42w==", + "version": "1.1.1", + "bundled": true, "requires": { "safe-buffer": "~5.1.0" } }, "timers-browserify": { - "version": "2.0.10", - "resolved": "https://registry.npmjs.org/timers-browserify/-/timers-browserify-2.0.10.tgz", - "integrity": "sha512-YvC1SV1XdOUaL6gx5CoGroT3Gu49pK9+TZ38ErPldOWW4j49GI1HKs9DV+KGq/w6y+LZ72W1c8cKz2vzY+qpzg==", + "version": "1.4.2", + "bundled": true, "requires": { - "setimmediate": "^1.0.4" + "process": "~0.11.0" } }, + "to-arraybuffer": { + "version": "1.0.1", + "bundled": true + }, "tty-browserify": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/tty-browserify/-/tty-browserify-0.0.1.tgz", - "integrity": "sha512-C3TaO7K81YvjCgQH9Q1S3R3P3BtN3RIM8n+OvX4il1K1zgE8ZhI0op7kClgkxtutIE8hQrcrHBXvIheqKUUCxw==" + "version": "0.0.0", + "bundled": true }, "url": { "version": "0.11.0", - "resolved": false, - "integrity": "sha1-ODjpfPxgUh63PFJajlW/3Z4uKPE=", + "bundled": true, "requires": { "punycode": "1.3.2", "querystring": "0.2.0" @@ -853,47 +711,38 @@ "dependencies": { "punycode": { "version": "1.3.2", - "resolved": false, - "integrity": "sha1-llOgNvt8HuQjQvIyXM7v6jkmxI0=" + "bundled": true } } }, "util": { - "version": "0.11.1", - "resolved": "https://registry.npmjs.org/util/-/util-0.11.1.tgz", - "integrity": "sha512-HShAsny+zS2TZfaXxD9tYj4HQGlBezXZMZuM/S5PKLLoZkShZiGk9o5CzukI1LVHZvjdvZ2Sj1aW/Ndn2NB/HQ==", + "version": "0.10.3", + "bundled": true, "requires": { - "inherits": "2.0.3" - }, - "dependencies": { - "inherits": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", - "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" - } + "inherits": "2.0.1" } }, "util-deprecate": { "version": "1.0.2", - "resolved": false, - "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" + "bundled": true }, "vm-browserify": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/vm-browserify/-/vm-browserify-1.1.0.tgz", - "integrity": "sha512-iq+S7vZJE60yejDYM0ek6zg308+UZsdtPExWP9VZoCFCz1zkJoXFnAX7aZfd/ZwrkidzdUZL0C/ryW+JwAiIGw==" + "version": "0.0.4", + "bundled": true, + "requires": { + "indexof": "0.0.1" + } }, "xtend": { "version": "4.0.1", - "resolved": false, - "integrity": "sha1-pcbVMr5lbiPbgg77lDofBJmNY68=" + "bundled": true } } }, "mime": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/mime/-/mime-2.3.1.tgz", - "integrity": "sha512-OEUllcVoydBHGN1z84yfQDimn58pZNNNXgZlHXSboxMlFvgI6MXSWpWKpFRra7H1HxpVhHTkrghfRW49k6yjeg==" + "version": "2.4.4", + "resolved": "https://registry.npmjs.org/mime/-/mime-2.4.4.tgz", + "integrity": "sha512-LRxmNwziLPT828z+4YkNzloCFC2YM4wrB99k+AV5ZbEyfGNWfG8SO1FUXLmLDBSo89NrJZ4DIWeLjy1CHGhMGA==" }, "minimatch": { "version": "3.0.4", @@ -917,23 +766,14 @@ } }, "moment": { - "version": "2.22.2", - "resolved": "https://registry.npmjs.org/moment/-/moment-2.22.2.tgz", - "integrity": "sha1-PCV/mDn8DpP/UxSWMiOeuQeD/2Y=" + "version": "2.24.0", + "resolved": "https://registry.npmjs.org/moment/-/moment-2.24.0.tgz", + "integrity": "sha512-bV7f+6l2QigeBBZSM/6yTNq4P2fNpSWj/0e7jQcy87A8e7o2nAfP/34/2ky5Vw4B9S446EtIhodAzkFCcR4dQg==" }, "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" - }, - "node-fetch": { - "version": "1.7.3", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-1.7.3.tgz", - "integrity": "sha512-NhZ4CsKx7cYm2vSrBAr2PvFOe6sWDf0UYLRqA6svUYg7+/TSfVAu49jYC4BvQ4Sms9SZgdqGBgroqfDhJdTyKQ==", - "requires": { - "encoding": "^0.1.11", - "is-stream": "^1.0.1" - } + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" }, "object-assign": { "version": "4.1.1", @@ -949,11 +789,11 @@ } }, "optimism": { - "version": "0.3.3", - "resolved": "https://registry.npmjs.org/optimism/-/optimism-0.3.3.tgz", - "integrity": "sha1-BjDrmir90bGLBS5MmOEplL6U3xI=", + "version": "0.10.2", + "resolved": "https://registry.npmjs.org/optimism/-/optimism-0.10.2.tgz", + "integrity": "sha512-zPfBIxFFWMmQboM9+Z4MSJqc1PXp82v1PFq/GfQaufI69mHKlup7ykGNnfuGIGssXJQkmhSodQ/k9EWwjd8O8A==", "requires": { - "lru-cache": "~4.0.1" + "@wry/context": "^0.4.0" } }, "path-is-absolute": { @@ -972,30 +812,23 @@ "integrity": "sha512-VvivMrbvd2nKkiG38qjULzlc+4Vx4wm/whI9pQD35YrARNnhxeiRktSOhSukRLFNlzg6Br/cJPet5J/u19r/mg==" }, "process-nextick-args": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.0.tgz", - "integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw==" + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", + "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==" }, "progress": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.0.tgz", - "integrity": "sha1-ihvjZr+Pwj2yvSPxDG/pILQ4nR8=" - }, - "promise": { - "version": "7.3.1", - "resolved": "https://registry.npmjs.org/promise/-/promise-7.3.1.tgz", - "integrity": "sha512-nolQXZ/4L+bP/UGlkfaIujX9BKxGwmQ9OT4mOt5yvy8iK1h3wqTEJCijzGANTCCl9nWjY41juyAn2K3Q1hLLTg==", - "requires": { - "asap": "~2.0.3" - } + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", + "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==" }, "prop-types": { - "version": "15.6.2", - "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.6.2.tgz", - "integrity": "sha512-3pboPvLiWD7dkI3qf3KbUe6hKFKa52w+AE0VCqECtf+QHAKgOL37tTaNCnuX1nAAQ4ZhyP+kYVKf8rLmJ/feDQ==", + "version": "15.7.2", + "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.7.2.tgz", + "integrity": "sha512-8QQikdH7//R2vurIJSutZ1smHYTcLpRWEOlHnzcWHmBYrOGUysKwSsrC89BCiFj3CbrfJ/nXFdJepOVrY1GCHQ==", "requires": { - "loose-envify": "^1.3.1", - "object-assign": "^4.1.1" + "loose-envify": "^1.4.0", + "object-assign": "^4.1.1", + "react-is": "^16.8.1" } }, "proxy-from-env": { @@ -1003,37 +836,37 @@ "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.0.0.tgz", "integrity": "sha1-M8UDmPcOp+uW0h97gXYwpVeRx+4=" }, - "pseudomap": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", - "integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM=" - }, "puppeteer": { - "version": "1.6.2", - "resolved": "https://registry.npmjs.org/puppeteer/-/puppeteer-1.6.2.tgz", - "integrity": "sha512-KBgMr/ZdwIwDQWTqcAlGhnQ2Vd6p+o5B89H60XUfdmCpia2KViSZsdRjvrf2wYOxXSrpYx6OuCBzV7ppLuNjNg==", + "version": "1.18.1", + "resolved": "https://registry.npmjs.org/puppeteer/-/puppeteer-1.18.1.tgz", + "integrity": "sha512-luUy0HPSuWPsPZ1wAp6NinE0zgetWtudf5zwZ6dHjMWfYpTQcmKveFRox7VBNhQ98OjNA9PQ9PzQyX8k/KrxTg==", "requires": { - "debug": "^3.1.0", + "debug": "^4.1.0", "extract-zip": "^1.6.6", "https-proxy-agent": "^2.2.1", "mime": "^2.0.3", - "progress": "^2.0.0", + "progress": "^2.0.1", "proxy-from-env": "^1.0.0", "rimraf": "^2.6.1", - "ws": "^5.1.1" + "ws": "^6.1.0" } }, "react": { - "version": "16.4.2", - "resolved": "https://registry.npmjs.org/react/-/react-16.4.2.tgz", - "integrity": "sha512-dMv7YrbxO4y2aqnvA7f/ik9ibeLSHQJTI6TrYAenPSaQ6OXfb+Oti+oJiy8WBxgRzlKatYqtCjphTgDSCEiWFg==", + "version": "16.8.6", + "resolved": "https://registry.npmjs.org/react/-/react-16.8.6.tgz", + "integrity": "sha512-pC0uMkhLaHm11ZSJULfOBqV4tIZkx87ZLvbbQYunNixAAvjnC+snJCg0XQXn9VIsttVsbZP/H/ewzgsd5fxKXw==", "requires": { - "fbjs": "^0.8.16", "loose-envify": "^1.1.0", "object-assign": "^4.1.1", - "prop-types": "^15.6.0" + "prop-types": "^15.6.2", + "scheduler": "^0.13.6" } }, + "react-is": { + "version": "16.8.6", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.8.6.tgz", + "integrity": "sha512-aUk3bHfZ2bRSVFFbbeVS4i+lNPZr3/WM5jT2J5omUVV1zzcs1nAaf3l51ctA5FFvCRbhrH0bdAsRRQddFJZPtA==" + }, "readable-stream": { "version": "2.3.6", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", @@ -1049,16 +882,16 @@ } }, "regenerator-runtime": { - "version": "0.11.1", - "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz", - "integrity": "sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg==" + "version": "0.13.2", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.2.tgz", + "integrity": "sha512-S/TQAZJO+D3m9xeN1WTI8dLKBBiRgXBlTJvbWjCThHWZj9EvHK70Ff50/tYj2J/fvBY6JtFVwRuazHN2E7M9BA==" }, "rimraf": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.2.tgz", - "integrity": "sha512-lreewLK/BlghmxtfH36YYVg1i8IAce4TI7oao75I1g245+6BctqTVQiBP3YUJ9C6DQOXJmkYR9X9fCLtCOJc5w==", + "version": "2.6.3", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.3.tgz", + "integrity": "sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==", "requires": { - "glob": "^7.0.5" + "glob": "^7.1.3" } }, "safe-buffer": { @@ -1066,15 +899,14 @@ "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" }, - "safer-buffer": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", - "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" - }, - "setimmediate": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz", - "integrity": "sha1-KQy7Iy4waULX1+qbg3Mqt4VvgoU=" + "scheduler": { + "version": "0.13.6", + "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.13.6.tgz", + "integrity": "sha512-IWnObHt413ucAYKsD9J1QShUKkbKLQQHdxRyw73sw4FN26iWr3DY/H34xGPe4nmL1DwXyWmSWmMrA9TfQbE/XQ==", + "requires": { + "loose-envify": "^1.1.0", + "object-assign": "^4.1.1" + } }, "string_decoder": { "version": "1.1.1", @@ -1084,16 +916,16 @@ "safe-buffer": "~5.1.0" } }, + "tslib": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.10.0.tgz", + "integrity": "sha512-qOebF53frne81cf0S9B41ByenJ3/IuH8yJKngAX35CmiZySA0khhkovshKK+jGCaMnVomla7gVlIcc3EvKPbTQ==" + }, "typedarray": { "version": "0.0.6", "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=" }, - "ua-parser-js": { - "version": "0.7.18", - "resolved": "https://registry.npmjs.org/ua-parser-js/-/ua-parser-js-0.7.18.tgz", - "integrity": "sha512-LtzwHlVHwFGTptfNSgezHp7WUlwiqb0gA9AALRbKaERfxwJoiX0A73QbTToxteIAuIaFshhgIZfqK8s7clqgnA==" - }, "util-deprecate": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", @@ -1104,29 +936,19 @@ "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.2.tgz", "integrity": "sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA==" }, - "whatwg-fetch": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/whatwg-fetch/-/whatwg-fetch-2.0.4.tgz", - "integrity": "sha512-dcQ1GWpOD/eEQ97k66aiEVpNnapVj90/+R+SXTPYGHpYBBypfKJEQjLrvMZ7YXbKm21gXd4NcuxUTjiv1YtLng==" - }, "wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" }, "ws": { - "version": "5.2.2", - "resolved": "https://registry.npmjs.org/ws/-/ws-5.2.2.tgz", - "integrity": "sha512-jaHFD6PFv6UgoIVda6qZllptQsMlDEJkTQcybzzXDYM1XO9Y8em691FGMPmM46WGyLU4z9KMgQN+qrux/nhlHA==", + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/ws/-/ws-6.2.1.tgz", + "integrity": "sha512-GIyAXC2cB7LjvpgMt9EKS2ldqr0MTrORaleiOno6TweZ6r3TKtoFQWay/2PceJ3RuBasOHzXNn5Lrw1X0bEjqA==", "requires": { "async-limiter": "~1.0.0" } }, - "yallist": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz", - "integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=" - }, "yauzl": { "version": "2.4.1", "resolved": "https://registry.npmjs.org/yauzl/-/yauzl-2.4.1.tgz", diff --git a/tools/tests/apps/dynamic-import/package.json b/tools/tests/apps/dynamic-import/package.json index 57425651e4..081ab16b74 100644 --- a/tools/tests/apps/dynamic-import/package.json +++ b/tools/tests/apps/dynamic-import/package.json @@ -6,16 +6,16 @@ "test": "TEST_BROWSER_DRIVER=puppeteer meteor test --full-app --driver-package meteortesting:mocha" }, "dependencies": { - "@babel/runtime": "^7.1.2", - "acorn": "^4.0.11", - "arson": "^0.2.3", - "meteor-node-stubs": "^1.0.0", - "moment": "^2.17.1", - "optimism": "^0.3.3", - "private": "^0.1.7", - "puppeteer": "^1.6.2", - "react": "^16.0.0", - "regenerator-runtime": "^0.11.1", - "uuid": "^3.1.0" + "@babel/runtime": "^7.5.0", + "acorn": "^6.2.0", + "arson": "^0.2.6", + "meteor-node-stubs": "^0.4.1", + "moment": "^2.24.0", + "optimism": "^0.10.2", + "private": "^0.1.8", + "puppeteer": "^1.18.1", + "react": "^16.8.6", + "regenerator-runtime": "^0.13.2", + "uuid": "^3.3.2" } } From 755d0d1722aaa7f2c33f04c8b292fa3effc5d43c Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Thu, 4 Jul 2019 16:16:31 -0400 Subject: [PATCH 146/327] Fix outdated import of optimism package in dynamic-import test. --- tools/tests/apps/dynamic-import/tests.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/tests/apps/dynamic-import/tests.js b/tools/tests/apps/dynamic-import/tests.js index a0dcfc82ad..e41a55e069 100644 --- a/tools/tests/apps/dynamic-import/tests.js +++ b/tools/tests/apps/dynamic-import/tests.js @@ -230,9 +230,10 @@ describe("dynamic import(...)", function () { }); it("should track dynamic peer imports from packages (#9187)", () => { + const absId = require.resolve("optimism"); const version = require( "meteor/dynamic-import/dynamic-versions.js" - ).get("/node_modules/optimism/lib/index.js"); + ).get(absId); if (Meteor.isClient) { assert.strictEqual(typeof version, "string"); From 6979b55dfc82e1a214926890244c980d38be15d5 Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Thu, 4 Jul 2019 16:23:12 -0400 Subject: [PATCH 147/327] Update @babel/runtime to latest version in remaining test apps. --- tools/tests/apps/app-config/package-lock.json | 14 +- tools/tests/apps/app-config/package.json | 2 +- tools/tests/apps/app-prints-pid/package.json | 2 +- .../apps/dev-bundle-bin-commands/package.json | 2 +- .../apps/git-commit-hash/package-lock.json | 14 +- tools/tests/apps/git-commit-hash/package.json | 2 +- .../linked-external-npm-package/package.json | 2 +- .../apps/meteor-ignore/package-lock.json | 294 +++++++++--------- tools/tests/apps/meteor-ignore/package.json | 2 +- tools/tests/apps/package-tests/package.json | 2 +- tools/tests/apps/shell/package.json | 2 +- tools/tests/apps/standard-app/package.json | 2 +- 12 files changed, 167 insertions(+), 173 deletions(-) diff --git a/tools/tests/apps/app-config/package-lock.json b/tools/tests/apps/app-config/package-lock.json index 61a816ed07..19f9233457 100644 --- a/tools/tests/apps/app-config/package-lock.json +++ b/tools/tests/apps/app-config/package-lock.json @@ -4,11 +4,11 @@ "lockfileVersion": 1, "dependencies": { "@babel/runtime": { - "version": "7.3.4", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.3.4.tgz", - "integrity": "sha512-IvfvnMdSaLBateu0jfsYIpZTxAc2cKEXEMiezGGN75QcBcecDUKd3PgLAncT0oOgxKy8dd8hrJKj9MfzgfZd6g==", + "version": "7.5.0", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.5.0.tgz", + "integrity": "sha512-2xsuyZ0R0RBFwjgae5NpXk8FcfH4qovj5cEM5VEeB7KXnKqzaisIu2HSV/mCEISolJJuR4wkViUGYujA8MH9tw==", "requires": { - "regenerator-runtime": "^0.12.0" + "regenerator-runtime": "^0.13.2" } }, "agent-base": { @@ -796,9 +796,9 @@ } }, "regenerator-runtime": { - "version": "0.12.1", - "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.12.1.tgz", - "integrity": "sha512-odxIc1/vDlo4iZcfXqRYFj0vpXFNoGdKMAUieAlFYO6m/nl5e9KR/beGf41z4a1FI+aQgtjhuaSlDxQ0hmkrHg==" + "version": "0.13.2", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.2.tgz", + "integrity": "sha512-S/TQAZJO+D3m9xeN1WTI8dLKBBiRgXBlTJvbWjCThHWZj9EvHK70Ff50/tYj2J/fvBY6JtFVwRuazHN2E7M9BA==" }, "rimraf": { "version": "2.6.3", diff --git a/tools/tests/apps/app-config/package.json b/tools/tests/apps/app-config/package.json index 84b05eecfd..584842e7d1 100644 --- a/tools/tests/apps/app-config/package.json +++ b/tools/tests/apps/app-config/package.json @@ -5,7 +5,7 @@ "start": "meteor run" }, "dependencies": { - "@babel/runtime": "^7.0.0-beta.56", + "@babel/runtime": "^7.5.0", "meteor-node-stubs": "^0.4.1", "puppeteer": "^1.6.2" }, diff --git a/tools/tests/apps/app-prints-pid/package.json b/tools/tests/apps/app-prints-pid/package.json index f20e3e823c..6033cc91cd 100644 --- a/tools/tests/apps/app-prints-pid/package.json +++ b/tools/tests/apps/app-prints-pid/package.json @@ -2,7 +2,7 @@ "name": "app-prints-pid", "private": true, "dependencies": { - "@babel/runtime": "^7.3.4", + "@babel/runtime": "^7.5.0", "meteor-node-stubs": "^0.4.1" }, "meteor": { diff --git a/tools/tests/apps/dev-bundle-bin-commands/package.json b/tools/tests/apps/dev-bundle-bin-commands/package.json index aa6a606e08..4f85c8739b 100644 --- a/tools/tests/apps/dev-bundle-bin-commands/package.json +++ b/tools/tests/apps/dev-bundle-bin-commands/package.json @@ -7,7 +7,7 @@ "exit-normally": "echo \"This script will exit normally\" && exit 0" }, "dependencies": { - "@babel/runtime": "^7.0.0-beta.56", + "@babel/runtime": "^7.5.0", "meteor-node-stubs": "^0.4.1" } } diff --git a/tools/tests/apps/git-commit-hash/package-lock.json b/tools/tests/apps/git-commit-hash/package-lock.json index 05e29a291f..af7aaf5784 100644 --- a/tools/tests/apps/git-commit-hash/package-lock.json +++ b/tools/tests/apps/git-commit-hash/package-lock.json @@ -4,11 +4,11 @@ "lockfileVersion": 1, "dependencies": { "@babel/runtime": { - "version": "7.3.1", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.3.1.tgz", - "integrity": "sha512-7jGW8ppV0ant637pIqAcFfQDDH1orEPGJb8aXfUozuCU3QqX7rX4DA8iwrbPrR1hcH0FTTHz47yQnk+bl5xHQA==", + "version": "7.5.0", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.5.0.tgz", + "integrity": "sha512-2xsuyZ0R0RBFwjgae5NpXk8FcfH4qovj5cEM5VEeB7KXnKqzaisIu2HSV/mCEISolJJuR4wkViUGYujA8MH9tw==", "requires": { - "regenerator-runtime": "^0.12.0" + "regenerator-runtime": "^0.13.2" } }, "agent-base": { @@ -786,9 +786,9 @@ } }, "regenerator-runtime": { - "version": "0.12.1", - "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.12.1.tgz", - "integrity": "sha512-odxIc1/vDlo4iZcfXqRYFj0vpXFNoGdKMAUieAlFYO6m/nl5e9KR/beGf41z4a1FI+aQgtjhuaSlDxQ0hmkrHg==" + "version": "0.13.2", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.2.tgz", + "integrity": "sha512-S/TQAZJO+D3m9xeN1WTI8dLKBBiRgXBlTJvbWjCThHWZj9EvHK70Ff50/tYj2J/fvBY6JtFVwRuazHN2E7M9BA==" }, "rimraf": { "version": "2.6.3", diff --git a/tools/tests/apps/git-commit-hash/package.json b/tools/tests/apps/git-commit-hash/package.json index 60750f39f7..44100930bc 100644 --- a/tools/tests/apps/git-commit-hash/package.json +++ b/tools/tests/apps/git-commit-hash/package.json @@ -6,7 +6,7 @@ "test": "TEST_BROWSER_DRIVER=puppeteer meteor test --once --full-app --driver-package meteortesting:mocha" }, "dependencies": { - "@babel/runtime": "^7.1.5", + "@babel/runtime": "^7.5.0", "meteor-node-stubs": "^0.4.1", "puppeteer": "^1.6.2" }, diff --git a/tools/tests/apps/linked-external-npm-package/package.json b/tools/tests/apps/linked-external-npm-package/package.json index 6e26e15a63..98188d1ecc 100644 --- a/tools/tests/apps/linked-external-npm-package/package.json +++ b/tools/tests/apps/linked-external-npm-package/package.json @@ -8,7 +8,7 @@ "visualize": "meteor --production --extra-packages bundle-visualizer" }, "dependencies": { - "@babel/runtime": "^7.0.0", + "@babel/runtime": "^7.5.0", "external-package": "file:../external-package", "meteor-node-stubs": "^0.4.1" }, diff --git a/tools/tests/apps/meteor-ignore/package-lock.json b/tools/tests/apps/meteor-ignore/package-lock.json index 2420e5e56a..053041225b 100644 --- a/tools/tests/apps/meteor-ignore/package-lock.json +++ b/tools/tests/apps/meteor-ignore/package-lock.json @@ -4,46 +4,40 @@ "lockfileVersion": 1, "dependencies": { "@babel/runtime": { - "version": "7.0.0-beta.46", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.0.0-beta.46.tgz", - "integrity": "sha512-/3a3USMKk54BEHhDgY8rtxtaQOs4bp4aQwo6SDtdwmrXmgSgEusWuXNX5oIs/nwzmTD9o8wz2EyAjA+uHDMmJA==", + "version": "7.5.0", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.5.0.tgz", + "integrity": "sha512-2xsuyZ0R0RBFwjgae5NpXk8FcfH4qovj5cEM5VEeB7KXnKqzaisIu2HSV/mCEISolJJuR4wkViUGYujA8MH9tw==", "requires": { - "core-js": "2.5.5", - "regenerator-runtime": "0.11.1" + "regenerator-runtime": "^0.13.2" } }, - "core-js": { - "version": "2.5.5", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.5.5.tgz", - "integrity": "sha1-sU3ek2xkDAV5prUMq8wTLdYSfjs=" - }, "meteor-node-stubs": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/meteor-node-stubs/-/meteor-node-stubs-0.4.1.tgz", "integrity": "sha512-UO2OStvLOKoApmOdIP5eCqoLaa/ritMXRg4ffJVdkNLEsczzPvTjgC0Mxk4cM4R8MZkwll90FYgjDf5qUTJdMA==", "requires": { - "assert": "1.4.1", - "browserify-zlib": "0.1.4", - "buffer": "4.9.1", - "console-browserify": "1.1.0", - "constants-browserify": "1.0.0", - "crypto-browserify": "3.12.0", - "domain-browser": "1.2.0", - "events": "1.1.1", + "assert": "^1.4.1", + "browserify-zlib": "^0.1.4", + "buffer": "^4.9.1", + "console-browserify": "^1.1.0", + "constants-browserify": "^1.0.0", + "crypto-browserify": "^3.11.0", + "domain-browser": "^1.1.7", + "events": "^1.1.1", "https-browserify": "0.0.1", - "os-browserify": "0.2.1", + "os-browserify": "^0.2.1", "path-browserify": "0.0.0", - "process": "0.11.10", - "punycode": "1.4.1", - "querystring-es3": "0.2.1", - "readable-stream": "2.3.6", - "stream-browserify": "2.0.1", - "stream-http": "2.8.1", - "string_decoder": "1.1.1", - "timers-browserify": "1.4.2", + "process": "^0.11.9", + "punycode": "^1.4.1", + "querystring-es3": "^0.2.1", + "readable-stream": "^2.3.6", + "stream-browserify": "^2.0.1", + "stream-http": "^2.8.0", + "string_decoder": "^1.1.0", + "timers-browserify": "^1.4.2", "tty-browserify": "0.0.0", - "url": "0.11.0", - "util": "0.10.3", + "url": "^0.11.0", + "util": "^0.10.3", "vm-browserify": "0.0.4" }, "dependencies": { @@ -51,9 +45,9 @@ "version": "4.10.1", "bundled": true, "requires": { - "bn.js": "4.11.8", - "inherits": "2.0.1", - "minimalistic-assert": "1.0.1" + "bn.js": "^4.0.0", + "inherits": "^2.0.1", + "minimalistic-assert": "^1.0.0" } }, "assert": { @@ -79,67 +73,67 @@ "version": "1.2.0", "bundled": true, "requires": { - "buffer-xor": "1.0.3", - "cipher-base": "1.0.4", - "create-hash": "1.2.0", - "evp_bytestokey": "1.0.3", - "inherits": "2.0.1", - "safe-buffer": "5.1.2" + "buffer-xor": "^1.0.3", + "cipher-base": "^1.0.0", + "create-hash": "^1.1.0", + "evp_bytestokey": "^1.0.3", + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" } }, "browserify-cipher": { "version": "1.0.1", "bundled": true, "requires": { - "browserify-aes": "1.2.0", - "browserify-des": "1.0.1", - "evp_bytestokey": "1.0.3" + "browserify-aes": "^1.0.4", + "browserify-des": "^1.0.0", + "evp_bytestokey": "^1.0.0" } }, "browserify-des": { "version": "1.0.1", "bundled": true, "requires": { - "cipher-base": "1.0.4", - "des.js": "1.0.0", - "inherits": "2.0.1" + "cipher-base": "^1.0.1", + "des.js": "^1.0.0", + "inherits": "^2.0.1" } }, "browserify-rsa": { "version": "4.0.1", "bundled": true, "requires": { - "bn.js": "4.11.8", - "randombytes": "2.0.6" + "bn.js": "^4.1.0", + "randombytes": "^2.0.1" } }, "browserify-sign": { "version": "4.0.4", "bundled": true, "requires": { - "bn.js": "4.11.8", - "browserify-rsa": "4.0.1", - "create-hash": "1.2.0", - "create-hmac": "1.1.7", - "elliptic": "6.4.0", - "inherits": "2.0.1", - "parse-asn1": "5.1.1" + "bn.js": "^4.1.1", + "browserify-rsa": "^4.0.0", + "create-hash": "^1.1.0", + "create-hmac": "^1.1.2", + "elliptic": "^6.0.0", + "inherits": "^2.0.1", + "parse-asn1": "^5.0.0" } }, "browserify-zlib": { "version": "0.1.4", "bundled": true, "requires": { - "pako": "0.2.9" + "pako": "~0.2.0" } }, "buffer": { "version": "4.9.1", "bundled": true, "requires": { - "base64-js": "1.3.0", - "ieee754": "1.1.11", - "isarray": "1.0.0" + "base64-js": "^1.0.2", + "ieee754": "^1.1.4", + "isarray": "^1.0.0" } }, "buffer-xor": { @@ -154,15 +148,15 @@ "version": "1.0.4", "bundled": true, "requires": { - "inherits": "2.0.1", - "safe-buffer": "5.1.2" + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" } }, "console-browserify": { "version": "1.1.0", "bundled": true, "requires": { - "date-now": "0.1.4" + "date-now": "^0.1.4" } }, "constants-browserify": { @@ -177,48 +171,48 @@ "version": "4.0.3", "bundled": true, "requires": { - "bn.js": "4.11.8", - "elliptic": "6.4.0" + "bn.js": "^4.1.0", + "elliptic": "^6.0.0" } }, "create-hash": { "version": "1.2.0", "bundled": true, "requires": { - "cipher-base": "1.0.4", - "inherits": "2.0.1", - "md5.js": "1.3.4", - "ripemd160": "2.0.2", - "sha.js": "2.4.11" + "cipher-base": "^1.0.1", + "inherits": "^2.0.1", + "md5.js": "^1.3.4", + "ripemd160": "^2.0.1", + "sha.js": "^2.4.0" } }, "create-hmac": { "version": "1.1.7", "bundled": true, "requires": { - "cipher-base": "1.0.4", - "create-hash": "1.2.0", - "inherits": "2.0.1", - "ripemd160": "2.0.2", - "safe-buffer": "5.1.2", - "sha.js": "2.4.11" + "cipher-base": "^1.0.3", + "create-hash": "^1.1.0", + "inherits": "^2.0.1", + "ripemd160": "^2.0.0", + "safe-buffer": "^5.0.1", + "sha.js": "^2.4.8" } }, "crypto-browserify": { "version": "3.12.0", "bundled": true, "requires": { - "browserify-cipher": "1.0.1", - "browserify-sign": "4.0.4", - "create-ecdh": "4.0.3", - "create-hash": "1.2.0", - "create-hmac": "1.1.7", - "diffie-hellman": "5.0.3", - "inherits": "2.0.1", - "pbkdf2": "3.0.16", - "public-encrypt": "4.0.2", - "randombytes": "2.0.6", - "randomfill": "1.0.4" + "browserify-cipher": "^1.0.0", + "browserify-sign": "^4.0.0", + "create-ecdh": "^4.0.0", + "create-hash": "^1.1.0", + "create-hmac": "^1.1.0", + "diffie-hellman": "^5.0.0", + "inherits": "^2.0.1", + "pbkdf2": "^3.0.3", + "public-encrypt": "^4.0.0", + "randombytes": "^2.0.0", + "randomfill": "^1.0.3" } }, "date-now": { @@ -229,17 +223,17 @@ "version": "1.0.0", "bundled": true, "requires": { - "inherits": "2.0.1", - "minimalistic-assert": "1.0.1" + "inherits": "^2.0.1", + "minimalistic-assert": "^1.0.0" } }, "diffie-hellman": { "version": "5.0.3", "bundled": true, "requires": { - "bn.js": "4.11.8", - "miller-rabin": "4.0.1", - "randombytes": "2.0.6" + "bn.js": "^4.1.0", + "miller-rabin": "^4.0.0", + "randombytes": "^2.0.0" } }, "domain-browser": { @@ -250,13 +244,13 @@ "version": "6.4.0", "bundled": true, "requires": { - "bn.js": "4.11.8", - "brorand": "1.1.0", - "hash.js": "1.1.3", - "hmac-drbg": "1.0.1", - "inherits": "2.0.1", - "minimalistic-assert": "1.0.1", - "minimalistic-crypto-utils": "1.0.1" + "bn.js": "^4.4.0", + "brorand": "^1.0.1", + "hash.js": "^1.0.0", + "hmac-drbg": "^1.0.0", + "inherits": "^2.0.1", + "minimalistic-assert": "^1.0.0", + "minimalistic-crypto-utils": "^1.0.0" } }, "events": { @@ -267,24 +261,24 @@ "version": "1.0.3", "bundled": true, "requires": { - "md5.js": "1.3.4", - "safe-buffer": "5.1.2" + "md5.js": "^1.3.4", + "safe-buffer": "^5.1.1" } }, "hash-base": { "version": "3.0.4", "bundled": true, "requires": { - "inherits": "2.0.1", - "safe-buffer": "5.1.2" + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" } }, "hash.js": { "version": "1.1.3", "bundled": true, "requires": { - "inherits": "2.0.3", - "minimalistic-assert": "1.0.1" + "inherits": "^2.0.3", + "minimalistic-assert": "^1.0.0" }, "dependencies": { "inherits": { @@ -297,9 +291,9 @@ "version": "1.0.1", "bundled": true, "requires": { - "hash.js": "1.1.3", - "minimalistic-assert": "1.0.1", - "minimalistic-crypto-utils": "1.0.1" + "hash.js": "^1.0.3", + "minimalistic-assert": "^1.0.0", + "minimalistic-crypto-utils": "^1.0.1" } }, "https-browserify": { @@ -326,16 +320,16 @@ "version": "1.3.4", "bundled": true, "requires": { - "hash-base": "3.0.4", - "inherits": "2.0.1" + "hash-base": "^3.0.0", + "inherits": "^2.0.1" } }, "miller-rabin": { "version": "4.0.1", "bundled": true, "requires": { - "bn.js": "4.11.8", - "brorand": "1.1.0" + "bn.js": "^4.0.0", + "brorand": "^1.0.1" } }, "minimalistic-assert": { @@ -358,11 +352,11 @@ "version": "5.1.1", "bundled": true, "requires": { - "asn1.js": "4.10.1", - "browserify-aes": "1.2.0", - "create-hash": "1.2.0", - "evp_bytestokey": "1.0.3", - "pbkdf2": "3.0.16" + "asn1.js": "^4.0.0", + "browserify-aes": "^1.0.0", + "create-hash": "^1.1.0", + "evp_bytestokey": "^1.0.0", + "pbkdf2": "^3.0.3" } }, "path-browserify": { @@ -373,11 +367,11 @@ "version": "3.0.16", "bundled": true, "requires": { - "create-hash": "1.2.0", - "create-hmac": "1.1.7", - "ripemd160": "2.0.2", - "safe-buffer": "5.1.2", - "sha.js": "2.4.11" + "create-hash": "^1.1.2", + "create-hmac": "^1.1.4", + "ripemd160": "^2.0.1", + "safe-buffer": "^5.0.1", + "sha.js": "^2.4.8" } }, "process": { @@ -392,11 +386,11 @@ "version": "4.0.2", "bundled": true, "requires": { - "bn.js": "4.11.8", - "browserify-rsa": "4.0.1", - "create-hash": "1.2.0", - "parse-asn1": "5.1.1", - "randombytes": "2.0.6" + "bn.js": "^4.1.0", + "browserify-rsa": "^4.0.0", + "create-hash": "^1.1.0", + "parse-asn1": "^5.0.0", + "randombytes": "^2.0.1" } }, "punycode": { @@ -415,28 +409,28 @@ "version": "2.0.6", "bundled": true, "requires": { - "safe-buffer": "5.1.2" + "safe-buffer": "^5.1.0" } }, "randomfill": { "version": "1.0.4", "bundled": true, "requires": { - "randombytes": "2.0.6", - "safe-buffer": "5.1.2" + "randombytes": "^2.0.5", + "safe-buffer": "^5.1.0" } }, "readable-stream": { "version": "2.3.6", "bundled": true, "requires": { - "core-util-is": "1.0.2", - "inherits": "2.0.3", - "isarray": "1.0.0", - "process-nextick-args": "2.0.0", - "safe-buffer": "5.1.2", - "string_decoder": "1.1.1", - "util-deprecate": "1.0.2" + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" }, "dependencies": { "inherits": { @@ -449,8 +443,8 @@ "version": "2.0.2", "bundled": true, "requires": { - "hash-base": "3.0.4", - "inherits": "2.0.1" + "hash-base": "^3.0.0", + "inherits": "^2.0.1" } }, "safe-buffer": { @@ -461,41 +455,41 @@ "version": "2.4.11", "bundled": true, "requires": { - "inherits": "2.0.1", - "safe-buffer": "5.1.2" + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" } }, "stream-browserify": { "version": "2.0.1", "bundled": true, "requires": { - "inherits": "2.0.1", - "readable-stream": "2.3.6" + "inherits": "~2.0.1", + "readable-stream": "^2.0.2" } }, "stream-http": { "version": "2.8.1", "bundled": true, "requires": { - "builtin-status-codes": "3.0.0", - "inherits": "2.0.1", - "readable-stream": "2.3.6", - "to-arraybuffer": "1.0.1", - "xtend": "4.0.1" + "builtin-status-codes": "^3.0.0", + "inherits": "^2.0.1", + "readable-stream": "^2.3.3", + "to-arraybuffer": "^1.0.0", + "xtend": "^4.0.0" } }, "string_decoder": { "version": "1.1.1", "bundled": true, "requires": { - "safe-buffer": "5.1.2" + "safe-buffer": "~5.1.0" } }, "timers-browserify": { "version": "1.4.2", "bundled": true, "requires": { - "process": "0.11.10" + "process": "~0.11.0" } }, "to-arraybuffer": { @@ -545,9 +539,9 @@ } }, "regenerator-runtime": { - "version": "0.11.1", - "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz", - "integrity": "sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg==" + "version": "0.13.2", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.2.tgz", + "integrity": "sha512-S/TQAZJO+D3m9xeN1WTI8dLKBBiRgXBlTJvbWjCThHWZj9EvHK70Ff50/tYj2J/fvBY6JtFVwRuazHN2E7M9BA==" } } } diff --git a/tools/tests/apps/meteor-ignore/package.json b/tools/tests/apps/meteor-ignore/package.json index b78d28f124..086899168e 100644 --- a/tools/tests/apps/meteor-ignore/package.json +++ b/tools/tests/apps/meteor-ignore/package.json @@ -5,7 +5,7 @@ "start": "meteor run" }, "dependencies": { - "@babel/runtime": "^7.0.0-beta.56", + "@babel/runtime": "^7.5.0", "meteor-node-stubs": "^0.4.1" } } diff --git a/tools/tests/apps/package-tests/package.json b/tools/tests/apps/package-tests/package.json index 114ba59c54..786365743c 100644 --- a/tools/tests/apps/package-tests/package.json +++ b/tools/tests/apps/package-tests/package.json @@ -5,6 +5,6 @@ "start": "meteor run" }, "dependencies": { - "@babel/runtime": "^7.0.0-beta.56" + "@babel/runtime": "^7.5.0" } } diff --git a/tools/tests/apps/shell/package.json b/tools/tests/apps/shell/package.json index 976c4c8fe8..765d771eba 100644 --- a/tools/tests/apps/shell/package.json +++ b/tools/tests/apps/shell/package.json @@ -5,7 +5,7 @@ "start": "meteor run" }, "dependencies": { - "@babel/runtime": "^7.0.0-beta.56", + "@babel/runtime": "^7.5.0", "meteor-node-stubs": "^0.4.1" } } diff --git a/tools/tests/apps/standard-app/package.json b/tools/tests/apps/standard-app/package.json index 142c414a96..9bf420705f 100644 --- a/tools/tests/apps/standard-app/package.json +++ b/tools/tests/apps/standard-app/package.json @@ -8,7 +8,7 @@ "visualize": "meteor --production --extra-packages bundle-visualizer" }, "dependencies": { - "@babel/runtime": "^7.1.5", + "@babel/runtime": "^7.5.0", "meteor-node-stubs": "^0.4.1" }, "meteor": { From 101eea015f7264fa2491a9a3b7666a9baaf2bd55 Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Thu, 4 Jul 2019 16:31:32 -0400 Subject: [PATCH 148/327] Update meteor-node-stubs npm dependency to v1.0.0. --- History.md | 6 + 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 +- tools/static-assets/skel/package.json | 2 +- tools/tests/apps/app-config/package-lock.json | 188 +++++++++++------- tools/tests/apps/app-config/package.json | 2 +- tools/tests/apps/app-prints-pid/package.json | 2 +- .../apps/dev-bundle-bin-commands/package.json | 2 +- .../apps/dynamic-import/package-lock.json | 188 +++++++++++------- tools/tests/apps/dynamic-import/package.json | 2 +- .../apps/git-commit-hash/package-lock.json | 188 +++++++++++------- tools/tests/apps/git-commit-hash/package.json | 2 +- .../linked-external-npm-package/package.json | 2 +- .../apps/meteor-ignore/package-lock.json | 188 +++++++++++------- tools/tests/apps/meteor-ignore/package.json | 2 +- tools/tests/apps/shell/package.json | 2 +- tools/tests/apps/standard-app/package.json | 2 +- 19 files changed, 464 insertions(+), 322 deletions(-) diff --git a/History.md b/History.md index 38a5692776..0afe1c1286 100644 --- a/History.md +++ b/History.md @@ -11,6 +11,12 @@ N/A meteor npm install @babel/runtime@latest ``` +* New Meteor applications now depend on `meteor-node-stubs@1.0.0`, so it + may be a good idea to update to the same major version: + ```sh + meteor npm install meteor-node-stubs@next + ``` + ### Changes * Node has been updated to version diff --git a/tools/static-assets/skel-bare/package.json b/tools/static-assets/skel-bare/package.json index 3dc43d00b4..295e69100e 100644 --- a/tools/static-assets/skel-bare/package.json +++ b/tools/static-assets/skel-bare/package.json @@ -6,6 +6,6 @@ }, "dependencies": { "@babel/runtime": "^7.5.0", - "meteor-node-stubs": "^0.4.1" + "meteor-node-stubs": "^1.0.0" } } diff --git a/tools/static-assets/skel-full/package.json b/tools/static-assets/skel-full/package.json index fd4d441b11..651b93cd76 100644 --- a/tools/static-assets/skel-full/package.json +++ b/tools/static-assets/skel-full/package.json @@ -7,7 +7,7 @@ }, "dependencies": { "@babel/runtime": "^7.5.0", - "meteor-node-stubs": "^0.4.1" + "meteor-node-stubs": "^1.0.0" }, "devDependencies": { "chai": "^4.1.2" diff --git a/tools/static-assets/skel-minimal/package.json b/tools/static-assets/skel-minimal/package.json index 6c07cd1d1d..0c8dd4b28f 100644 --- a/tools/static-assets/skel-minimal/package.json +++ b/tools/static-assets/skel-minimal/package.json @@ -9,7 +9,7 @@ }, "dependencies": { "@babel/runtime": "^7.5.0", - "meteor-node-stubs": "^0.4.1" + "meteor-node-stubs": "^1.0.0" }, "meteor": { "mainModule": { diff --git a/tools/static-assets/skel-react/package.json b/tools/static-assets/skel-react/package.json index a4bb11df78..6b7df223f3 100644 --- a/tools/static-assets/skel-react/package.json +++ b/tools/static-assets/skel-react/package.json @@ -9,7 +9,7 @@ }, "dependencies": { "@babel/runtime": "^7.5.0", - "meteor-node-stubs": "^0.4.1", + "meteor-node-stubs": "^1.0.0", "react": "^16.5.0", "react-dom": "^16.5.0" }, diff --git a/tools/static-assets/skel/package.json b/tools/static-assets/skel/package.json index 6c07cd1d1d..0c8dd4b28f 100644 --- a/tools/static-assets/skel/package.json +++ b/tools/static-assets/skel/package.json @@ -9,7 +9,7 @@ }, "dependencies": { "@babel/runtime": "^7.5.0", - "meteor-node-stubs": "^0.4.1" + "meteor-node-stubs": "^1.0.0" }, "meteor": { "mainModule": { diff --git a/tools/tests/apps/app-config/package-lock.json b/tools/tests/apps/app-config/package-lock.json index 19f9233457..38cde11c9c 100644 --- a/tools/tests/apps/app-config/package-lock.json +++ b/tools/tests/apps/app-config/package-lock.json @@ -176,33 +176,33 @@ "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" }, "meteor-node-stubs": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/meteor-node-stubs/-/meteor-node-stubs-0.4.1.tgz", - "integrity": "sha512-UO2OStvLOKoApmOdIP5eCqoLaa/ritMXRg4ffJVdkNLEsczzPvTjgC0Mxk4cM4R8MZkwll90FYgjDf5qUTJdMA==", + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/meteor-node-stubs/-/meteor-node-stubs-1.0.0.tgz", + "integrity": "sha512-QJwyv23wyXD3uEMzk5Xr/y5ezoVlCbHvBbrgdkVadn84dmifLRbs0PtD6EeNw5NLIk+SQSfxld7IMdEsneGz5w==", "requires": { "assert": "^1.4.1", - "browserify-zlib": "^0.1.4", - "buffer": "^4.9.1", + "browserify-zlib": "^0.2.0", + "buffer": "^5.2.1", "console-browserify": "^1.1.0", "constants-browserify": "^1.0.0", - "crypto-browserify": "^3.11.0", - "domain-browser": "^1.1.7", - "events": "^1.1.1", - "https-browserify": "0.0.1", - "os-browserify": "^0.2.1", - "path-browserify": "0.0.0", - "process": "^0.11.9", - "punycode": "^1.4.1", + "crypto-browserify": "^3.12.0", + "domain-browser": "^1.2.0", + "events": "^3.0.0", + "https-browserify": "^1.0.0", + "os-browserify": "^0.3.0", + "path-browserify": "^1.0.0", + "process": "^0.11.10", + "punycode": "^2.1.1", "querystring-es3": "^0.2.1", - "readable-stream": "^2.3.6", - "stream-browserify": "^2.0.1", - "stream-http": "^2.8.0", - "string_decoder": "^1.1.0", - "timers-browserify": "^1.4.2", - "tty-browserify": "0.0.0", + "readable-stream": "^3.3.0", + "stream-browserify": "^2.0.2", + "stream-http": "^3.0.0", + "string_decoder": "^1.2.0", + "timers-browserify": "^2.0.10", + "tty-browserify": "0.0.1", "url": "^0.11.0", - "util": "^0.10.3", - "vm-browserify": "0.0.4" + "util": "^0.11.1", + "vm-browserify": "^1.1.0" }, "dependencies": { "asn1.js": { @@ -219,6 +219,15 @@ "bundled": true, "requires": { "util": "0.10.3" + }, + "dependencies": { + "util": { + "version": "0.10.3", + "bundled": true, + "requires": { + "inherits": "2.0.1" + } + } } }, "base64-js": { @@ -255,12 +264,13 @@ } }, "browserify-des": { - "version": "1.0.1", + "version": "1.0.2", "bundled": true, "requires": { "cipher-base": "^1.0.1", "des.js": "^1.0.0", - "inherits": "^2.0.1" + "inherits": "^2.0.1", + "safe-buffer": "^5.1.2" } }, "browserify-rsa": { @@ -285,19 +295,18 @@ } }, "browserify-zlib": { - "version": "0.1.4", + "version": "0.2.0", "bundled": true, "requires": { - "pako": "~0.2.0" + "pako": "~1.0.5" } }, "buffer": { - "version": "4.9.1", + "version": "5.2.1", "bundled": true, "requires": { "base64-js": "^1.0.2", - "ieee754": "^1.1.4", - "isarray": "^1.0.0" + "ieee754": "^1.1.4" } }, "buffer-xor": { @@ -405,7 +414,7 @@ "bundled": true }, "elliptic": { - "version": "6.4.0", + "version": "6.4.1", "bundled": true, "requires": { "bn.js": "^4.4.0", @@ -418,7 +427,7 @@ } }, "events": { - "version": "1.1.1", + "version": "3.0.0", "bundled": true }, "evp_bytestokey": { @@ -438,11 +447,11 @@ } }, "hash.js": { - "version": "1.1.3", + "version": "1.1.7", "bundled": true, "requires": { "inherits": "^2.0.3", - "minimalistic-assert": "^1.0.0" + "minimalistic-assert": "^1.0.1" }, "dependencies": { "inherits": { @@ -461,15 +470,11 @@ } }, "https-browserify": { - "version": "0.0.1", + "version": "1.0.0", "bundled": true }, "ieee754": { - "version": "1.1.11", - "bundled": true - }, - "indexof": { - "version": "0.0.1", + "version": "1.1.13", "bundled": true }, "inherits": { @@ -481,11 +486,12 @@ "bundled": true }, "md5.js": { - "version": "1.3.4", + "version": "1.3.5", "bundled": true, "requires": { "hash-base": "^3.0.0", - "inherits": "^2.0.1" + "inherits": "^2.0.1", + "safe-buffer": "^5.1.2" } }, "miller-rabin": { @@ -505,30 +511,31 @@ "bundled": true }, "os-browserify": { - "version": "0.2.1", + "version": "0.3.0", "bundled": true }, "pako": { - "version": "0.2.9", + "version": "1.0.10", "bundled": true }, "parse-asn1": { - "version": "5.1.1", + "version": "5.1.4", "bundled": true, "requires": { "asn1.js": "^4.0.0", "browserify-aes": "^1.0.0", "create-hash": "^1.1.0", "evp_bytestokey": "^1.0.0", - "pbkdf2": "^3.0.3" + "pbkdf2": "^3.0.3", + "safe-buffer": "^5.1.1" } }, "path-browserify": { - "version": "0.0.0", + "version": "1.0.0", "bundled": true }, "pbkdf2": { - "version": "3.0.16", + "version": "3.0.17", "bundled": true, "requires": { "create-hash": "^1.1.2", @@ -547,18 +554,19 @@ "bundled": true }, "public-encrypt": { - "version": "4.0.2", + "version": "4.0.3", "bundled": true, "requires": { "bn.js": "^4.1.0", "browserify-rsa": "^4.0.0", "create-hash": "^1.1.0", "parse-asn1": "^5.0.0", - "randombytes": "^2.0.1" + "randombytes": "^2.0.1", + "safe-buffer": "^5.1.2" } }, "punycode": { - "version": "1.4.1", + "version": "2.1.1", "bundled": true }, "querystring": { @@ -570,7 +578,7 @@ "bundled": true }, "randombytes": { - "version": "2.0.6", + "version": "2.1.0", "bundled": true, "requires": { "safe-buffer": "^5.1.0" @@ -585,16 +593,12 @@ } }, "readable-stream": { - "version": "2.3.6", + "version": "3.3.0", "bundled": true, "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" }, "dependencies": { "inherits": { @@ -615,6 +619,10 @@ "version": "5.1.2", "bundled": true }, + "setimmediate": { + "version": "1.0.5", + "bundled": true + }, "sha.js": { "version": "2.4.11", "bundled": true, @@ -624,44 +632,67 @@ } }, "stream-browserify": { - "version": "2.0.1", + "version": "2.0.2", "bundled": true, "requires": { "inherits": "~2.0.1", "readable-stream": "^2.0.2" + }, + "dependencies": { + "readable-stream": { + "version": "2.3.6", + "bundled": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + }, + "dependencies": { + "inherits": { + "version": "2.0.3", + "bundled": true + } + } + }, + "string_decoder": { + "version": "1.1.1", + "bundled": true, + "requires": { + "safe-buffer": "~5.1.0" + } + } } }, "stream-http": { - "version": "2.8.1", + "version": "3.0.0", "bundled": true, "requires": { "builtin-status-codes": "^3.0.0", "inherits": "^2.0.1", - "readable-stream": "^2.3.3", - "to-arraybuffer": "^1.0.0", + "readable-stream": "^3.0.6", "xtend": "^4.0.0" } }, "string_decoder": { - "version": "1.1.1", + "version": "1.2.0", "bundled": true, "requires": { "safe-buffer": "~5.1.0" } }, "timers-browserify": { - "version": "1.4.2", + "version": "2.0.10", "bundled": true, "requires": { - "process": "~0.11.0" + "setimmediate": "^1.0.4" } }, - "to-arraybuffer": { - "version": "1.0.1", - "bundled": true - }, "tty-browserify": { - "version": "0.0.0", + "version": "0.0.1", "bundled": true }, "url": { @@ -679,10 +710,16 @@ } }, "util": { - "version": "0.10.3", + "version": "0.11.1", "bundled": true, "requires": { - "inherits": "2.0.1" + "inherits": "2.0.3" + }, + "dependencies": { + "inherits": { + "version": "2.0.3", + "bundled": true + } } }, "util-deprecate": { @@ -690,11 +727,8 @@ "bundled": true }, "vm-browserify": { - "version": "0.0.4", - "bundled": true, - "requires": { - "indexof": "0.0.1" - } + "version": "1.1.0", + "bundled": true }, "xtend": { "version": "4.0.1", diff --git a/tools/tests/apps/app-config/package.json b/tools/tests/apps/app-config/package.json index 584842e7d1..08a92217d0 100644 --- a/tools/tests/apps/app-config/package.json +++ b/tools/tests/apps/app-config/package.json @@ -6,7 +6,7 @@ }, "dependencies": { "@babel/runtime": "^7.5.0", - "meteor-node-stubs": "^0.4.1", + "meteor-node-stubs": "^1.0.0", "puppeteer": "^1.6.2" }, "meteor": { diff --git a/tools/tests/apps/app-prints-pid/package.json b/tools/tests/apps/app-prints-pid/package.json index 6033cc91cd..0342ba8008 100644 --- a/tools/tests/apps/app-prints-pid/package.json +++ b/tools/tests/apps/app-prints-pid/package.json @@ -3,7 +3,7 @@ "private": true, "dependencies": { "@babel/runtime": "^7.5.0", - "meteor-node-stubs": "^0.4.1" + "meteor-node-stubs": "^1.0.0" }, "meteor": { "mainModule": { diff --git a/tools/tests/apps/dev-bundle-bin-commands/package.json b/tools/tests/apps/dev-bundle-bin-commands/package.json index 4f85c8739b..0243e5b4e4 100644 --- a/tools/tests/apps/dev-bundle-bin-commands/package.json +++ b/tools/tests/apps/dev-bundle-bin-commands/package.json @@ -8,6 +8,6 @@ }, "dependencies": { "@babel/runtime": "^7.5.0", - "meteor-node-stubs": "^0.4.1" + "meteor-node-stubs": "^1.0.0" } } diff --git a/tools/tests/apps/dynamic-import/package-lock.json b/tools/tests/apps/dynamic-import/package-lock.json index b282feb653..65896c125a 100644 --- a/tools/tests/apps/dynamic-import/package-lock.json +++ b/tools/tests/apps/dynamic-import/package-lock.json @@ -213,33 +213,33 @@ } }, "meteor-node-stubs": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/meteor-node-stubs/-/meteor-node-stubs-0.4.1.tgz", - "integrity": "sha512-UO2OStvLOKoApmOdIP5eCqoLaa/ritMXRg4ffJVdkNLEsczzPvTjgC0Mxk4cM4R8MZkwll90FYgjDf5qUTJdMA==", + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/meteor-node-stubs/-/meteor-node-stubs-1.0.0.tgz", + "integrity": "sha512-QJwyv23wyXD3uEMzk5Xr/y5ezoVlCbHvBbrgdkVadn84dmifLRbs0PtD6EeNw5NLIk+SQSfxld7IMdEsneGz5w==", "requires": { "assert": "^1.4.1", - "browserify-zlib": "^0.1.4", - "buffer": "^4.9.1", + "browserify-zlib": "^0.2.0", + "buffer": "^5.2.1", "console-browserify": "^1.1.0", "constants-browserify": "^1.0.0", - "crypto-browserify": "^3.11.0", - "domain-browser": "^1.1.7", - "events": "^1.1.1", - "https-browserify": "0.0.1", - "os-browserify": "^0.2.1", - "path-browserify": "0.0.0", - "process": "^0.11.9", - "punycode": "^1.4.1", + "crypto-browserify": "^3.12.0", + "domain-browser": "^1.2.0", + "events": "^3.0.0", + "https-browserify": "^1.0.0", + "os-browserify": "^0.3.0", + "path-browserify": "^1.0.0", + "process": "^0.11.10", + "punycode": "^2.1.1", "querystring-es3": "^0.2.1", - "readable-stream": "^2.3.6", - "stream-browserify": "^2.0.1", - "stream-http": "^2.8.0", - "string_decoder": "^1.1.0", - "timers-browserify": "^1.4.2", - "tty-browserify": "0.0.0", + "readable-stream": "^3.3.0", + "stream-browserify": "^2.0.2", + "stream-http": "^3.0.0", + "string_decoder": "^1.2.0", + "timers-browserify": "^2.0.10", + "tty-browserify": "0.0.1", "url": "^0.11.0", - "util": "^0.10.3", - "vm-browserify": "0.0.4" + "util": "^0.11.1", + "vm-browserify": "^1.1.0" }, "dependencies": { "asn1.js": { @@ -256,6 +256,15 @@ "bundled": true, "requires": { "util": "0.10.3" + }, + "dependencies": { + "util": { + "version": "0.10.3", + "bundled": true, + "requires": { + "inherits": "2.0.1" + } + } } }, "base64-js": { @@ -292,12 +301,13 @@ } }, "browserify-des": { - "version": "1.0.1", + "version": "1.0.2", "bundled": true, "requires": { "cipher-base": "^1.0.1", "des.js": "^1.0.0", - "inherits": "^2.0.1" + "inherits": "^2.0.1", + "safe-buffer": "^5.1.2" } }, "browserify-rsa": { @@ -322,19 +332,18 @@ } }, "browserify-zlib": { - "version": "0.1.4", + "version": "0.2.0", "bundled": true, "requires": { - "pako": "~0.2.0" + "pako": "~1.0.5" } }, "buffer": { - "version": "4.9.1", + "version": "5.2.1", "bundled": true, "requires": { "base64-js": "^1.0.2", - "ieee754": "^1.1.4", - "isarray": "^1.0.0" + "ieee754": "^1.1.4" } }, "buffer-xor": { @@ -442,7 +451,7 @@ "bundled": true }, "elliptic": { - "version": "6.4.0", + "version": "6.4.1", "bundled": true, "requires": { "bn.js": "^4.4.0", @@ -455,7 +464,7 @@ } }, "events": { - "version": "1.1.1", + "version": "3.0.0", "bundled": true }, "evp_bytestokey": { @@ -475,11 +484,11 @@ } }, "hash.js": { - "version": "1.1.3", + "version": "1.1.7", "bundled": true, "requires": { "inherits": "^2.0.3", - "minimalistic-assert": "^1.0.0" + "minimalistic-assert": "^1.0.1" }, "dependencies": { "inherits": { @@ -498,15 +507,11 @@ } }, "https-browserify": { - "version": "0.0.1", + "version": "1.0.0", "bundled": true }, "ieee754": { - "version": "1.1.11", - "bundled": true - }, - "indexof": { - "version": "0.0.1", + "version": "1.1.13", "bundled": true }, "inherits": { @@ -518,11 +523,12 @@ "bundled": true }, "md5.js": { - "version": "1.3.4", + "version": "1.3.5", "bundled": true, "requires": { "hash-base": "^3.0.0", - "inherits": "^2.0.1" + "inherits": "^2.0.1", + "safe-buffer": "^5.1.2" } }, "miller-rabin": { @@ -542,30 +548,31 @@ "bundled": true }, "os-browserify": { - "version": "0.2.1", + "version": "0.3.0", "bundled": true }, "pako": { - "version": "0.2.9", + "version": "1.0.10", "bundled": true }, "parse-asn1": { - "version": "5.1.1", + "version": "5.1.4", "bundled": true, "requires": { "asn1.js": "^4.0.0", "browserify-aes": "^1.0.0", "create-hash": "^1.1.0", "evp_bytestokey": "^1.0.0", - "pbkdf2": "^3.0.3" + "pbkdf2": "^3.0.3", + "safe-buffer": "^5.1.1" } }, "path-browserify": { - "version": "0.0.0", + "version": "1.0.0", "bundled": true }, "pbkdf2": { - "version": "3.0.16", + "version": "3.0.17", "bundled": true, "requires": { "create-hash": "^1.1.2", @@ -584,18 +591,19 @@ "bundled": true }, "public-encrypt": { - "version": "4.0.2", + "version": "4.0.3", "bundled": true, "requires": { "bn.js": "^4.1.0", "browserify-rsa": "^4.0.0", "create-hash": "^1.1.0", "parse-asn1": "^5.0.0", - "randombytes": "^2.0.1" + "randombytes": "^2.0.1", + "safe-buffer": "^5.1.2" } }, "punycode": { - "version": "1.4.1", + "version": "2.1.1", "bundled": true }, "querystring": { @@ -607,7 +615,7 @@ "bundled": true }, "randombytes": { - "version": "2.0.6", + "version": "2.1.0", "bundled": true, "requires": { "safe-buffer": "^5.1.0" @@ -622,16 +630,12 @@ } }, "readable-stream": { - "version": "2.3.6", + "version": "3.3.0", "bundled": true, "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" }, "dependencies": { "inherits": { @@ -652,6 +656,10 @@ "version": "5.1.2", "bundled": true }, + "setimmediate": { + "version": "1.0.5", + "bundled": true + }, "sha.js": { "version": "2.4.11", "bundled": true, @@ -661,44 +669,67 @@ } }, "stream-browserify": { - "version": "2.0.1", + "version": "2.0.2", "bundled": true, "requires": { "inherits": "~2.0.1", "readable-stream": "^2.0.2" + }, + "dependencies": { + "readable-stream": { + "version": "2.3.6", + "bundled": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + }, + "dependencies": { + "inherits": { + "version": "2.0.3", + "bundled": true + } + } + }, + "string_decoder": { + "version": "1.1.1", + "bundled": true, + "requires": { + "safe-buffer": "~5.1.0" + } + } } }, "stream-http": { - "version": "2.8.1", + "version": "3.0.0", "bundled": true, "requires": { "builtin-status-codes": "^3.0.0", "inherits": "^2.0.1", - "readable-stream": "^2.3.3", - "to-arraybuffer": "^1.0.0", + "readable-stream": "^3.0.6", "xtend": "^4.0.0" } }, "string_decoder": { - "version": "1.1.1", + "version": "1.2.0", "bundled": true, "requires": { "safe-buffer": "~5.1.0" } }, "timers-browserify": { - "version": "1.4.2", + "version": "2.0.10", "bundled": true, "requires": { - "process": "~0.11.0" + "setimmediate": "^1.0.4" } }, - "to-arraybuffer": { - "version": "1.0.1", - "bundled": true - }, "tty-browserify": { - "version": "0.0.0", + "version": "0.0.1", "bundled": true }, "url": { @@ -716,10 +747,16 @@ } }, "util": { - "version": "0.10.3", + "version": "0.11.1", "bundled": true, "requires": { - "inherits": "2.0.1" + "inherits": "2.0.3" + }, + "dependencies": { + "inherits": { + "version": "2.0.3", + "bundled": true + } } }, "util-deprecate": { @@ -727,11 +764,8 @@ "bundled": true }, "vm-browserify": { - "version": "0.0.4", - "bundled": true, - "requires": { - "indexof": "0.0.1" - } + "version": "1.1.0", + "bundled": true }, "xtend": { "version": "4.0.1", diff --git a/tools/tests/apps/dynamic-import/package.json b/tools/tests/apps/dynamic-import/package.json index 081ab16b74..508bdef5e7 100644 --- a/tools/tests/apps/dynamic-import/package.json +++ b/tools/tests/apps/dynamic-import/package.json @@ -9,7 +9,7 @@ "@babel/runtime": "^7.5.0", "acorn": "^6.2.0", "arson": "^0.2.6", - "meteor-node-stubs": "^0.4.1", + "meteor-node-stubs": "^1.0.0", "moment": "^2.24.0", "optimism": "^0.10.2", "private": "^0.1.8", diff --git a/tools/tests/apps/git-commit-hash/package-lock.json b/tools/tests/apps/git-commit-hash/package-lock.json index af7aaf5784..3c5c232326 100644 --- a/tools/tests/apps/git-commit-hash/package-lock.json +++ b/tools/tests/apps/git-commit-hash/package-lock.json @@ -166,33 +166,33 @@ "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" }, "meteor-node-stubs": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/meteor-node-stubs/-/meteor-node-stubs-0.4.1.tgz", - "integrity": "sha512-UO2OStvLOKoApmOdIP5eCqoLaa/ritMXRg4ffJVdkNLEsczzPvTjgC0Mxk4cM4R8MZkwll90FYgjDf5qUTJdMA==", + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/meteor-node-stubs/-/meteor-node-stubs-1.0.0.tgz", + "integrity": "sha512-QJwyv23wyXD3uEMzk5Xr/y5ezoVlCbHvBbrgdkVadn84dmifLRbs0PtD6EeNw5NLIk+SQSfxld7IMdEsneGz5w==", "requires": { "assert": "^1.4.1", - "browserify-zlib": "^0.1.4", - "buffer": "^4.9.1", + "browserify-zlib": "^0.2.0", + "buffer": "^5.2.1", "console-browserify": "^1.1.0", "constants-browserify": "^1.0.0", - "crypto-browserify": "^3.11.0", - "domain-browser": "^1.1.7", - "events": "^1.1.1", - "https-browserify": "0.0.1", - "os-browserify": "^0.2.1", - "path-browserify": "0.0.0", - "process": "^0.11.9", - "punycode": "^1.4.1", + "crypto-browserify": "^3.12.0", + "domain-browser": "^1.2.0", + "events": "^3.0.0", + "https-browserify": "^1.0.0", + "os-browserify": "^0.3.0", + "path-browserify": "^1.0.0", + "process": "^0.11.10", + "punycode": "^2.1.1", "querystring-es3": "^0.2.1", - "readable-stream": "^2.3.6", - "stream-browserify": "^2.0.1", - "stream-http": "^2.8.0", - "string_decoder": "^1.1.0", - "timers-browserify": "^1.4.2", - "tty-browserify": "0.0.0", + "readable-stream": "^3.3.0", + "stream-browserify": "^2.0.2", + "stream-http": "^3.0.0", + "string_decoder": "^1.2.0", + "timers-browserify": "^2.0.10", + "tty-browserify": "0.0.1", "url": "^0.11.0", - "util": "^0.10.3", - "vm-browserify": "0.0.4" + "util": "^0.11.1", + "vm-browserify": "^1.1.0" }, "dependencies": { "asn1.js": { @@ -209,6 +209,15 @@ "bundled": true, "requires": { "util": "0.10.3" + }, + "dependencies": { + "util": { + "version": "0.10.3", + "bundled": true, + "requires": { + "inherits": "2.0.1" + } + } } }, "base64-js": { @@ -245,12 +254,13 @@ } }, "browserify-des": { - "version": "1.0.1", + "version": "1.0.2", "bundled": true, "requires": { "cipher-base": "^1.0.1", "des.js": "^1.0.0", - "inherits": "^2.0.1" + "inherits": "^2.0.1", + "safe-buffer": "^5.1.2" } }, "browserify-rsa": { @@ -275,19 +285,18 @@ } }, "browserify-zlib": { - "version": "0.1.4", + "version": "0.2.0", "bundled": true, "requires": { - "pako": "~0.2.0" + "pako": "~1.0.5" } }, "buffer": { - "version": "4.9.1", + "version": "5.2.1", "bundled": true, "requires": { "base64-js": "^1.0.2", - "ieee754": "^1.1.4", - "isarray": "^1.0.0" + "ieee754": "^1.1.4" } }, "buffer-xor": { @@ -395,7 +404,7 @@ "bundled": true }, "elliptic": { - "version": "6.4.0", + "version": "6.4.1", "bundled": true, "requires": { "bn.js": "^4.4.0", @@ -408,7 +417,7 @@ } }, "events": { - "version": "1.1.1", + "version": "3.0.0", "bundled": true }, "evp_bytestokey": { @@ -428,11 +437,11 @@ } }, "hash.js": { - "version": "1.1.3", + "version": "1.1.7", "bundled": true, "requires": { "inherits": "^2.0.3", - "minimalistic-assert": "^1.0.0" + "minimalistic-assert": "^1.0.1" }, "dependencies": { "inherits": { @@ -451,15 +460,11 @@ } }, "https-browserify": { - "version": "0.0.1", + "version": "1.0.0", "bundled": true }, "ieee754": { - "version": "1.1.11", - "bundled": true - }, - "indexof": { - "version": "0.0.1", + "version": "1.1.13", "bundled": true }, "inherits": { @@ -471,11 +476,12 @@ "bundled": true }, "md5.js": { - "version": "1.3.4", + "version": "1.3.5", "bundled": true, "requires": { "hash-base": "^3.0.0", - "inherits": "^2.0.1" + "inherits": "^2.0.1", + "safe-buffer": "^5.1.2" } }, "miller-rabin": { @@ -495,30 +501,31 @@ "bundled": true }, "os-browserify": { - "version": "0.2.1", + "version": "0.3.0", "bundled": true }, "pako": { - "version": "0.2.9", + "version": "1.0.10", "bundled": true }, "parse-asn1": { - "version": "5.1.1", + "version": "5.1.4", "bundled": true, "requires": { "asn1.js": "^4.0.0", "browserify-aes": "^1.0.0", "create-hash": "^1.1.0", "evp_bytestokey": "^1.0.0", - "pbkdf2": "^3.0.3" + "pbkdf2": "^3.0.3", + "safe-buffer": "^5.1.1" } }, "path-browserify": { - "version": "0.0.0", + "version": "1.0.0", "bundled": true }, "pbkdf2": { - "version": "3.0.16", + "version": "3.0.17", "bundled": true, "requires": { "create-hash": "^1.1.2", @@ -537,18 +544,19 @@ "bundled": true }, "public-encrypt": { - "version": "4.0.2", + "version": "4.0.3", "bundled": true, "requires": { "bn.js": "^4.1.0", "browserify-rsa": "^4.0.0", "create-hash": "^1.1.0", "parse-asn1": "^5.0.0", - "randombytes": "^2.0.1" + "randombytes": "^2.0.1", + "safe-buffer": "^5.1.2" } }, "punycode": { - "version": "1.4.1", + "version": "2.1.1", "bundled": true }, "querystring": { @@ -560,7 +568,7 @@ "bundled": true }, "randombytes": { - "version": "2.0.6", + "version": "2.1.0", "bundled": true, "requires": { "safe-buffer": "^5.1.0" @@ -575,16 +583,12 @@ } }, "readable-stream": { - "version": "2.3.6", + "version": "3.3.0", "bundled": true, "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" }, "dependencies": { "inherits": { @@ -605,6 +609,10 @@ "version": "5.1.2", "bundled": true }, + "setimmediate": { + "version": "1.0.5", + "bundled": true + }, "sha.js": { "version": "2.4.11", "bundled": true, @@ -614,44 +622,67 @@ } }, "stream-browserify": { - "version": "2.0.1", + "version": "2.0.2", "bundled": true, "requires": { "inherits": "~2.0.1", "readable-stream": "^2.0.2" + }, + "dependencies": { + "readable-stream": { + "version": "2.3.6", + "bundled": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + }, + "dependencies": { + "inherits": { + "version": "2.0.3", + "bundled": true + } + } + }, + "string_decoder": { + "version": "1.1.1", + "bundled": true, + "requires": { + "safe-buffer": "~5.1.0" + } + } } }, "stream-http": { - "version": "2.8.1", + "version": "3.0.0", "bundled": true, "requires": { "builtin-status-codes": "^3.0.0", "inherits": "^2.0.1", - "readable-stream": "^2.3.3", - "to-arraybuffer": "^1.0.0", + "readable-stream": "^3.0.6", "xtend": "^4.0.0" } }, "string_decoder": { - "version": "1.1.1", + "version": "1.2.0", "bundled": true, "requires": { "safe-buffer": "~5.1.0" } }, "timers-browserify": { - "version": "1.4.2", + "version": "2.0.10", "bundled": true, "requires": { - "process": "~0.11.0" + "setimmediate": "^1.0.4" } }, - "to-arraybuffer": { - "version": "1.0.1", - "bundled": true - }, "tty-browserify": { - "version": "0.0.0", + "version": "0.0.1", "bundled": true }, "url": { @@ -669,10 +700,16 @@ } }, "util": { - "version": "0.10.3", + "version": "0.11.1", "bundled": true, "requires": { - "inherits": "2.0.1" + "inherits": "2.0.3" + }, + "dependencies": { + "inherits": { + "version": "2.0.3", + "bundled": true + } } }, "util-deprecate": { @@ -680,11 +717,8 @@ "bundled": true }, "vm-browserify": { - "version": "0.0.4", - "bundled": true, - "requires": { - "indexof": "0.0.1" - } + "version": "1.1.0", + "bundled": true }, "xtend": { "version": "4.0.1", diff --git a/tools/tests/apps/git-commit-hash/package.json b/tools/tests/apps/git-commit-hash/package.json index 44100930bc..e6db0202b5 100644 --- a/tools/tests/apps/git-commit-hash/package.json +++ b/tools/tests/apps/git-commit-hash/package.json @@ -7,7 +7,7 @@ }, "dependencies": { "@babel/runtime": "^7.5.0", - "meteor-node-stubs": "^0.4.1", + "meteor-node-stubs": "^1.0.0", "puppeteer": "^1.6.2" }, "meteor": { diff --git a/tools/tests/apps/linked-external-npm-package/package.json b/tools/tests/apps/linked-external-npm-package/package.json index 98188d1ecc..cbc7a546f4 100644 --- a/tools/tests/apps/linked-external-npm-package/package.json +++ b/tools/tests/apps/linked-external-npm-package/package.json @@ -10,7 +10,7 @@ "dependencies": { "@babel/runtime": "^7.5.0", "external-package": "file:../external-package", - "meteor-node-stubs": "^0.4.1" + "meteor-node-stubs": "^1.0.0" }, "meteor": { "mainModule": { diff --git a/tools/tests/apps/meteor-ignore/package-lock.json b/tools/tests/apps/meteor-ignore/package-lock.json index 053041225b..241f13beb5 100644 --- a/tools/tests/apps/meteor-ignore/package-lock.json +++ b/tools/tests/apps/meteor-ignore/package-lock.json @@ -12,33 +12,33 @@ } }, "meteor-node-stubs": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/meteor-node-stubs/-/meteor-node-stubs-0.4.1.tgz", - "integrity": "sha512-UO2OStvLOKoApmOdIP5eCqoLaa/ritMXRg4ffJVdkNLEsczzPvTjgC0Mxk4cM4R8MZkwll90FYgjDf5qUTJdMA==", + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/meteor-node-stubs/-/meteor-node-stubs-1.0.0.tgz", + "integrity": "sha512-QJwyv23wyXD3uEMzk5Xr/y5ezoVlCbHvBbrgdkVadn84dmifLRbs0PtD6EeNw5NLIk+SQSfxld7IMdEsneGz5w==", "requires": { "assert": "^1.4.1", - "browserify-zlib": "^0.1.4", - "buffer": "^4.9.1", + "browserify-zlib": "^0.2.0", + "buffer": "^5.2.1", "console-browserify": "^1.1.0", "constants-browserify": "^1.0.0", - "crypto-browserify": "^3.11.0", - "domain-browser": "^1.1.7", - "events": "^1.1.1", - "https-browserify": "0.0.1", - "os-browserify": "^0.2.1", - "path-browserify": "0.0.0", - "process": "^0.11.9", - "punycode": "^1.4.1", + "crypto-browserify": "^3.12.0", + "domain-browser": "^1.2.0", + "events": "^3.0.0", + "https-browserify": "^1.0.0", + "os-browserify": "^0.3.0", + "path-browserify": "^1.0.0", + "process": "^0.11.10", + "punycode": "^2.1.1", "querystring-es3": "^0.2.1", - "readable-stream": "^2.3.6", - "stream-browserify": "^2.0.1", - "stream-http": "^2.8.0", - "string_decoder": "^1.1.0", - "timers-browserify": "^1.4.2", - "tty-browserify": "0.0.0", + "readable-stream": "^3.3.0", + "stream-browserify": "^2.0.2", + "stream-http": "^3.0.0", + "string_decoder": "^1.2.0", + "timers-browserify": "^2.0.10", + "tty-browserify": "0.0.1", "url": "^0.11.0", - "util": "^0.10.3", - "vm-browserify": "0.0.4" + "util": "^0.11.1", + "vm-browserify": "^1.1.0" }, "dependencies": { "asn1.js": { @@ -55,6 +55,15 @@ "bundled": true, "requires": { "util": "0.10.3" + }, + "dependencies": { + "util": { + "version": "0.10.3", + "bundled": true, + "requires": { + "inherits": "2.0.1" + } + } } }, "base64-js": { @@ -91,12 +100,13 @@ } }, "browserify-des": { - "version": "1.0.1", + "version": "1.0.2", "bundled": true, "requires": { "cipher-base": "^1.0.1", "des.js": "^1.0.0", - "inherits": "^2.0.1" + "inherits": "^2.0.1", + "safe-buffer": "^5.1.2" } }, "browserify-rsa": { @@ -121,19 +131,18 @@ } }, "browserify-zlib": { - "version": "0.1.4", + "version": "0.2.0", "bundled": true, "requires": { - "pako": "~0.2.0" + "pako": "~1.0.5" } }, "buffer": { - "version": "4.9.1", + "version": "5.2.1", "bundled": true, "requires": { "base64-js": "^1.0.2", - "ieee754": "^1.1.4", - "isarray": "^1.0.0" + "ieee754": "^1.1.4" } }, "buffer-xor": { @@ -241,7 +250,7 @@ "bundled": true }, "elliptic": { - "version": "6.4.0", + "version": "6.4.1", "bundled": true, "requires": { "bn.js": "^4.4.0", @@ -254,7 +263,7 @@ } }, "events": { - "version": "1.1.1", + "version": "3.0.0", "bundled": true }, "evp_bytestokey": { @@ -274,11 +283,11 @@ } }, "hash.js": { - "version": "1.1.3", + "version": "1.1.7", "bundled": true, "requires": { "inherits": "^2.0.3", - "minimalistic-assert": "^1.0.0" + "minimalistic-assert": "^1.0.1" }, "dependencies": { "inherits": { @@ -297,15 +306,11 @@ } }, "https-browserify": { - "version": "0.0.1", + "version": "1.0.0", "bundled": true }, "ieee754": { - "version": "1.1.11", - "bundled": true - }, - "indexof": { - "version": "0.0.1", + "version": "1.1.13", "bundled": true }, "inherits": { @@ -317,11 +322,12 @@ "bundled": true }, "md5.js": { - "version": "1.3.4", + "version": "1.3.5", "bundled": true, "requires": { "hash-base": "^3.0.0", - "inherits": "^2.0.1" + "inherits": "^2.0.1", + "safe-buffer": "^5.1.2" } }, "miller-rabin": { @@ -341,30 +347,31 @@ "bundled": true }, "os-browserify": { - "version": "0.2.1", + "version": "0.3.0", "bundled": true }, "pako": { - "version": "0.2.9", + "version": "1.0.10", "bundled": true }, "parse-asn1": { - "version": "5.1.1", + "version": "5.1.4", "bundled": true, "requires": { "asn1.js": "^4.0.0", "browserify-aes": "^1.0.0", "create-hash": "^1.1.0", "evp_bytestokey": "^1.0.0", - "pbkdf2": "^3.0.3" + "pbkdf2": "^3.0.3", + "safe-buffer": "^5.1.1" } }, "path-browserify": { - "version": "0.0.0", + "version": "1.0.0", "bundled": true }, "pbkdf2": { - "version": "3.0.16", + "version": "3.0.17", "bundled": true, "requires": { "create-hash": "^1.1.2", @@ -383,18 +390,19 @@ "bundled": true }, "public-encrypt": { - "version": "4.0.2", + "version": "4.0.3", "bundled": true, "requires": { "bn.js": "^4.1.0", "browserify-rsa": "^4.0.0", "create-hash": "^1.1.0", "parse-asn1": "^5.0.0", - "randombytes": "^2.0.1" + "randombytes": "^2.0.1", + "safe-buffer": "^5.1.2" } }, "punycode": { - "version": "1.4.1", + "version": "2.1.1", "bundled": true }, "querystring": { @@ -406,7 +414,7 @@ "bundled": true }, "randombytes": { - "version": "2.0.6", + "version": "2.1.0", "bundled": true, "requires": { "safe-buffer": "^5.1.0" @@ -421,16 +429,12 @@ } }, "readable-stream": { - "version": "2.3.6", + "version": "3.3.0", "bundled": true, "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" }, "dependencies": { "inherits": { @@ -451,6 +455,10 @@ "version": "5.1.2", "bundled": true }, + "setimmediate": { + "version": "1.0.5", + "bundled": true + }, "sha.js": { "version": "2.4.11", "bundled": true, @@ -460,44 +468,67 @@ } }, "stream-browserify": { - "version": "2.0.1", + "version": "2.0.2", "bundled": true, "requires": { "inherits": "~2.0.1", "readable-stream": "^2.0.2" + }, + "dependencies": { + "readable-stream": { + "version": "2.3.6", + "bundled": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + }, + "dependencies": { + "inherits": { + "version": "2.0.3", + "bundled": true + } + } + }, + "string_decoder": { + "version": "1.1.1", + "bundled": true, + "requires": { + "safe-buffer": "~5.1.0" + } + } } }, "stream-http": { - "version": "2.8.1", + "version": "3.0.0", "bundled": true, "requires": { "builtin-status-codes": "^3.0.0", "inherits": "^2.0.1", - "readable-stream": "^2.3.3", - "to-arraybuffer": "^1.0.0", + "readable-stream": "^3.0.6", "xtend": "^4.0.0" } }, "string_decoder": { - "version": "1.1.1", + "version": "1.2.0", "bundled": true, "requires": { "safe-buffer": "~5.1.0" } }, "timers-browserify": { - "version": "1.4.2", + "version": "2.0.10", "bundled": true, "requires": { - "process": "~0.11.0" + "setimmediate": "^1.0.4" } }, - "to-arraybuffer": { - "version": "1.0.1", - "bundled": true - }, "tty-browserify": { - "version": "0.0.0", + "version": "0.0.1", "bundled": true }, "url": { @@ -515,10 +546,16 @@ } }, "util": { - "version": "0.10.3", + "version": "0.11.1", "bundled": true, "requires": { - "inherits": "2.0.1" + "inherits": "2.0.3" + }, + "dependencies": { + "inherits": { + "version": "2.0.3", + "bundled": true + } } }, "util-deprecate": { @@ -526,11 +563,8 @@ "bundled": true }, "vm-browserify": { - "version": "0.0.4", - "bundled": true, - "requires": { - "indexof": "0.0.1" - } + "version": "1.1.0", + "bundled": true }, "xtend": { "version": "4.0.1", diff --git a/tools/tests/apps/meteor-ignore/package.json b/tools/tests/apps/meteor-ignore/package.json index 086899168e..527ebe065f 100644 --- a/tools/tests/apps/meteor-ignore/package.json +++ b/tools/tests/apps/meteor-ignore/package.json @@ -6,6 +6,6 @@ }, "dependencies": { "@babel/runtime": "^7.5.0", - "meteor-node-stubs": "^0.4.1" + "meteor-node-stubs": "^1.0.0" } } diff --git a/tools/tests/apps/shell/package.json b/tools/tests/apps/shell/package.json index 765d771eba..3867260eb7 100644 --- a/tools/tests/apps/shell/package.json +++ b/tools/tests/apps/shell/package.json @@ -6,6 +6,6 @@ }, "dependencies": { "@babel/runtime": "^7.5.0", - "meteor-node-stubs": "^0.4.1" + "meteor-node-stubs": "^1.0.0" } } diff --git a/tools/tests/apps/standard-app/package.json b/tools/tests/apps/standard-app/package.json index 9bf420705f..bede729806 100644 --- a/tools/tests/apps/standard-app/package.json +++ b/tools/tests/apps/standard-app/package.json @@ -9,7 +9,7 @@ }, "dependencies": { "@babel/runtime": "^7.5.0", - "meteor-node-stubs": "^0.4.1" + "meteor-node-stubs": "^1.0.0" }, "meteor": { "mainModule": false, From c3c7ec4804a792c5eb194e2fc7446d358bfbf506 Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Thu, 4 Jul 2019 16:36:48 -0400 Subject: [PATCH 149/327] Give Meteor 1.8.2 an official heading in History.md. --- History.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/History.md b/History.md index 0afe1c1286..6270547b2a 100644 --- a/History.md +++ b/History.md @@ -1,5 +1,7 @@ ## v.NEXT +## v1.8.2, TBD + ### Breaking changes N/A From d26a41df9d998fb4ae6507e06df0ec6458cd78a9 Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Thu, 4 Jul 2019 16:39:01 -0400 Subject: [PATCH 150/327] Bump package versions for 1.8.2-beta.13 release. --- packages/babel-compiler/package.js | 2 +- packages/babel-runtime/package.js | 2 +- packages/context/package.js | 2 +- packages/ecmascript-runtime-client/package.js | 2 +- packages/ecmascript-runtime-server/package.js | 2 +- packages/ecmascript/package.js | 2 +- packages/meteor-tool/package.js | 2 +- packages/modules-runtime/package.js | 2 +- packages/modules/package.js | 2 +- packages/mongo/package.js | 2 +- packages/npm-mongo/package.js | 2 +- scripts/admin/meteor-release-experimental.json | 2 +- 12 files changed, 12 insertions(+), 12 deletions(-) diff --git a/packages/babel-compiler/package.js b/packages/babel-compiler/package.js index 2264f4ef30..57bff79a29 100644 --- a/packages/babel-compiler/package.js +++ b/packages/babel-compiler/package.js @@ -6,7 +6,7 @@ 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.4.0-beta182.12' + version: '7.4.0-beta182.13' }); Npm.depends({ diff --git a/packages/babel-runtime/package.js b/packages/babel-runtime/package.js index 6ec77d063f..5d991786bd 100644 --- a/packages/babel-runtime/package.js +++ b/packages/babel-runtime/package.js @@ -1,7 +1,7 @@ Package.describe({ name: "babel-runtime", summary: "Runtime support for output of Babel transpiler", - version: '1.4.0-beta182.12', + version: '1.4.0-beta182.13', documentation: 'README.md' }); diff --git a/packages/context/package.js b/packages/context/package.js index 18d5ce4b26..80fe19d2b7 100644 --- a/packages/context/package.js +++ b/packages/context/package.js @@ -1,6 +1,6 @@ Package.describe({ name: "context", - version: "0.4.0-beta182.12", + version: "0.4.0-beta182.13", summary: "Manage contextual information without passing objects around", documentation: "README.md" }); diff --git a/packages/ecmascript-runtime-client/package.js b/packages/ecmascript-runtime-client/package.js index b7b02d7d6d..81c05d37f4 100644 --- a/packages/ecmascript-runtime-client/package.js +++ b/packages/ecmascript-runtime-client/package.js @@ -1,6 +1,6 @@ Package.describe({ name: "ecmascript-runtime-client", - version: "0.9.0-beta182.12", + version: "0.9.0-beta182.13", summary: "Polyfills for new ECMAScript 2015 APIs like Map and Set", git: "https://github.com/meteor/meteor/tree/devel/packages/ecmascript-runtime-client", documentation: "README.md" diff --git a/packages/ecmascript-runtime-server/package.js b/packages/ecmascript-runtime-server/package.js index 33a75c4047..768af41c46 100644 --- a/packages/ecmascript-runtime-server/package.js +++ b/packages/ecmascript-runtime-server/package.js @@ -1,6 +1,6 @@ Package.describe({ name: "ecmascript-runtime-server", - version: "0.8.0-beta182.12", + version: "0.8.0-beta182.13", summary: "Polyfills for new ECMAScript 2015 APIs like Map and Set", git: "https://github.com/meteor/meteor/tree/devel/packages/ecmascript-runtime-client", documentation: "README.md" diff --git a/packages/ecmascript/package.js b/packages/ecmascript/package.js index 498c0895b3..569485e525 100644 --- a/packages/ecmascript/package.js +++ b/packages/ecmascript/package.js @@ -1,6 +1,6 @@ Package.describe({ name: 'ecmascript', - version: '0.13.0-beta182.12', + version: '0.13.0-beta182.13', summary: 'Compiler plugin that supports ES2015+ in all .js files', documentation: 'README.md' }); diff --git a/packages/meteor-tool/package.js b/packages/meteor-tool/package.js index a9df049c6f..4a3f37692b 100644 --- a/packages/meteor-tool/package.js +++ b/packages/meteor-tool/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "The Meteor command-line tool", - version: '1.8.2-beta.12' + version: '1.8.2-beta.13' }); Package.includeTool(); diff --git a/packages/modules-runtime/package.js b/packages/modules-runtime/package.js index 9f712baf66..9a76a84d61 100644 --- a/packages/modules-runtime/package.js +++ b/packages/modules-runtime/package.js @@ -1,6 +1,6 @@ Package.describe({ name: "modules-runtime", - version: "0.11.0-beta182.12", + version: "0.11.0-beta182.13", summary: "CommonJS module system", git: "https://github.com/benjamn/install", documentation: "README.md" diff --git a/packages/modules/package.js b/packages/modules/package.js index d25f81a182..38f4629cfe 100644 --- a/packages/modules/package.js +++ b/packages/modules/package.js @@ -1,6 +1,6 @@ Package.describe({ name: "modules", - version: "0.14.0-beta182.12", + version: "0.14.0-beta182.13", summary: "CommonJS module system", documentation: "README.md" }); diff --git a/packages/mongo/package.js b/packages/mongo/package.js index b09c62e6ed..a7d1562585 100644 --- a/packages/mongo/package.js +++ b/packages/mongo/package.js @@ -9,7 +9,7 @@ Package.describe({ summary: "Adaptor for using MongoDB and Minimongo over DDP", - version: '1.7.0-beta182.12' + version: '1.7.0-beta182.13' }); Npm.depends({ diff --git a/packages/npm-mongo/package.js b/packages/npm-mongo/package.js index aae8347df9..348d01a8e9 100644 --- a/packages/npm-mongo/package.js +++ b/packages/npm-mongo/package.js @@ -3,7 +3,7 @@ Package.describe({ summary: "Wrapper around the mongo npm package", - version: "3.2.0-beta182.12", + version: "3.2.0-beta182.13", documentation: null }); diff --git a/scripts/admin/meteor-release-experimental.json b/scripts/admin/meteor-release-experimental.json index 35b006b6d0..6e0a82f4c6 100644 --- a/scripts/admin/meteor-release-experimental.json +++ b/scripts/admin/meteor-release-experimental.json @@ -1,6 +1,6 @@ { "track": "METEOR", - "version": "1.8.2-beta.12", + "version": "1.8.2-beta.13", "recommended": false, "official": false, "description": "Meteor" From 8259c75421d63cb332036c826c3fee5ea9ff756b Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Thu, 4 Jul 2019 17:25:41 -0400 Subject: [PATCH 151/327] Tweaks to pacify TypeScript in tools/fs/files.ts. --- tools/fs/files.ts | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/tools/fs/files.ts b/tools/fs/files.ts index b97d928144..9337347737 100644 --- a/tools/fs/files.ts +++ b/tools/fs/files.ts @@ -1393,10 +1393,12 @@ export class KeyValueFile { export function getHomeDir() { if (process.platform === "win32") { - return pathDirname(convertToStandardPath(process.env.METEOR_INSTALLATION)); - } else { - return process.env.HOME; + const MI = process.env.METEOR_INSTALLATION; + if (typeof MI === "string") { + return pathDirname(convertToStandardPath(MI)); + } } + return process.env.HOME; } export function currentEnvWithPathsAdded(...paths: string[]) { @@ -1675,7 +1677,7 @@ function wrapDestructiveFsFunc< export const readFile = wrapFsFunc("readFile", fs.readFileSync, [0], { modifyReturnValue: function (fileData: Buffer | string) { - if (_.isString(fileData)) { + if (typeof fileData === "string") { return convertToStandardLineEndings(fileData); } return fileData; @@ -1738,7 +1740,7 @@ export const realpath = wrapFsFunc("realpath", fs.realpathSync, [0], { export const readdir = wrapFsFunc("readdir", fs.readdirSync, [0], { cached: true, modifyReturnValue(entries: string[]) { - return entries.map(convertToStandardPath); + return entries.map(entry => convertToStandardPath(entry)); }, }); From 55bde8acb8f76f5fd6842f4edcd3fbb8a6edf627 Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Fri, 5 Jul 2019 12:23:43 -0400 Subject: [PATCH 152/327] Improve generic types in tools/fs/files.ts. --- tools/fs/files.ts | 38 ++++++++++++++++---------------------- 1 file changed, 16 insertions(+), 22 deletions(-) diff --git a/tools/fs/files.ts b/tools/fs/files.ts index 9337347737..99f40fd1f3 100644 --- a/tools/fs/files.ts +++ b/tools/fs/files.ts @@ -157,7 +157,7 @@ export function findGitCommitHash(path: string) { export function addToGitignore(dirPath: string, entry: string) { const filePath = pathJoin(dirPath, ".gitignore"); if (exists(filePath)) { - let data = readFile(filePath, 'utf8'); + let data = readFile(filePath, 'utf8') as string; const lines = data.split(/\n/); if (lines.some(line => line === entry)) { // already there do nothing @@ -1364,7 +1364,7 @@ export class KeyValueFile { constructor(public path: string) {} set(k: string, v: any) { - const data = this.readAll() || ''; + const data = (this.readAll() || '').toString("utf8"); const lines = data.split(/\n/); let found = false; @@ -1585,16 +1585,12 @@ type wrapFsFuncOptions = { dirty?: (...args: TArgs) => any; } -function wrapFsFunc< - TArgs extends any[], - TResult, - F extends (...args: TArgs) => TResult, ->( +function wrapFsFunc( fnName: string, - fn: F, + fn: (...args: TArgs) => TResult, pathArgIndices: number[], options?: wrapFsFuncOptions, -): F { +): typeof fn { return Profile("files." + fnName, function (...args: TArgs) { for (let j = pathArgIndices.length - 1; j >= 0; --j) { const i = pathArgIndices[j]; @@ -1637,7 +1633,7 @@ function wrapFsFunc< } return finalResult; - }) as F; + }); } const withCacheSlot = new Slot>(); @@ -1657,22 +1653,18 @@ export const dependOnPath = wrap( { disposable: true } ); -function wrapDestructiveFsFunc< - TArgs extends any[], - TResult, - F extends (...args: TArgs) => TResult, ->( +function wrapDestructiveFsFunc( fnName: string, - fn: F, + fn: (...args: TArgs) => TResult, pathArgIndices: number[] = [0], options?: wrapFsFuncOptions, -): F { - return wrapFsFunc(fnName, fn, pathArgIndices, { +): typeof fn { + return wrapFsFunc(fnName, fn, pathArgIndices, { ...options, dirty(...args: TArgs) { pathArgIndices.forEach(i => dependOnPath.dirty(args[i])); } - }) as F; + }); } export const readFile = wrapFsFunc("readFile", fs.readFileSync, [0], { @@ -1732,12 +1724,14 @@ export const rename = isWindowsLikeFilesystem() ? function (from: string, to: st } : wrappedRename; // Warning: doesn't convert slashes in the second 'cache' arg -export const realpath = wrapFsFunc("realpath", fs.realpathSync, [0], { +export const realpath = +wrapFsFunc<[string], string>("realpath", fs.realpathSync, [0], { cached: true, modifyReturnValue: convertToStandardPath, }); -export const readdir = wrapFsFunc("readdir", fs.readdirSync, [0], { +export const readdir = +wrapFsFunc<[string], string[]>("readdir", fs.readdirSync, [0], { cached: true, modifyReturnValue(entries: string[]) { return entries.map(entry => convertToStandardPath(entry)); @@ -1753,7 +1747,7 @@ export const lstat = wrapFsFunc("lstat", fs.lstatSync, [0], { cached: true }); export const mkdir = wrapDestructiveFsFunc("mkdir", fs.mkdirSync); export const open = wrapFsFunc("open", fs.openSync, [0]); export const read = wrapFsFunc("read", fs.readSync, []); -export const readlink = wrapFsFunc("readlink", fs.readlinkSync, [0]); +export const readlink = wrapFsFunc<[string], string>("readlink", fs.readlinkSync, [0]); export const rmdir = wrapDestructiveFsFunc("rmdir", fs.rmdirSync); export const stat = wrapFsFunc("stat", fs.statSync, [0], { cached: true }); export const symlink = wrapFsFunc("symlink", fs.symlinkSync, [0, 1]); From 528b5494600dfdcbc2642288783decf0590c51e4 Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Fri, 5 Jul 2019 12:28:59 -0400 Subject: [PATCH 153/327] Convert tools/fs/optimistic.js to TypeScript. --- tools/cordova/builder.js | 2 +- tools/fs/{optimistic.js => optimistic.ts} | 101 +++++++++++++--------- tools/fs/watch.js | 2 +- tools/isobuild/builder.js | 2 +- tools/isobuild/compiler-plugin.js | 2 +- tools/isobuild/compiler.js | 2 +- tools/isobuild/import-scanner.js | 2 +- tools/isobuild/meteor-npm.js | 2 +- tools/isobuild/package-source.js | 2 +- tools/isobuild/resolver.js | 2 +- tools/packaging/catalog/catalog-local.js | 2 +- tools/project-context.js | 2 +- 12 files changed, 70 insertions(+), 53 deletions(-) rename tools/fs/{optimistic.js => optimistic.ts} (76%) diff --git a/tools/cordova/builder.js b/tools/cordova/builder.js index 83eb7df54a..25fa6a149b 100644 --- a/tools/cordova/builder.js +++ b/tools/cordova/builder.js @@ -4,7 +4,7 @@ import path from 'path'; import { Console } from '../console/console.js'; import buildmessage from '../utils/buildmessage.js'; import files from '../fs/files'; -import { optimisticReadJsonOrNull } from "../fs/optimistic.js"; +import { optimisticReadJsonOrNull } from "../fs/optimistic"; import bundler from '../isobuild/bundler.js'; import archinfo from '../utils/archinfo.js'; import release from '../packaging/release.js'; diff --git a/tools/fs/optimistic.js b/tools/fs/optimistic.ts similarity index 76% rename from tools/fs/optimistic.js rename to tools/fs/optimistic.ts index ad00de3359..34db72de87 100644 --- a/tools/fs/optimistic.js +++ b/tools/fs/optimistic.ts @@ -1,5 +1,6 @@ import assert from "assert"; -import { wrap } from "optimism"; +import { wrap, OptimisticWrapperFunction } from "optimism"; +import ignore from "ignore"; import { Profile } from "../tool-env/profile.js"; import { watch } from "./safe-watcher.js"; import { sha1 } from "./watch.js"; @@ -20,12 +21,20 @@ import { // by setting this environment variable. const ENABLED = ! process.env.METEOR_DISABLE_OPTIMISTIC_CACHING; -function makeOptimistic(name, fn) { - const wrapper = wrap(ENABLED ? function (...args) { - maybeDependOnPath(args[0]); - return fn.apply(this, args); - } : fn, { - makeCacheKey(...args) { +function makeOptimistic< + TArgs extends any[], + TResult, +>( + name: string, + fn: (...args: TArgs) => TResult, +): OptimisticWrapperFunction { + fn = Profile("optimistic " + name, fn); + + const wrapper = wrap(ENABLED ? function (this: any) { + maybeDependOnPath(arguments[0]); + return fn.apply(this, arguments as any); + } as typeof fn : fn, { + makeCacheKey(...args: TArgs) { if (! ENABLED) { // Cache nothing when the optimistic caching system is disabled. return; @@ -36,24 +45,16 @@ function makeOptimistic(name, fn) { return; } - var parts = []; - - for (var i = 0; i < args.length; ++i) { - var arg = args[i]; - - if (typeof arg !== "string") { - // If any of the arguments is not a string, then we won't cache the - // result of the corresponding file.* method invocation. - return; - } - - parts.push(arg); + if (! args.every(arg => typeof arg === "string")) { + // If any of the arguments is not a string, then we won't cache the + // result of the corresponding file.* method invocation. + return; } - return parts.join("\0"); + return args.join("\0"); }, - subscribe(...args) { + subscribe(...args: TArgs) { const path = args[0]; if (! shouldWatch(path)) { @@ -75,10 +76,10 @@ function makeOptimistic(name, fn) { } }); - return Profile("optimistic " + name, wrapper); + return wrapper; } -export const shouldWatch = wrap(path => { +export const shouldWatch = wrap((path: string) => { const parts = path.split(pathSep); const nmi = parts.indexOf("node_modules"); @@ -119,14 +120,14 @@ export const shouldWatch = wrap(path => { return false; }); -function maybeDependOnPath(path) { +function maybeDependOnPath(path: string) { if (typeof path === "string") { dependOnPath(path); maybeDependOnNodeModules(path); } } -function maybeDependOnNodeModules(path) { +function maybeDependOnNodeModules(path: string) { if (typeof path !== "string") { return; } @@ -147,12 +148,12 @@ function maybeDependOnNodeModules(path) { let dependOnDirectorySalt = 0; -const dependOnDirectory = wrap(dir => { +const dependOnDirectory = wrap((_dir: string) => { // Always return something different to prevent optimism from // second-guessing the dirtiness of this function. return ++dependOnDirectorySalt; }, { - subscribe(dir) { + subscribe(dir: string) { let watcher = watch( dir, () => dependOnDirectory.dirty(dir), @@ -177,7 +178,7 @@ const dependOnDirectory = wrap(dir => { // file change notification for the parent directory, so it's important to // depend on the parent directory using this function, so that we don't // cache the unsuccessful result forever. -function dependOnParentDirectory(path) { +function dependOnParentDirectory(path: string) { const parentDir = pathDirname(path); if (parentDir !== path) { dependOnDirectory(parentDir); @@ -190,7 +191,7 @@ function dependOnParentDirectory(path) { // Note that this strategy will not detect changes within subdirectories // of this node_modules directory, but that's ok because the use case we // care about is adding or removing npm packages. -const dependOnNodeModules = wrap(nodeModulesDir => { +const dependOnNodeModules = wrap((nodeModulesDir: string) => { assert(pathIsAbsolute(nodeModulesDir)); assert(nodeModulesDir.endsWith(pathSep + "node_modules")); return dependOnDirectory(nodeModulesDir); @@ -202,11 +203,11 @@ const dependOnNodeModules = wrap(nodeModulesDir => { // Invalidate all optimistic results derived from paths involving the // given node_modules directory. -export function dirtyNodeModulesDirectory(nodeModulesDir) { +export function dirtyNodeModulesDirectory(nodeModulesDir: string) { dependOnNodeModules.dirty(nodeModulesDir); } -export const optimisticStatOrNull = makeOptimistic("statOrNull", path => { +export const optimisticStatOrNull = makeOptimistic("statOrNull", (path: string) => { const result = statOrNull(path); if (result === null) { dependOnParentDirectory(path); @@ -215,7 +216,7 @@ export const optimisticStatOrNull = makeOptimistic("statOrNull", path => { }); export const optimisticLStat = makeOptimistic("lstat", lstat); -export const optimisticLStatOrNull = makeOptimistic("lstatOrNull", path => { +export const optimisticLStatOrNull = makeOptimistic("lstatOrNull", (path: string) => { try { return optimisticLStat(path); } catch (e) { @@ -226,9 +227,12 @@ export const optimisticLStatOrNull = makeOptimistic("lstatOrNull", path => { }); export const optimisticReadFile = makeOptimistic("readFile", readFile); export const optimisticReaddir = makeOptimistic("readdir", readdir); -export const optimisticHashOrNull = makeOptimistic("hashOrNull", (...args) => { +export const optimisticHashOrNull = makeOptimistic("hashOrNull", ( + path: string, + options: Parameters[1], +) => { try { - return sha1(optimisticReadFile(...args)); + return sha1(optimisticReadFile(path, options)) as string; } catch (e) { if (e.code !== "EISDIR" && @@ -237,15 +241,22 @@ export const optimisticHashOrNull = makeOptimistic("hashOrNull", (...args) => { } } - dependOnParentDirectory(args[0]); + dependOnParentDirectory(path); return null; }); export const optimisticReadJsonOrNull = -makeOptimistic("readJsonOrNull", (path, options) => { +makeOptimistic("readJsonOrNull", ( + path: string, + options?: Parameters[1] & { + allowSyntaxError?: boolean; + }, +) => { try { - return JSON.parse(optimisticReadFile(path, options)); + return JSON.parse( + optimisticReadFile(path, options) + ) as Record; } catch (e) { if (e.code === "ENOENT") { @@ -262,21 +273,27 @@ makeOptimistic("readJsonOrNull", (path, options) => { } }); -export const optimisticReadMeteorIgnore = wrap(dir => { +export const optimisticReadMeteorIgnore = wrap((dir: string) => { const meteorIgnorePath = pathJoin(dir, ".meteorignore"); const meteorIgnoreStat = optimisticStatOrNull(meteorIgnorePath); if (meteorIgnoreStat && meteorIgnoreStat.isFile()) { - return require("ignore")().add( - optimisticReadFile(meteorIgnorePath, "utf8") + return ignore().add( + optimisticReadFile(meteorIgnorePath).toString("utf8") ); } return null; }); -export const optimisticLookupPackageJson = wrap((absRootDir, relDir) => { +type LookupPkgJsonType = OptimisticWrapperFunction< + [string, string], + ReturnType +>; + +export const optimisticLookupPackageJson: LookupPkgJsonType = +wrap((absRootDir: string, relDir: string) => { const absPkgJsonPath = pathJoin(absRootDir, relDir, "package.json"); const pkgJson = optimisticReadJsonOrNull(absPkgJsonPath); if (pkgJson && typeof pkgJson.name === "string") { @@ -296,7 +313,7 @@ export const optimisticLookupPackageJson = wrap((absRootDir, relDir) => { return optimisticLookupPackageJson(absRootDir, relParentDir); }); -const optimisticIsSymbolicLink = wrap(path => { +const optimisticIsSymbolicLink = wrap((path: string) => { try { return lstat(path).isSymbolicLink(); } catch (e) { diff --git a/tools/fs/watch.js b/tools/fs/watch.js index 7bc85586a0..493807eb84 100644 --- a/tools/fs/watch.js +++ b/tools/fs/watch.js @@ -7,7 +7,7 @@ import {Profile} from '../tool-env/profile.js'; import { optimisticHashOrNull, -} from "./optimistic.js"; +} from "./optimistic"; const WATCH_COALESCE_MS = process.env.METEOR_FILE_WATCH_COALESCE_MS || 100; diff --git a/tools/isobuild/builder.js b/tools/isobuild/builder.js index 27fefd8566..764b83e0c2 100644 --- a/tools/isobuild/builder.js +++ b/tools/isobuild/builder.js @@ -11,7 +11,7 @@ import { optimisticStatOrNull, optimisticLStatOrNull, optimisticHashOrNull, -} from "../fs/optimistic.js"; +} from "../fs/optimistic"; // Builder is in charge of writing "bundles" to disk, which are // directory trees such as site archives, programs, and packages. In diff --git a/tools/isobuild/compiler-plugin.js b/tools/isobuild/compiler-plugin.js index 1cc3c38dda..d92212cd7f 100644 --- a/tools/isobuild/compiler-plugin.js +++ b/tools/isobuild/compiler-plugin.js @@ -19,7 +19,7 @@ import Resolver from "./resolver.js"; import { optimisticStatOrNull, optimisticReadJsonOrNull, -} from "../fs/optimistic.js"; +} from "../fs/optimistic"; import { isTestFilePath } from './test-files.js'; diff --git a/tools/isobuild/compiler.js b/tools/isobuild/compiler.js index 051d3930b6..76d80ecaaa 100644 --- a/tools/isobuild/compiler.js +++ b/tools/isobuild/compiler.js @@ -17,7 +17,7 @@ import { SourceProcessorSet } from './build-plugin.js'; import { optimisticReadFile, optimisticHashOrNull, -} from "../fs/optimistic.js"; +} from "../fs/optimistic"; var compiler = exports; diff --git a/tools/isobuild/import-scanner.js b/tools/isobuild/import-scanner.js index da32be01cc..cf7d9edbc3 100644 --- a/tools/isobuild/import-scanner.js +++ b/tools/isobuild/import-scanner.js @@ -39,7 +39,7 @@ import { optimisticLStatOrNull, optimisticHashOrNull, shouldWatch, -} from "../fs/optimistic.js"; +} from "../fs/optimistic"; import { wrap } from "optimism"; import { compile as reifyCompile } from "reify/lib/compiler"; diff --git a/tools/isobuild/meteor-npm.js b/tools/isobuild/meteor-npm.js index 3b0c83144c..11325028be 100644 --- a/tools/isobuild/meteor-npm.js +++ b/tools/isobuild/meteor-npm.js @@ -30,7 +30,7 @@ import { optimisticStatOrNull, optimisticReadJsonOrNull, optimisticReaddir, -} from "../fs/optimistic.js"; +} from "../fs/optimistic"; var meteorNpm = exports; diff --git a/tools/isobuild/package-source.js b/tools/isobuild/package-source.js index bc146a7060..b05f0ce6f3 100644 --- a/tools/isobuild/package-source.js +++ b/tools/isobuild/package-source.js @@ -35,7 +35,7 @@ import { optimisticStatOrNull, optimisticReadMeteorIgnore, optimisticLookupPackageJson, -} from "../fs/optimistic.js"; +} from "../fs/optimistic"; // XXX: This is a medium-term hack, to avoid having the user set a package name // & test-name in package.describe. We will change this in the new control file diff --git a/tools/isobuild/resolver.js b/tools/isobuild/resolver.js index 326cbf2a27..f9b51217b2 100644 --- a/tools/isobuild/resolver.js +++ b/tools/isobuild/resolver.js @@ -24,7 +24,7 @@ import { wrap } from "optimism"; import { optimisticStatOrNull, optimisticReadJsonOrNull, -} from "../fs/optimistic.js"; +} from "../fs/optimistic"; const nativeModulesMap = Object.create(null); const nativeNames = Object.keys(process.binding("natives")); diff --git a/tools/packaging/catalog/catalog-local.js b/tools/packaging/catalog/catalog-local.js index 8b5e612ff7..30ce189b1c 100644 --- a/tools/packaging/catalog/catalog-local.js +++ b/tools/packaging/catalog/catalog-local.js @@ -8,7 +8,7 @@ import { sync as glob } from "glob"; import { Profile } from "../../tool-env/profile.js"; import { optimisticHashOrNull, -} from "../../fs/optimistic.js"; +} from "../../fs/optimistic"; // LocalCatalog represents packages located in the application's // package directory, other package directories specified via an diff --git a/tools/project-context.js b/tools/project-context.js index f7cf432d9c..3bb56648d1 100644 --- a/tools/project-context.js +++ b/tools/project-context.js @@ -20,7 +20,7 @@ import { KNOWN_ISOBUILD_FEATURE_PACKAGES } from './isobuild/compiler.js'; import { optimisticReadJsonOrNull, optimisticHashOrNull, -} from "./fs/optimistic.js"; +} from "./fs/optimistic"; import { mapWhereToArches, From e80189e76b16f17defbbe675579b3fa7c28e7ea2 Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Fri, 5 Jul 2019 17:39:10 -0400 Subject: [PATCH 154/327] Update meteor-babel to version 7.5.1. --- History.md | 2 +- .../.npm/package/npm-shrinkwrap.json | 17 +++++++++++------ packages/babel-compiler/package.js | 2 +- scripts/dev-bundle-tool-package.js | 2 +- 4 files changed, 14 insertions(+), 9 deletions(-) diff --git a/History.md b/History.md index 6270547b2a..448445fb18 100644 --- a/History.md +++ b/History.md @@ -47,7 +47,7 @@ N/A * The `mongodb` npm package used by the `npm-mongo` Meteor package has been updated to version 3.2.7. -* The `meteor-babel` npm package has been updated to version 7.5.0. +* The `meteor-babel` npm package has been updated to version 7.5.1. * The `reify` npm package has been updated to version 0.20.12. diff --git a/packages/babel-compiler/.npm/package/npm-shrinkwrap.json b/packages/babel-compiler/.npm/package/npm-shrinkwrap.json index 3953b145d8..64a4750dde 100644 --- a/packages/babel-compiler/.npm/package/npm-shrinkwrap.json +++ b/packages/babel-compiler/.npm/package/npm-shrinkwrap.json @@ -163,6 +163,11 @@ "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.2.0.tgz", "integrity": "sha512-1ZrIRBv2t0GSlcwVoQ6VgSLpLgiN/FVQUzt9znxo7v2Ov4jJrs8RY8tv0wvDmFN3qIdMKWrmMMW6yZ0G19MfGg==" }, + "@babel/plugin-syntax-class-properties": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.2.0.tgz", + "integrity": "sha512-UxYaGXYQ7rrKJS/PxIKRkv3exi05oH7rokBAsmCSsCxz1sVPZ7Fu6FzKoGgUvmY+0YgSkYHgUoCh5R5bCNBQlw==" + }, "@babel/plugin-syntax-dynamic-import": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-dynamic-import/-/plugin-syntax-dynamic-import-7.2.0.tgz", @@ -524,9 +529,9 @@ "integrity": "sha1-viQcqBQEAwZ4t0hxcyK4nQyP4oA=" }, "babel-preset-meteor": { - "version": "7.5.0", - "resolved": "https://registry.npmjs.org/babel-preset-meteor/-/babel-preset-meteor-7.5.0.tgz", - "integrity": "sha512-m1fH7DcIC0Kpe+1e6TSF2TwSC0Raqr7UKyzGGsSWgUjqWhRVJSboStMBeeSdGziJemU7mJqXF7MIrbRRFNGYpQ==" + "version": "7.5.1", + "resolved": "https://registry.npmjs.org/babel-preset-meteor/-/babel-preset-meteor-7.5.1.tgz", + "integrity": "sha512-qmXkyQYiT0hqGgESo3Ns3bjQRU/JW7b96knzxOAM1vg/gJCcjL9wAkDG6sro5+dkKNP6l5AR+E5DbNcXeDuRiw==" }, "babel-preset-minify": { "version": "0.5.0", @@ -629,9 +634,9 @@ "integrity": "sha512-6QK0OpF/phMz0Q2AxILkX2mFhi7m+WMwTRg0LQKq/WBB0cDP4rYH3Wp4/d3OTXlrPLVJT/RFqj8tFeAR4nk8AA==" }, "meteor-babel": { - "version": "7.5.0", - "resolved": "https://registry.npmjs.org/meteor-babel/-/meteor-babel-7.5.0.tgz", - "integrity": "sha512-WcodS/EkKn6avgG05Q27nmoj/jo3DLMRQcSHnqzlDa+lvUk9SftW2LL9MK6LJWJQtCuxPFuEd/C8mrVd/T/TXg==" + "version": "7.5.1", + "resolved": "https://registry.npmjs.org/meteor-babel/-/meteor-babel-7.5.1.tgz", + "integrity": "sha512-Ff71xbTkpaqZvovOL6KXFzoOkOoyqT+/LScR3V8bcLLu726XhobUYKKIVjyjSc8IvXR/Pwi8rrstmpY1mZZqvg==" }, "meteor-babel-helpers": { "version": "0.0.3", diff --git a/packages/babel-compiler/package.js b/packages/babel-compiler/package.js index 57bff79a29..83fec4de8b 100644 --- a/packages/babel-compiler/package.js +++ b/packages/babel-compiler/package.js @@ -10,7 +10,7 @@ Package.describe({ }); Npm.depends({ - 'meteor-babel': '7.5.0', + 'meteor-babel': '7.5.1', 'json5': '2.1.0' }); diff --git a/scripts/dev-bundle-tool-package.js b/scripts/dev-bundle-tool-package.js index 80351198a5..7c8e05af71 100644 --- a/scripts/dev-bundle-tool-package.js +++ b/scripts/dev-bundle-tool-package.js @@ -14,7 +14,7 @@ var packageJson = { pacote: "https://github.com/meteor/pacote/tarball/74fafef8d16c3c5bdf4d3aca5123d49db63680e9", "node-gyp": "5.0.1", "node-pre-gyp": "0.13.0", - "meteor-babel": "7.5.0", + "meteor-babel": "7.5.1", // Keep the versions of these packages consistent with the versions // found in dev-bundle-server-package.js. "meteor-promise": "0.8.7", From 75da77c1e342fb8243bfa8bc66870a4bc43ba7c4 Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Fri, 5 Jul 2019 17:41:07 -0400 Subject: [PATCH 155/327] Bump $BUNDLE_VERSION to 8.16.0.19 before rebuilding dev bundle. --- meteor | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meteor b/meteor index 99bc288c9c..71f05f498c 100755 --- a/meteor +++ b/meteor @@ -1,6 +1,6 @@ #!/usr/bin/env bash -BUNDLE_VERSION=8.16.0.18 +BUNDLE_VERSION=8.16.0.19 # OS Check. Put here because here is where we download the precompiled # bundles that are arch specific. From 8958cbc5e99bb743f0f6e7b83fb372367515d129 Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Fri, 5 Jul 2019 17:40:18 -0400 Subject: [PATCH 156/327] Convert tools/fs/watch.js to TypeScript. --- tools/fs/files.ts | 7 +- tools/fs/optimistic.ts | 4 +- tools/fs/{watch.js => watch.ts} | 570 +++++++++--------- tools/isobuild/builder.js | 2 +- tools/isobuild/bundler.js | 2 +- .../compiler-deprecated-compile-step.js | 2 +- tools/isobuild/compiler-plugin.js | 2 +- tools/isobuild/compiler.js | 2 +- tools/isobuild/import-scanner.js | 2 +- tools/isobuild/isopack-cache.js | 2 +- tools/isobuild/isopack.js | 2 +- tools/isobuild/linker.js | 2 +- tools/isobuild/package-source.js | 2 +- tools/isobuild/resolver.js | 2 +- tools/isobuild/source-arch.js | 2 +- tools/isobuild/unibuild.js | 2 +- tools/packaging/catalog/catalog-local.js | 2 +- tools/project-context.js | 2 +- tools/runners/run-app.js | 2 +- tools/tests/old.js | 4 +- tools/tests/old/test-watch.js | 2 +- tools/tests/utils-tests.js | 2 +- tools/tool-env/isopackets.js | 2 +- 23 files changed, 317 insertions(+), 306 deletions(-) rename tools/fs/{watch.js => watch.ts} (58%) diff --git a/tools/fs/files.ts b/tools/fs/files.ts index 99f40fd1f3..75e734ee26 100644 --- a/tools/fs/files.ts +++ b/tools/fs/files.ts @@ -246,10 +246,13 @@ export function getCurrentToolsDir() { // Read a settings file and sanity-check it. Returns a string on // success or null on failure (in which case buildmessages will be // emitted). -export function getSettings(filename: string, watchSet: any) { +export function getSettings( + filename: string, + watchSet: import("./watch").WatchSet, +) { buildmessage.assertInCapture(); const absPath = pathResolve(filename); - const buffer = require("./watch.js").readAndWatchFile(watchSet, absPath); + const buffer = require("./watch").readAndWatchFile(watchSet, absPath); if (buffer === null) { buildmessage.error("file not found (settings file)", { file: filename }); diff --git a/tools/fs/optimistic.ts b/tools/fs/optimistic.ts index 34db72de87..341719e1a7 100644 --- a/tools/fs/optimistic.ts +++ b/tools/fs/optimistic.ts @@ -3,7 +3,7 @@ import { wrap, OptimisticWrapperFunction } from "optimism"; import ignore from "ignore"; import { Profile } from "../tool-env/profile.js"; import { watch } from "./safe-watcher.js"; -import { sha1 } from "./watch.js"; +import { sha1 } from "./watch"; import { pathSep, pathBasename, @@ -229,7 +229,7 @@ export const optimisticReadFile = makeOptimistic("readFile", readFile); export const optimisticReaddir = makeOptimistic("readdir", readdir); export const optimisticHashOrNull = makeOptimistic("hashOrNull", ( path: string, - options: Parameters[1], + options?: Parameters[1], ) => { try { return sha1(optimisticReadFile(path, options)) as string; diff --git a/tools/fs/watch.js b/tools/fs/watch.ts similarity index 58% rename from tools/fs/watch.js rename to tools/fs/watch.ts index 493807eb84..4235fae2a6 100644 --- a/tools/fs/watch.js +++ b/tools/fs/watch.ts @@ -1,16 +1,17 @@ -import files from './files'; -import _ from "underscore"; -import * as safeWatcher from './safe-watcher.js'; -import {createHash} from "crypto"; -import {coalesce} from '../utils/func-utils.js'; -import {Profile} from '../tool-env/profile.js'; - +import { Stats, FSWatcher } from "fs"; +import * as files from "./files"; +import * as safeWatcher from "./safe-watcher.js"; +import { createHash } from "crypto"; +import { coalesce } from "../utils/func-utils.js"; +import { Profile } from "../tool-env/profile.js"; import { optimisticHashOrNull, } from "./optimistic"; +const _ = require("underscore"); + const WATCH_COALESCE_MS = - process.env.METEOR_FILE_WATCH_COALESCE_MS || 100; + +(process.env.METEOR_FILE_WATCH_COALESCE_MS || 100); // Watch for changes to a set of files, and the first time that any of // the files change, call a user-provided callback. (If you want a @@ -68,120 +69,123 @@ const WATCH_COALESCE_MS = // nonexistent if they point to something nonexist, etc). Not sure if this is // correct. +type DirectoryEntry = { + absPath: string; + include: RegExp[]; + exclude: RegExp[]; + names: string[]; + contents: string[] | null; +} + export class WatchSet { - constructor() { - var self = this; + // Set this to true if any Watcher built on this WatchSet must immediately + // fire (eg, if this WatchSet was given two different sha1 for the same file). + public alwaysFire = false; - // Set this to true if any Watcher built on this WatchSet must immediately - // fire (eg, if this WatchSet was given two different sha1 for the same file). - self.alwaysFire = false; + // Map from the absolute path to a file, to a sha1 hash, or null if the file + // should not exist. A Watcher created from this set fires when the file + // changes from that sha, or is deleted (if non-null) or created (if null). + // + // Note that Isopack.getSourceFilesUnderSourceRoot() depends on this field + // existing (it's not just an internal implementation detail of watch.ts). + public readonly files: Record = Object.create(null); - // Map from the absolute path to a file, to a sha1 hash, or null if the file - // should not exist. A Watcher created from this set fires when the file - // changes from that sha, or is deleted (if non-null) or created (if null). - // - // Note that Isopack.getSourceFilesUnderSourceRoot() depends on this field - // existing (it's not just an internal implementation detail of watch.js). - self.files = {}; + // This represents the assertion that 'absPath' is a directory and that + // 'contents' is its immediate contents, as filtered by the regular + // expressions. Entries in 'contents' are file and subdirectory names; + // directory names end with '/'. 'contents' is sorted. An entry is in + // 'contents' if its value (including the slash, for directories) matches at + // least one regular expression in 'include' and no regular expressions in + // 'exclude'... or if it is in 'names'. + // + // There is no recursion here: files contained in subdirectories never appear. + // + // A directory may have multiple entries (presumably with different + // include/exclude filters). + public readonly directories: DirectoryEntry[] = []; - // Array of object with keys: - // - 'absPath': absolute path to a directory - // - 'include': array of RegExps - // - 'exclude': array of RegExps - // - 'names': array of strings - // - 'contents': array of strings, or null if the directory should not exist - // - // This represents the assertion that 'absPath' is a directory and that - // 'contents' is its immediate contents, as filtered by the regular - // expressions. Entries in 'contents' are file and subdirectory names; - // directory names end with '/'. 'contents' is sorted. An entry is in - // 'contents' if its value (including the slash, for directories) matches at - // least one regular expression in 'include' and no regular expressions in - // 'exclude'... or if it is in 'names'. - // - // There is no recursion here: files contained in subdirectories never appear. - // - // A directory may have multiple entries (presumably with different - // include/exclude filters). - self.directories = []; - } - - addFile(filePath, hash) { - var self = this; + public addFile(filePath: string, hash: string | null) { // No need to update if this is in always-fire mode already. - if (self.alwaysFire) { + if (this.alwaysFire) { return; } - if (_.has(self.files, filePath)) { + if (_.has(this.files, filePath)) { // Redundant? - if (self.files[filePath] === hash) { + if (this.files[filePath] === hash) { return; } // Nope, inconsistent. - self.alwaysFire = true; + this.alwaysFire = true; return; } - self.files[filePath] = hash; + this.files[filePath] = hash; } - addDirectory({absPath, include, exclude, names, contents: unsortedContents}) { - var self = this; - if (self.alwaysFire) { - return; - } + public addDirectory({ + absPath, + include, + exclude, + names, + contents, + }: DirectoryEntry) { + if (this.alwaysFire) return; if (_.isEmpty(include) && _.isEmpty(names)) { return; } - const contents = _.clone(unsortedContents); - if (contents) { - contents.sort(); - } - - self.directories.push({absPath, include, exclude, names, contents}); + this.directories.push({ + absPath, + include, + exclude, + names, + contents: contents && contents.slice(0).sort(), + }); } // Merges another WatchSet into this one. This one will now fire if either // WatchSet would have fired. - merge(other) { - var self = this; - if (self.alwaysFire) { + public merge(that: WatchSet) { + if (this.alwaysFire) return; + if (that.alwaysFire) { + this.alwaysFire = true; return; } - if (other.alwaysFire) { - self.alwaysFire = true; - return; - } - _.each(other.files, function (hash, name) { - self.addFile(name, hash); - }); - _.each(other.directories, function (dir) { + + Object.keys(that.files).forEach(name => { + this.addFile(name, that.files[name]); + }); + + that.directories.forEach(dir => { // XXX this doesn't deep-clone the directory, but I think these objects - // are never mutated #WatchSetShallowClone - self.directories.push(dir); + // are never mutated #WatchSetShallowClone #TypeScriptOpportunity + this.directories.push(dir); }); } - clone() { - var self = this; - var ret = new WatchSet(); + public clone() { + const ret = new WatchSet(); + + ret.alwaysFire = this.alwaysFire; + + Object.keys(this.files).forEach(name => { + ret.files[name] = this.files[name]; + }); // XXX doesn't bother to deep-clone the directory info // #WatchSetShallowClone - ret.alwaysFire = self.alwaysFire; - ret.files = _.clone(self.files); - ret.directories = _.clone(self.directories); + this.directories.forEach(entry => { + ret.directories.push(entry); + }); + return ret; } toJSON() { - var self = this; - if (self.alwaysFire) { - return {alwaysFire: true}; + if (this.alwaysFire) { + return { alwaysFire: true }; } - var ret = {files: self.files}; - var reToJSON = function (r) { - var options = ''; + function reToJSON(r: RegExp) { + let options = ''; if (r.ignoreCase) { options += 'i'; } @@ -192,60 +196,64 @@ export class WatchSet { options += 'g'; } if (options) { - return {$regex: r.source, $options: options}; + return { + $regex: r.source, + $options: options, + }; } return r.source; - }; + } - ret.directories = _.map(self.directories, function (d) { - return { + return { + files: this.files, + directories: this.directories.map(d => ({ absPath: d.absPath, - include: _.map(d.include, reToJSON), - exclude: _.map(d.exclude, reToJSON), + include: d.include.map(reToJSON), + exclude: d.exclude.map(reToJSON), names: d.names, contents: d.contents - }; - }); - - return ret; + })), + }; } - static fromJSON(json) { - var set = new WatchSet(); + static fromJSON(json: any) { + const watchSet = new WatchSet(); if (! json) { - return set; + return watchSet; } if (json.alwaysFire) { - set.alwaysFire = true; - return set; + watchSet.alwaysFire = true; + return watchSet; } - set.files = _.clone(json.files); + Object.keys(json.files).forEach(name => { + watchSet.files[name] = json.files[name]; + }); - var reFromJSON = function (j) { - if (_.has(j, '$regex')) { + function reFromJSON(j: any) { + if (j.$regex) { return new RegExp(j.$regex, j.$options); } return new RegExp(j); - }; + } - set.directories = _.map(json.directories, function (d) { - return { + json.directories.forEach((d: any) => { + watchSet.directories.push({ absPath: d.absPath, - include: _.map(d.include, reFromJSON), - exclude: _.map(d.exclude, reFromJSON), + include: d.include.map(reFromJSON), + exclude: d.exclude.map(reFromJSON), names: d.names, - contents: d.contents - }; + contents: d.contents, + }) }); - return set; + return watchSet; } } -export function readFile(absPath) { +export function readFile(absPath: string) { try { return files.readFile(absPath); } catch (e) { @@ -258,19 +266,19 @@ export function readFile(absPath) { } }; -export const sha1 = Profile("sha1", function (...args) { - var hash = createHash('sha1'); +export const sha1 = Profile("sha1", function (...args: (string | Buffer)[]) { + const hash = createHash('sha1'); args.forEach(arg => hash.update(arg)); return hash.digest('hex'); }); -export const sha512 = Profile("sha512", function (...args) { - var hash = createHash('sha512'); +export const sha512 = Profile("sha512", function (...args: (string | Buffer)[]) { + const hash = createHash('sha512'); args.forEach(arg => hash.update(arg)); return hash.digest('base64'); }); -function readAndStatDirectory(absPath) { +function readAndStatDirectory(absPath: string) { // Read the directory. try { var contents = files.readdir(absPath); @@ -283,8 +291,8 @@ function readAndStatDirectory(absPath) { } // Add slashes to the end of directories. - var contentsWithSlashes = []; - _.each(contents, function (entry) { + const contentsWithSlashes: string[] = []; + contents.forEach(entry => { // We do stat instead of lstat here, so that we treat symlinks to // directories just like directories themselves. const stat = files.statOrNull(files.pathJoin(absPath, entry)); @@ -301,12 +309,20 @@ function readAndStatDirectory(absPath) { contentsWithSlashes.push(entry); }); - return contentsWithSlashes + return contentsWithSlashes; } -function filterDirectoryContents(contents, { include, exclude, names }) { +function filterDirectoryContents(contents: string[], { + include, + exclude, + names, +}: { + include?: RegExp[], + exclude?: RegExp[], + names?: string[], +}) { // Filter based on regexps. - return contents.filter((entry) => { + return contents.filter(entry => { // Is it one of the names we explicitly requested? if (names && names.indexOf(entry) !== -1) { return true; @@ -323,70 +339,66 @@ function filterDirectoryContents(contents, { include, exclude, names }) { }).sort(); } -export function readDirectory({absPath, include, exclude, names}) { +export function readDirectory({ absPath, include, exclude, names }: { + absPath: string; + include?: RegExp[], + exclude?: RegExp[], + names?: string[], +}) { const contents = readAndStatDirectory(absPath); - return filterDirectoryContents(contents, { include, exclude, names }); + return contents ? filterDirectoryContents(contents, { + include, exclude, names + }) : []; } // All fields are private. export class Watcher { - constructor(options) { - var self = this; + private watchSet: WatchSet; + private onChange: () => any; + private stopped = false; + private justCheckOnce = false; + private async = false; - // Run initial check asyncly - self._async = options.async; + private watches: Record = Object.create(null); - // The set to watch. - self.watchSet = options.watchSet; - if (! self.watchSet) { - throw new Error("watchSet option is required"); - } - - // Function to call when a change is detected according to one of - // the above. - self.onChange = options.onChange; - if (! self.onChange) { - throw new Error("onChange option is required"); - } - - self.stopped = false; - self.justCheckOnce = !! options._justCheckOnce; - - self.watches = { - // : { - // // Null until safeWatcher.watch succeeds in watching the file. - // watcher: | null, - // // Undefined until we stat the file for the first time, then null - // // if the file is observed to be missing. - // lastStat: | null | undefined - // } - }; + constructor(options: { + watchSet: WatchSet; + onChange: () => any; + async?: boolean; + justCheckOnce?: boolean; + }) { + this.async = !! options.async; + this.watchSet = options.watchSet; + this.onChange = options.onChange; + this.justCheckOnce = !! options.justCheckOnce; // Were we given an inconsistent WatchSet? Fire now and be done with it. - if (self.watchSet.alwaysFire) { - self._fire(); + if (this.watchSet.alwaysFire) { + this.fire(); return; } - self._startFileWatches(); - self._checkDirectories(); + this.startFileWatches(); + this.checkDirectories(); } - _fireIfFileChanged(absPath) { - var self = this; - - if (self.stopped) { + private fireIfFileChanged(absPath: string) { + if (this.stopped) { return true; } - var oldHash = self.watchSet.files[absPath]; - - if (oldHash === undefined) { + const oldHash = this.watchSet.files[absPath]; + if (typeof oldHash === "undefined") { throw new Error("Checking unknown file " + absPath); } - var newHash = optimisticHashOrNull(absPath); - + const newHash = optimisticHashOrNull(absPath); if (newHash === null) { // File does not exist (or is a directory). // Is this what we expected? @@ -394,13 +406,13 @@ export class Watcher { return false; } // Nope, not what we expected. - self._fire(); + this.fire(); return true; } // File exists! Is that what we expected? if (oldHash === null) { - self._fire(); + this.fire(); return true; } @@ -409,27 +421,24 @@ export class Watcher { return false; } - self._fire(); + this.fire(); return true; } // infos must all be for the same directory - _fireIfDirectoryChanged(infos) { - var self = this; - - if (self.stopped) { + private fireIfDirectoryChanged(infos: DirectoryEntry[]) { + if (this.stopped) { return true; } const contents = readAndStatDirectory(infos[0].absPath); - for (let i = 0; i < infos.length; i++) { - const info = infos[i]; - const newContents = filterDirectoryContents(contents, info); + for (const info of infos) { + const newContents = filterDirectoryContents(contents || [], info); // If the directory has changed (including being deleted or created). if (! _.isEqual(info.contents, newContents)) { - self._fire(); + this.fire(); return true; } } @@ -437,27 +446,24 @@ export class Watcher { return false; } - _startFileWatches() { - const self = this; - const keys = Object.keys(self.watchSet.files); + private startFileWatches() { + const keys = Object.keys(this.watchSet.files); // Set up a watch for each file - self._processBatches(keys, absPath => { - if (! self.justCheckOnce) { - self._watchFileOrDirectory(absPath, true); + this.processBatches(keys, absPath => { + if (! this.justCheckOnce) { + this.watchFileOrDirectory(absPath, true); } // Check for the case where by the time we created the watch, // the file had already changed from the sha we were provided. - self._fireIfFileChanged(absPath); + this.fireIfFileChanged(absPath); }); } - _watchFileOrDirectory(absPath, skipCheck) { - var self = this; - - if (! _.has(self.watches, absPath)) { - self.watches[absPath] = { + private watchFileOrDirectory(absPath: string, skipCheck = false) { + if (! _.has(this.watches, absPath)) { + this.watches[absPath] = { watcher: null, // Initially undefined (instead of null) to indicate we have never // called files.stat on this file before. @@ -465,19 +471,19 @@ export class Watcher { }; } - var entry = self.watches[absPath]; + const entry = this.watches[absPath]; if (entry.watcher) { // Already watching this path. return; } if (files.statOrNull(absPath)) { - if (self._mustNotExist(absPath)) { - self._fire(); + if (this.mustNotExist(absPath)) { + this.fire(); return; } - var onWatchEvent = self._makeWatchEventCallback(absPath); + const onWatchEvent = this.makeWatchEventCallback(absPath); entry.watcher = safeWatcher.watch(absPath, onWatchEvent); if (!skipCheck) { @@ -485,27 +491,25 @@ export class Watcher { // immediately, so that we examine this file at least once. onWatchEvent(); } else { - self._updateStatForWatch(absPath); + this.updateStatForWatch(absPath); } } else { - if (self._mustBeAFile(absPath)) { - self._fire(); + if (this.mustBeAFile(absPath)) { + this.fire(); return; } - var parentDir = files.pathDirname(absPath); + const parentDir = files.pathDirname(absPath); if (parentDir === absPath) { throw new Error("Unable to watch parent directory of " + absPath); } - self._watchFileOrDirectory(parentDir); + this.watchFileOrDirectory(parentDir); } } - _makeWatchEventCallback(absPath) { - var self = this; - + private makeWatchEventCallback(absPath: string) { // Sometimes we receive a rapid succession of change events, perhaps // because several files were modified at once (e.g. by git reset // --hard), or a file was deleted and then recreated by an editor like @@ -516,22 +520,22 @@ export class Watcher { // additional calls if they happen within that window of time, so that // a rapid succession of calls will tend to trigger only one inspection // of the file system. - return coalesce(WATCH_COALESCE_MS, function onWatchEvent() { - if (self.stopped) { + return coalesce(WATCH_COALESCE_MS, () => { + if (this.stopped) { return; } - // This helper method will call self._fire() if the old and new stat + // This helper method will call this._fire() if the old and new stat // objects have different types (missing, file, or directory), so we // can assume they have the same type for the rest of this method. - var stat = self._updateStatForWatch(absPath); - if (self.stopped) { + const stat = this.updateStatForWatch(absPath); + if (this.stopped) { return; } if (stat === null || stat.isFile()) { - if (_.has(self.watchSet.files, absPath)) { - self._fireIfFileChanged(absPath); + if (_.has(this.watchSet.files, absPath)) { + this.fireIfFileChanged(absPath); // XXX #3335 We probably should check again in a second, due to low // filesystem modtime resolution. } @@ -543,15 +547,15 @@ export class Watcher { if (err.code === "ENOENT" || err.code === "ENOTDIR") { // The directory was removed or changed type since we called - // self._updateStatForWatch, so we fire unconditionally. - self._fire(); + // this._updateStatForWatch, so we fire unconditionally. + this.fire(); return; } throw err; } - _.each(dirFiles, function(file) { - var fullPath = files.pathJoin(absPath, file); + dirFiles.forEach(file => { + const fullPath = files.pathJoin(absPath, file); // Recursively watch new files, if we ever previously tried to // watch them. Recall that when we attempt to watch a @@ -560,16 +564,16 @@ export class Watcher { // intermediate directories) are created, we begin watching // those directories in response to change events fired for // directories we're already watching. - if (_.has(self.watches, fullPath)) { - self._watchFileOrDirectory(fullPath); + if (_.has(this.watches, fullPath)) { + this.watchFileOrDirectory(fullPath); } }); - // If self.watchSet.directories contains any entries for the - // directory we are examining, call self._fireIfDirectoryChanged. - const infos = self.watchSet.directories.filter(info => info.absPath === absPath ); + // If this.watchSet.directories contains any entries for the + // directory we are examining, call this._fireIfDirectoryChanged. + const infos = this.watchSet.directories.filter(info => info.absPath === absPath ); if (infos.length) { - self._fireIfDirectoryChanged(infos); + this.fireIfDirectoryChanged(infos); } // XXX #3335 We probably should check again in a second, due to low // filesystem modtime resolution. @@ -577,48 +581,47 @@ export class Watcher { }); } - _mustNotExist(absPath) { - var wsFiles = this.watchSet.files; + private mustNotExist(absPath: string) { + const wsFiles = this.watchSet.files; if (_.has(wsFiles, absPath)) { return wsFiles[absPath] === null; } return false; } - _mustBeAFile(absPath) { - var wsFiles = this.watchSet.files; + private mustBeAFile(absPath: string) { + const wsFiles = this.watchSet.files; if (_.has(wsFiles, absPath)) { return _.isString(wsFiles[absPath]); } return false; } - _updateStatForWatch(absPath) { - var self = this; - var entry = self.watches[absPath]; - var lastStat = entry.lastStat; - var stat = files.statOrNull(absPath); - var mustNotExist = self._mustNotExist(absPath); - var mustBeAFile = self._mustBeAFile(absPath); + private updateStatForWatch(absPath: string) { + const entry = this.watches[absPath]; + const lastStat = entry.lastStat; + let stat = files.statOrNull(absPath); + const mustNotExist = this.mustNotExist(absPath); + const mustBeAFile = this.mustBeAFile(absPath); if (stat && lastStat === undefined) { // We have not checked for this file before, so our expectations are // somewhat relaxed (namely, we don't care about lastStat), but - // self._fire() might still need to be called if self.watchSet.files + // this._fire() might still need to be called if this.watchSet.files // has conflicting expectations. if (stat.isFile()) { if (mustNotExist) { - self._fire(); + this.fire(); } } else if (stat.isDirectory()) { if (mustNotExist || mustBeAFile) { - self._fire(); + this.fire(); } } else { // Neither a file nor a directory, so treat as non-existent. stat = null; if (mustBeAFile) { - self._fire(); + this.fire(); } } @@ -629,37 +632,38 @@ export class Watcher { } else if (stat && stat.isFile()) { entry.lastStat = stat; if (! lastStat || ! lastStat.isFile()) { - self._fire(); + this.fire(); } } else if (stat && stat.isDirectory()) { entry.lastStat = stat; if (! lastStat || ! lastStat.isDirectory()) { - self._fire(); + this.fire(); } } else { entry.lastStat = stat = null; if (lastStat) { - self._fire(); + this.fire(); } } return stat; } - + // Iterates over the array, calling handleItem for each item // When this._async is true, it pauses ocassionally to avoid blocking for too long // Stops iterating after watcher is stopped - _processBatches(array, handleItem) { - const self = this; - const async = self._async; + private processBatches( + array: T[], + handleItem: (item: T) => any, + ) { let index = 0; - function processBatch() { - const stopTime = async ? Date.now() + 50 : Infinity; + const processBatch = () => { + const stopTime = this.async ? Date.now() + 50 : Infinity; while (Date.now() < stopTime && index < array.length) { - if (self.stopped) { + if (this.stopped) { return; } @@ -669,7 +673,7 @@ export class Watcher { } if (index < array.length) { - if (async) { + if (this.async) { setImmediate(processBatch); } else { processBatch(); @@ -679,70 +683,65 @@ export class Watcher { processBatch(); } - _checkDirectories() { - const self = this; - const dirs = Object.values(self.watchSet.directories.reduce((result, dir) => { - result[dir.absPath] = result[dir.absPath] || []; - result[dir.absPath].push(dir); + private checkDirectories() { + const dirs = Object.values(this.watchSet.directories.reduce((result, dir) => { + const dirs = result[dir.absPath]; + if (dirs) { + dirs.push(dir); + } else { + result[dir.absPath] = [dir]; + } return result; - }, {})); + }, {} as Record)); - - if (self.stopped) { + if (this.stopped) { return; } - self._processBatches(dirs, infos => { - if (! self.justCheckOnce) { - self._watchFileOrDirectory(infos[0].absPath, true); + this.processBatches(dirs, entries => { + if (! this.justCheckOnce) { + this.watchFileOrDirectory(entries[0].absPath, true); } // Check for the case where by the time we created the watch, the // directory has already changed. - self._fireIfDirectoryChanged(infos); + this.fireIfDirectoryChanged(entries); }); } - _fire() { - var self = this; - - if (self.stopped) { - return; - } - - self.stop(); - self.onChange(); + private fire() { + if (this.stopped) return; + this.stop(); + this.onChange(); } stop() { - var self = this; - self.stopped = true; - + this.stopped = true; // Clean up file watches - _.each(self.watches, function (entry) { + _.each(this.watches, function (entry: { watcher: FSWatcher | null }) { if (entry.watcher) { entry.watcher.close(); entry.watcher = null; } }); - self.watches = {}; + this.watches = Object.create(null); } } // Given a WatchSet, returns true if it currently describes the state of the // disk. -export function isUpToDate(watchSet) { +export function isUpToDate(watchSet: WatchSet) { return Profile.time('watch.isUpToDate', () => { - var upToDate = true; - var watcher = new Watcher({ + let upToDate = true; + const watcher = new Watcher({ watchSet: watchSet, - onChange: function () { + onChange() { upToDate = false; }, // internal flag which prevents us from starting watches and timers that // we're about to cancel anyway - _justCheckOnce: true + justCheckOnce: true }); watcher.stop(); return upToDate; @@ -750,9 +749,15 @@ export function isUpToDate(watchSet) { } // Options should have absPath/include/exclude/names. -export function readAndWatchDirectory(watchSet, options) { - var contents = readDirectory(options); - watchSet.addDirectory(_.extend({contents: contents}, options)); +export function readAndWatchDirectory( + watchSet: WatchSet, + options: DirectoryEntry, +) { + const contents = readDirectory(options); + watchSet.addDirectory({ + contents, + ...options, + }); return contents; } @@ -763,8 +768,11 @@ export function readAndWatchDirectory(watchSet, options) { // We only calculate the hash if needed here, so callers must not // *rely* on the hash being returned; merely that if the hash is // present, it is the correct hash of the contents. -export function readAndWatchFileWithHash(watchSet, absPath) { - const result = { +export function readAndWatchFileWithHash(watchSet: WatchSet, absPath: string) { + const result: { + contents: string | Buffer | null; + hash: string | null; + } = { contents: null, hash: null, }; @@ -799,6 +807,6 @@ export function readAndWatchFileWithHash(watchSet, absPath) { return result; } -export function readAndWatchFile(watchSet, absPath) { +export function readAndWatchFile(watchSet: WatchSet, absPath: string) { return readAndWatchFileWithHash(watchSet, absPath).contents; } diff --git a/tools/isobuild/builder.js b/tools/isobuild/builder.js index 764b83e0c2..5d3115e7f9 100644 --- a/tools/isobuild/builder.js +++ b/tools/isobuild/builder.js @@ -1,5 +1,5 @@ import assert from "assert"; -import {WatchSet, readAndWatchFile, sha1} from '../fs/watch.js'; +import {WatchSet, readAndWatchFile, sha1} from '../fs/watch'; import files, { symlinkWithOverwrite, } from '../fs/files'; diff --git a/tools/isobuild/bundler.js b/tools/isobuild/bundler.js index f1871631bb..3c2fdb648d 100644 --- a/tools/isobuild/bundler.js +++ b/tools/isobuild/bundler.js @@ -164,7 +164,7 @@ import { addToTree } from "./linker.js"; var files = require('../fs/files'); var archinfo = require('../utils/archinfo.js'); var buildmessage = require('../utils/buildmessage.js'); -var watch = require('../fs/watch.js'); +var watch = require('../fs/watch'); var colonConverter = require('../utils/colon-converter.js'); var Profile = require('../tool-env/profile.js').Profile; var packageVersionParser = require('../packaging/package-version-parser.js'); diff --git a/tools/isobuild/compiler-deprecated-compile-step.js b/tools/isobuild/compiler-deprecated-compile-step.js index 1b98117737..1f406d0ee9 100644 --- a/tools/isobuild/compiler-deprecated-compile-step.js +++ b/tools/isobuild/compiler-deprecated-compile-step.js @@ -11,7 +11,7 @@ var archinfo = require('../utils/archinfo.js'); var buildmessage = require('../utils/buildmessage.js'); var files = require('../fs/files'); var colonConverter = require('../utils/colon-converter.js'); -var watch = require('../fs/watch.js'); +var watch = require('../fs/watch'); var convertSourceMapPaths = function (sourcemap, f) { if (! sourcemap) { diff --git a/tools/isobuild/compiler-plugin.js b/tools/isobuild/compiler-plugin.js index d92212cd7f..dc1b0dbdef 100644 --- a/tools/isobuild/compiler-plugin.js +++ b/tools/isobuild/compiler-plugin.js @@ -9,7 +9,7 @@ var util = require('util'); var _ = require('underscore'); var Profile = require('../tool-env/profile.js').Profile; import assert from "assert"; -import {sha1, readAndWatchFileWithHash} from '../fs/watch.js'; +import {sha1, readAndWatchFileWithHash} from '../fs/watch'; import LRU from 'lru-cache'; import {sourceMapLength} from '../utils/utils.js'; import {Console} from '../console/console.js'; diff --git a/tools/isobuild/compiler.js b/tools/isobuild/compiler.js index 76d80ecaaa..56a143f9a8 100644 --- a/tools/isobuild/compiler.js +++ b/tools/isobuild/compiler.js @@ -5,7 +5,7 @@ var buildmessage = require('../utils/buildmessage.js'); var bundler = require('./bundler.js'); var isopack = require('./isopack.js'); var meteorNpm = require('./meteor-npm.js'); -var watch = require('../fs/watch.js'); +var watch = require('../fs/watch'); var Console = require('../console/console.js').Console; var files = require('../fs/files'); var colonConverter = require('../utils/colon-converter.js'); diff --git a/tools/isobuild/import-scanner.js b/tools/isobuild/import-scanner.js index cf7d9edbc3..966b154974 100644 --- a/tools/isobuild/import-scanner.js +++ b/tools/isobuild/import-scanner.js @@ -4,7 +4,7 @@ import {Script} from "vm"; import { isString, isObject, isEmpty, has, keys, each, map, omit, } from "underscore"; -import {sha1} from "../fs/watch.js"; +import {sha1} from "../fs/watch"; import {matches as archMatches} from "../utils/archinfo.js"; import {findImportedModuleIdentifiers} from "./js-analyze.js"; import {cssToCommonJS} from "./css-modules"; diff --git a/tools/isobuild/isopack-cache.js b/tools/isobuild/isopack-cache.js index 45f3723bbc..0b6a0255a1 100644 --- a/tools/isobuild/isopack-cache.js +++ b/tools/isobuild/isopack-cache.js @@ -4,7 +4,7 @@ var buildmessage = require('../utils/buildmessage.js'); var compiler = require('./compiler.js'); var files = require('../fs/files'); var isopackModule = require('./isopack.js'); -var watch = require('../fs/watch.js'); +var watch = require('../fs/watch'); var colonConverter = require('../utils/colon-converter.js'); var Profile = require('../tool-env/profile.js').Profile; var archinfo = require('../utils/archinfo.js'); diff --git a/tools/isobuild/isopack.js b/tools/isobuild/isopack.js index 769a0a85fe..76cd4753bd 100644 --- a/tools/isobuild/isopack.js +++ b/tools/isobuild/isopack.js @@ -6,7 +6,7 @@ var linker = require('./linker.js'); var buildmessage = require('../utils/buildmessage.js'); import Builder from './builder.js'; var bundler = require('./bundler.js'); -var watch = require('../fs/watch.js'); +var watch = require('../fs/watch'); import * as files from '../fs/files'; import * as fsFixPath from '../fs/fsFixPath'; import { diff --git a/tools/isobuild/linker.js b/tools/isobuild/linker.js index 8d3c4f1d20..ad95e6ba72 100644 --- a/tools/isobuild/linker.js +++ b/tools/isobuild/linker.js @@ -1,7 +1,7 @@ var _ = require('underscore'); var sourcemap = require('source-map'); var buildmessage = require('../utils/buildmessage.js'); -var watch = require('../fs/watch.js'); +var watch = require('../fs/watch'); var Profile = require('../tool-env/profile.js').Profile; import assert from 'assert'; import LRU from 'lru-cache'; diff --git a/tools/isobuild/package-source.js b/tools/isobuild/package-source.js index b05f0ce6f3..222c018717 100644 --- a/tools/isobuild/package-source.js +++ b/tools/isobuild/package-source.js @@ -3,7 +3,7 @@ var sourcemap = require('source-map'); var files = require('../fs/files'); var utils = require('../utils/utils.js'); -var watch = require('../fs/watch.js'); +var watch = require('../fs/watch'); var buildmessage = require('../utils/buildmessage.js'); var meteorNpm = require('./meteor-npm.js'); import Builder from './builder.js'; diff --git a/tools/isobuild/resolver.js b/tools/isobuild/resolver.js index f9b51217b2..4d5225c123 100644 --- a/tools/isobuild/resolver.js +++ b/tools/isobuild/resolver.js @@ -6,7 +6,7 @@ import { has, } from "underscore"; -import { sha1 } from "../fs/watch.js"; +import { sha1 } from "../fs/watch"; import { matches as archMatches } from "../utils/archinfo.js"; import { pathJoin, diff --git a/tools/isobuild/source-arch.js b/tools/isobuild/source-arch.js index 342e27e7a6..e51cf4c147 100644 --- a/tools/isobuild/source-arch.js +++ b/tools/isobuild/source-arch.js @@ -1,5 +1,5 @@ import {isString, isFunction} from 'underscore'; -import {WatchSet} from '../fs/watch.js'; +import {WatchSet} from '../fs/watch'; function reportMissingOption(name) { throw new Error(`must provide options.${name} when creating SourceArch`); diff --git a/tools/isobuild/unibuild.js b/tools/isobuild/unibuild.js index 2e20af25ec..c46c9587a4 100644 --- a/tools/isobuild/unibuild.js +++ b/tools/isobuild/unibuild.js @@ -2,7 +2,7 @@ import _ from "underscore"; import files from "../fs/files"; -import { WatchSet, sha1 } from "../fs/watch.js"; +import { WatchSet, sha1 } from "../fs/watch"; import { NodeModulesDirectory } from "./bundler.js"; import * as archinfo from "../utils/archinfo.js"; diff --git a/tools/packaging/catalog/catalog-local.js b/tools/packaging/catalog/catalog-local.js index 30ce189b1c..71249fd814 100644 --- a/tools/packaging/catalog/catalog-local.js +++ b/tools/packaging/catalog/catalog-local.js @@ -1,7 +1,7 @@ var _ = require('underscore'); var buildmessage = require('../../utils/buildmessage.js'); var files = require('../../fs/files'); -var watch = require('../../fs/watch.js'); +var watch = require('../../fs/watch'); var PackageSource = require('../../isobuild/package-source.js'); import { KNOWN_ISOBUILD_FEATURE_PACKAGES } from '../../isobuild/compiler.js'; import { sync as glob } from "glob"; diff --git a/tools/project-context.js b/tools/project-context.js index 3bb56648d1..1f14421ba1 100644 --- a/tools/project-context.js +++ b/tools/project-context.js @@ -13,7 +13,7 @@ var packageMapModule = require('./packaging/package-map.js'); var release = require('./packaging/release.js'); var tropohouse = require('./packaging/tropohouse.js'); var utils = require('./utils/utils.js'); -var watch = require('./fs/watch.js'); +var watch = require('./fs/watch'); var Profile = require('./tool-env/profile.js').Profile; import { KNOWN_ISOBUILD_FEATURE_PACKAGES } from './isobuild/compiler.js'; diff --git a/tools/runners/run-app.js b/tools/runners/run-app.js index d79e3a9d31..6bb975b0c9 100644 --- a/tools/runners/run-app.js +++ b/tools/runners/run-app.js @@ -3,7 +3,7 @@ var Fiber = require('fibers'); const uuid = require("uuid"); var fiberHelpers = require('../utils/fiber-helpers.js'); var files = require('../fs/files'); -var watch = require('../fs/watch.js'); +var watch = require('../fs/watch'); var bundler = require('../isobuild/bundler.js'); var buildmessage = require('../utils/buildmessage.js'); var runLog = require('./run-log.js'); diff --git a/tools/tests/old.js b/tools/tests/old.js index 3168a605e8..a69d5d58f4 100644 --- a/tools/tests/old.js +++ b/tools/tests/old.js @@ -55,9 +55,9 @@ selftest.define("watch", ["slow"], function () { var runFuture = runOldTest.future(); var futures = [ // Run with pathwatcher (if possible) - runFuture('test-watch.js'), + runFuture('test-watch'), // Run with fs.watchFile fallback - runFuture('test-watch.js', { + runFuture('test-watch', { METEOR_WATCH_FORCE_POLLING: 1 }) ]; diff --git a/tools/tests/old/test-watch.js b/tools/tests/old/test-watch.js index a2550b259b..f7a58f6be5 100644 --- a/tools/tests/old/test-watch.js +++ b/tools/tests/old/test-watch.js @@ -5,7 +5,7 @@ var assert = require('assert'); var crypto = require('crypto'); var Fiber = require('fibers'); var Future = require('fibers/future'); -var watch = require('../../fs/watch.js'); +var watch = require('../../fs/watch'); var files = require('../../fs/files'); var tmp = files.mkdtemp('test_watch'); diff --git a/tools/tests/utils-tests.js b/tools/tests/utils-tests.js index df494f1c92..4e6b8cdb7b 100644 --- a/tools/tests/utils-tests.js +++ b/tools/tests/utils-tests.js @@ -1,7 +1,7 @@ var selftest = require('../tool-testing/selftest.js'); var utils = require('../utils/utils.js'); -import { sha1 } from '../fs/watch.js'; +import { sha1 } from '../fs/watch'; import httpHelpers from '../utils/http-helpers'; selftest.define('subset generator', function () { diff --git a/tools/tool-env/isopackets.js b/tools/tool-env/isopackets.js index fc3e37699b..0c1828eb54 100644 --- a/tools/tool-env/isopackets.js +++ b/tools/tool-env/isopackets.js @@ -9,7 +9,7 @@ var isopackCacheModule = require('../isobuild/isopack-cache.js'); var buildmessage = require('../utils/buildmessage.js'); var files = require('../fs/files'); var config = require('../meteor-services/config.js'); -var watch = require('../fs/watch.js'); +var watch = require('../fs/watch'); var Console = require('../console/console.js').Console; var fiberHelpers = require('../utils/fiber-helpers.js'); var packageMapModule = require('../packaging/package-map.js'); From 85d8db7f1d7a2e47b94754ef3b6128b4b00641b8 Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Fri, 5 Jul 2019 18:48:16 -0400 Subject: [PATCH 157/327] Fix return types of fs.{watchFile,unwatchFile}. These methods return a StatWatcher object with various useful methods, but @types/node apparently gets this completely wrong, assuming void. --- tools/fs/files.ts | 43 +++++++++++++++++-- tools/fs/{safe-watcher.js => safe-watcher.ts} | 0 2 files changed, 40 insertions(+), 3 deletions(-) rename tools/fs/{safe-watcher.js => safe-watcher.ts} (100%) diff --git a/tools/fs/files.ts b/tools/fs/files.ts index 75e734ee26..c165dbacc2 100644 --- a/tools/fs/files.ts +++ b/tools/fs/files.ts @@ -5,10 +5,11 @@ /// import assert from "assert"; -import fs from "fs"; +import fs, { Stats } from "fs"; import path from "path"; import os from "os"; import { spawn, execFile } from "child_process"; +import { EventEmitter } from "events"; import { Slot } from "@wry/context"; const _ = require('underscore'); @@ -1755,7 +1756,43 @@ export const rmdir = wrapDestructiveFsFunc("rmdir", fs.rmdirSync); export const stat = wrapFsFunc("stat", fs.statSync, [0], { cached: true }); export const symlink = wrapFsFunc("symlink", fs.symlinkSync, [0, 1]); export const unlink = wrapDestructiveFsFunc("unlink", fs.unlinkSync); -export const unwatchFile = wrapFsFunc("unwatchFile", fs.unwatchFile, [0]); -export const watchFile = wrapFsFunc("watchFile", fs.watchFile, [0]); export const write = wrapFsFunc("write", fs.writeSync, []); export const writeFile = wrapDestructiveFsFunc("writeFile", fs.writeFileSync); + +type StatListener = ( + current: Stats, + previous: Stats, +) => void; + +type StatWatcherOptions = { + persistent?: boolean; + interval?: number; +}; + +interface StatWatcher extends EventEmitter { + stop: () => void; + start: ( + filename: string, + options: StatWatcherOptions, + listener: StatListener, + ) => void; +} + +export const watchFile = wrapFsFunc("watchFile", ( + filename: string, + options: StatWatcherOptions, + listener: StatListener, +) => { + return fs.watchFile( + filename, + options, + listener, + ) as any as StatWatcher; +}, [0]); + +export const unwatchFile = wrapFsFunc("unwatchFile", ( + filename: string, + listener: StatListener, +) => { + return fs.unwatchFile(filename, listener); +}, [0]); diff --git a/tools/fs/safe-watcher.js b/tools/fs/safe-watcher.ts similarity index 100% rename from tools/fs/safe-watcher.js rename to tools/fs/safe-watcher.ts From d8436bb63583470bfaba231ed93749468c474395 Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Fri, 5 Jul 2019 18:52:40 -0400 Subject: [PATCH 158/327] Convert tools/fs/safe-watcher.js to TypeScript. This completes the TypeScript conversion of the tools/fs directory. :tada: --- tools/fs/optimistic.ts | 2 +- tools/fs/safe-watcher.ts | 85 ++++++++++++++----------- tools/fs/watch.ts | 2 +- tools/runners/run-app.js | 2 +- tools/tests/old/test-bundler-assets.js | 2 +- tools/tests/old/test-bundler-options.js | 2 +- 6 files changed, 54 insertions(+), 41 deletions(-) diff --git a/tools/fs/optimistic.ts b/tools/fs/optimistic.ts index 341719e1a7..2993987c33 100644 --- a/tools/fs/optimistic.ts +++ b/tools/fs/optimistic.ts @@ -2,7 +2,7 @@ import assert from "assert"; import { wrap, OptimisticWrapperFunction } from "optimism"; import ignore from "ignore"; import { Profile } from "../tool-env/profile.js"; -import { watch } from "./safe-watcher.js"; +import { watch } from "./safe-watcher"; import { sha1 } from "./watch"; import { pathSep, diff --git a/tools/fs/safe-watcher.ts b/tools/fs/safe-watcher.ts index a6b86b4411..327e1778ce 100644 --- a/tools/fs/safe-watcher.ts +++ b/tools/fs/safe-watcher.ts @@ -1,15 +1,15 @@ -import * as watchLibrary from "pathwatcher"; +import { FSWatcher, Stats } from "fs"; import { Profile } from "../tool-env/profile.js"; import { statOrNull, - pathDirname, pathResolve, convertToOSPath, - convertToStandardPath, watchFile, unwatchFile, } from "./files"; +const watchLibrary = require("pathwatcher"); + // Set METEOR_WATCH_FORCE_POLLING environment variable to a truthy value to // force the use of files.watchFile instead of watchLibrary.watch. var WATCHER_ENABLED = ! JSON.parse( @@ -26,16 +26,25 @@ if (process.env.METEOR_WATCH_PRIORITIZE_CHANGED && } var DEFAULT_POLLING_INTERVAL = - ~~process.env.METEOR_WATCH_POLLING_INTERVAL_MS || 5000; + +(process.env.METEOR_WATCH_POLLING_INTERVAL_MS || 5000); var NO_WATCHER_POLLING_INTERVAL = - ~~process.env.METEOR_WATCH_POLLING_INTERVAL_MS || 500; + +(process.env.METEOR_WATCH_POLLING_INTERVAL_MS || 500); // This may seems like a long time to wait before actually closing the // file watchers, but it's to our advantage if they survive restarts. const WATCHER_CLEANUP_DELAY_MS = 30000; -const entries = Object.create(null); +type EntryCallback = (event: string) => void; + +interface Entry { + callbacks: Set; + rewatch: () => void; + release: (callback: EntryCallback) => void; + close: () => void; +} + +const entries: Record = Object.create(null); // Pathwatcher complains (using console.error, ugh) if you try to watch // two files with the same stat.ino number but different paths, so we have @@ -47,7 +56,7 @@ const entriesByIno = new Map; // practice it should never grow large enough for that to matter. const changedPaths = new Set; -function hasPriority(absPath) { +function hasPriority(absPath: string) { // If we're not prioritizing changed files, then all files have // priority, which means they should be watched with native file // watchers if the platform supports them. If we are prioritizing @@ -57,7 +66,7 @@ function hasPriority(absPath) { : true; } -function acquireWatcher(absPath, callback) { +function acquireWatcher(absPath: string, callback: EntryCallback) { const entry = entries[absPath] || ( entries[absPath] = startNewWatcher(absPath)); @@ -73,11 +82,10 @@ function acquireWatcher(absPath, callback) { return entry; } -function startNewWatcher(absPath) { +function startNewWatcher(absPath: string): Entry { const stat = statOrNull(absPath); - const ino = stat && stat.ino; - if (ino > 0 && entriesByIno.has(ino)) { - const entry = entriesByIno.get(ino); + if (stat && stat.ino > 0 && entriesByIno.has(stat.ino)) { + const entry = entriesByIno.get(stat.ino); if (entries[absPath] === entry) { return entry; } @@ -87,16 +95,16 @@ function startNewWatcher(absPath) { if (watcher) { watcher.close(); watcher = null; - if (ino > 0) { - entriesByIno.delete(ino); + if (stat && stat.ino > 0) { + entriesByIno.delete(stat.ino); } } } - let lastWatcherEventTime = +new Date; - const callbacks = new Set; - let watcherCleanupTimer = null; - let watcher; + let lastWatcherEventTime = Date.now(); + const callbacks = new Set(); + let watcherCleanupTimer: ReturnType | null = null; + let watcher: FSWatcher | null = null; // Determines the polling interval to be used for the fs.watchFile-based // safety net that works on all platforms and file systems. @@ -125,7 +133,7 @@ function startNewWatcher(absPath) { return NO_WATCHER_POLLING_INTERVAL; } - function fire(event) { + function fire(event: string) { if (event !== "change") { // When we receive a "delete" or "rename" event, the watcher is // probably not going to generate any more notifications for this @@ -144,12 +152,12 @@ function startNewWatcher(absPath) { rewatch(); } - callbacks.forEach(cb => cb.call(this, event)); + callbacks.forEach(cb => cb(event)); } - function watchWrapper(event) { - lastWatcherEventTime = +new Date; - fire.call(this, event); + function watchWrapper(event: string) { + lastWatcherEventTime = Date.now(); + fire(event); // It's tempting to call unwatchFile(absPath, watchFileWrapper) here, // but previous watcher success is no guarantee of future watcher @@ -183,9 +191,7 @@ function startNewWatcher(absPath) { statWatch(absPath, getPollingInterval(), watchFileWrapper); } - function watchFileWrapper(...args) { - const [newStat, oldStat] = args; - + function watchFileWrapper(newStat: Stats, oldStat: Stats) { if (newStat.ino === 0 && oldStat.ino === 0 && +newStat.mtime === +oldStat.mtime) { @@ -196,8 +202,8 @@ function startNewWatcher(absPath) { // If a watcher event fired in the last polling interval, ignore // this event. - if (new Date - lastWatcherEventTime > getPollingInterval()) { - fire.call(this, "change"); + if (Date.now() - lastWatcherEventTime > getPollingInterval()) { + fire("change"); } } @@ -205,7 +211,7 @@ function startNewWatcher(absPath) { callbacks, rewatch, - release(callback) { + release(callback: EntryCallback) { if (! entries[absPath]) { return; } @@ -217,7 +223,10 @@ function startNewWatcher(absPath) { // Once there are no more callbacks in the Set, close both watchers // and nullify the shared data. - clearTimeout(watcherCleanupTimer); + if (watcherCleanupTimer) { + clearTimeout(watcherCleanupTimer); + } + watcherCleanupTimer = setTimeout(() => { if (callbacks.size > 0) { // If another callback was added while the timer was pending, we @@ -243,8 +252,8 @@ function startNewWatcher(absPath) { } }; - if (ino > 0) { - entriesByIno.set(ino, entry); + if (stat && stat.ino > 0) { + entriesByIno.set(stat.ino, entry); } return entry; @@ -261,7 +270,11 @@ export function closeAllWatchers() { const statWatchers = Object.create(null); -function statWatch(absPath, interval, callback) { +function statWatch( + absPath: string, + interval: number, + callback: (current: Stats, previous: Stats) => void, +) { const oldWatcher = statWatchers[absPath]; while (oldWatcher) { @@ -321,7 +334,7 @@ function statWatch(absPath, interval, callback) { return oldWatcher; } -function watchLibraryWatch(absPath, callback) { +function watchLibraryWatch(absPath: string, callback: EntryCallback) { if (WATCHER_ENABLED) { try { return watchLibrary.watch(convertToOSPath(absPath), callback); @@ -339,7 +352,7 @@ let suggestedRaisingWatchLimit = false; // This function is async so that archinfo.host() (which may call // utils.execFileSync) will run in a Fiber. -async function maybeSuggestRaisingWatchLimit(error) { +async function maybeSuggestRaisingWatchLimit(error: Error & { errno: number }) { var constants = require('constants'); var archinfo = require('../utils/archinfo.js'); if (! suggestedRaisingWatchLimit && @@ -373,7 +386,7 @@ async function maybeSuggestRaisingWatchLimit(error) { export const watch = Profile( "safeWatcher.watch", - (absPath, callback) => { + (absPath: string, callback: EntryCallback) => { const entry = acquireWatcher(absPath, callback); return { close() { diff --git a/tools/fs/watch.ts b/tools/fs/watch.ts index 4235fae2a6..2dd87e9af9 100644 --- a/tools/fs/watch.ts +++ b/tools/fs/watch.ts @@ -1,6 +1,6 @@ import { Stats, FSWatcher } from "fs"; import * as files from "./files"; -import * as safeWatcher from "./safe-watcher.js"; +import * as safeWatcher from "./safe-watcher"; import { createHash } from "crypto"; import { coalesce } from "../utils/func-utils.js"; import { Profile } from "../tool-env/profile.js"; diff --git a/tools/runners/run-app.js b/tools/runners/run-app.js index 6bb975b0c9..5c86eb5838 100644 --- a/tools/runners/run-app.js +++ b/tools/runners/run-app.js @@ -14,7 +14,7 @@ var Profile = require('../tool-env/profile.js').Profile; var release = require('../packaging/release.js'); import { pluginVersionsFromStarManifest } from '../cordova/index.js'; import { CordovaBuilder } from '../cordova/builder.js'; -import { closeAllWatchers } from "../fs/safe-watcher.js"; +import { closeAllWatchers } from "../fs/safe-watcher"; import { eachline } from "../utils/eachline.js"; import { loadIsopackage } from '../tool-env/isopackets.js'; diff --git a/tools/tests/old/test-bundler-assets.js b/tools/tests/old/test-bundler-assets.js index c4eabd3b92..0668ee6300 100644 --- a/tools/tests/old/test-bundler-assets.js +++ b/tools/tests/old/test-bundler-assets.js @@ -10,7 +10,7 @@ var release = require('../../packaging/release.js'); var catalog = require('../../packaging/catalog/catalog.js'); var buildmessage = require('../../utils/buildmessage.js'); var projectContextModule = require('../../project-context.js'); -var safeWatcher = require("../../fs/safe-watcher.js"); +var safeWatcher = require("../../fs/safe-watcher"); var lastTmpDir = null; var tmpDir = function () { diff --git a/tools/tests/old/test-bundler-options.js b/tools/tests/old/test-bundler-options.js index 267dbde6ec..c9aeaaf65e 100644 --- a/tools/tests/old/test-bundler-options.js +++ b/tools/tests/old/test-bundler-options.js @@ -9,7 +9,7 @@ var catalog = require('../../packaging/catalog/catalog.js'); var buildmessage = require('../../utils/buildmessage.js'); var isopackets = require('../../tool-env/isopackets.js'); var projectContextModule = require('../../project-context.js'); -var safeWatcher = require("../../fs/safe-watcher.js"); +var safeWatcher = require("../../fs/safe-watcher"); var lastTmpDir = null; var tmpDir = function () { From 4431f34cbe1c12d806aa2a3e2761397f0e450d7b Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Fri, 5 Jul 2019 19:15:04 -0400 Subject: [PATCH 159/327] Bump package versions for 1.8.2-beta.14 release. --- packages/babel-compiler/package.js | 2 +- packages/babel-runtime/package.js | 2 +- packages/context/package.js | 2 +- packages/ecmascript-runtime-client/package.js | 2 +- packages/ecmascript-runtime-server/package.js | 2 +- packages/ecmascript/package.js | 2 +- packages/meteor-tool/package.js | 2 +- packages/modules-runtime/package.js | 2 +- packages/modules/package.js | 2 +- packages/mongo/package.js | 2 +- packages/npm-mongo/package.js | 2 +- scripts/admin/meteor-release-experimental.json | 2 +- 12 files changed, 12 insertions(+), 12 deletions(-) diff --git a/packages/babel-compiler/package.js b/packages/babel-compiler/package.js index 83fec4de8b..2e359b741f 100644 --- a/packages/babel-compiler/package.js +++ b/packages/babel-compiler/package.js @@ -6,7 +6,7 @@ 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.4.0-beta182.13' + version: '7.4.0-beta182.14' }); Npm.depends({ diff --git a/packages/babel-runtime/package.js b/packages/babel-runtime/package.js index 5d991786bd..af711f4eff 100644 --- a/packages/babel-runtime/package.js +++ b/packages/babel-runtime/package.js @@ -1,7 +1,7 @@ Package.describe({ name: "babel-runtime", summary: "Runtime support for output of Babel transpiler", - version: '1.4.0-beta182.13', + version: '1.4.0-beta182.14', documentation: 'README.md' }); diff --git a/packages/context/package.js b/packages/context/package.js index 80fe19d2b7..5469fc9a11 100644 --- a/packages/context/package.js +++ b/packages/context/package.js @@ -1,6 +1,6 @@ Package.describe({ name: "context", - version: "0.4.0-beta182.13", + version: "0.4.0-beta182.14", summary: "Manage contextual information without passing objects around", documentation: "README.md" }); diff --git a/packages/ecmascript-runtime-client/package.js b/packages/ecmascript-runtime-client/package.js index 81c05d37f4..fa0184b8ef 100644 --- a/packages/ecmascript-runtime-client/package.js +++ b/packages/ecmascript-runtime-client/package.js @@ -1,6 +1,6 @@ Package.describe({ name: "ecmascript-runtime-client", - version: "0.9.0-beta182.13", + version: "0.9.0-beta182.14", summary: "Polyfills for new ECMAScript 2015 APIs like Map and Set", git: "https://github.com/meteor/meteor/tree/devel/packages/ecmascript-runtime-client", documentation: "README.md" diff --git a/packages/ecmascript-runtime-server/package.js b/packages/ecmascript-runtime-server/package.js index 768af41c46..6849d3fa77 100644 --- a/packages/ecmascript-runtime-server/package.js +++ b/packages/ecmascript-runtime-server/package.js @@ -1,6 +1,6 @@ Package.describe({ name: "ecmascript-runtime-server", - version: "0.8.0-beta182.13", + version: "0.8.0-beta182.14", summary: "Polyfills for new ECMAScript 2015 APIs like Map and Set", git: "https://github.com/meteor/meteor/tree/devel/packages/ecmascript-runtime-client", documentation: "README.md" diff --git a/packages/ecmascript/package.js b/packages/ecmascript/package.js index 569485e525..64ba793bd2 100644 --- a/packages/ecmascript/package.js +++ b/packages/ecmascript/package.js @@ -1,6 +1,6 @@ Package.describe({ name: 'ecmascript', - version: '0.13.0-beta182.13', + version: '0.13.0-beta182.14', summary: 'Compiler plugin that supports ES2015+ in all .js files', documentation: 'README.md' }); diff --git a/packages/meteor-tool/package.js b/packages/meteor-tool/package.js index 4a3f37692b..99d0323d33 100644 --- a/packages/meteor-tool/package.js +++ b/packages/meteor-tool/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "The Meteor command-line tool", - version: '1.8.2-beta.13' + version: '1.8.2-beta.14' }); Package.includeTool(); diff --git a/packages/modules-runtime/package.js b/packages/modules-runtime/package.js index 9a76a84d61..901a60efff 100644 --- a/packages/modules-runtime/package.js +++ b/packages/modules-runtime/package.js @@ -1,6 +1,6 @@ Package.describe({ name: "modules-runtime", - version: "0.11.0-beta182.13", + version: "0.11.0-beta182.14", summary: "CommonJS module system", git: "https://github.com/benjamn/install", documentation: "README.md" diff --git a/packages/modules/package.js b/packages/modules/package.js index 38f4629cfe..3ab1dd4bf3 100644 --- a/packages/modules/package.js +++ b/packages/modules/package.js @@ -1,6 +1,6 @@ Package.describe({ name: "modules", - version: "0.14.0-beta182.13", + version: "0.14.0-beta182.14", summary: "CommonJS module system", documentation: "README.md" }); diff --git a/packages/mongo/package.js b/packages/mongo/package.js index a7d1562585..6825589e9f 100644 --- a/packages/mongo/package.js +++ b/packages/mongo/package.js @@ -9,7 +9,7 @@ Package.describe({ summary: "Adaptor for using MongoDB and Minimongo over DDP", - version: '1.7.0-beta182.13' + version: '1.7.0-beta182.14' }); Npm.depends({ diff --git a/packages/npm-mongo/package.js b/packages/npm-mongo/package.js index 348d01a8e9..2e228c7dd0 100644 --- a/packages/npm-mongo/package.js +++ b/packages/npm-mongo/package.js @@ -3,7 +3,7 @@ Package.describe({ summary: "Wrapper around the mongo npm package", - version: "3.2.0-beta182.13", + version: "3.2.0-beta182.14", documentation: null }); diff --git a/scripts/admin/meteor-release-experimental.json b/scripts/admin/meteor-release-experimental.json index 6e0a82f4c6..9b4413da57 100644 --- a/scripts/admin/meteor-release-experimental.json +++ b/scripts/admin/meteor-release-experimental.json @@ -1,6 +1,6 @@ { "track": "METEOR", - "version": "1.8.2-beta.13", + "version": "1.8.2-beta.14", "recommended": false, "official": false, "description": "Meteor" From 769337551e71d8cb1d4cd92a0166b3dddf39be7d Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Sat, 6 Jul 2019 08:12:00 -0400 Subject: [PATCH 160/327] Convert tools/tool-env/profile.js to TypeScript. Unfortunately, this conversion triggered an error due to one of the shortcomings of the Babel implementation of TypeScript: SyntaxError: /tools/tool-env/profile.ts: Namespace not marked type-only declare. Non-declarative namespaces are only supported experimentally in Babel. To enable and review caveats see: https://babeljs.io/docs/en/babel-plugin-transform-typescript 278 | } 279 | > 280 | export namespace Profile { | ^ 281 | export let enabled = !! process.env.METEOR_PROFILE; 282 | 283 | export function time(bucket: string, f: () => TResult) { at File.buildCodeFrameError (/Users/ben/meteor/dev_bundle/lib/node_modules/@babel/core/lib/transformation/file/file.js:261:12) at transpileNamespace (/Users/ben/meteor/dev_bundle/lib/node_modules/@babel/plugin-transform-typescript/lib/namespace.js:25:25) at PluginPass.TSModuleDeclaration (/Users/ben/meteor/dev_bundle/lib/node_modules/@babel/plugin-transform-typescript/lib/index.js:271:32) at newFn (/Users/ben/meteor/dev_bundle/lib/node_modules/@babel/traverse/lib/visitors.js:193:21) at NodePath._call (/Users/ben/meteor/dev_bundle/lib/node_modules/@babel/traverse/lib/path/context.js:53:20) at NodePath.call (/Users/ben/meteor/dev_bundle/lib/node_modules/@babel/traverse/lib/path/context.js:40:17) at NodePath.visit (/Users/ben/meteor/dev_bundle/lib/node_modules/@babel/traverse/lib/path/context.js:88:12) at TraversalContext.visitQueue (/Users/ben/meteor/dev_bundle/lib/node_modules/@babel/traverse/lib/context.js:118:16) at TraversalContext.visitMultiple (/Users/ben/meteor/dev_bundle/lib/node_modules/@babel/traverse/lib/context.js:85:17) at TraversalContext.visit (/Users/ben/meteor/dev_bundle/lib/node_modules/@babel/traverse/lib/context.js:144:19) --- tools/cli/commands.js | 2 +- tools/cordova/project.js | 2 +- tools/fs/files.ts | 2 +- tools/fs/optimistic.ts | 2 +- tools/fs/safe-watcher.ts | 2 +- tools/fs/watch.ts | 2 +- tools/isobuild/builder.js | 2 +- tools/isobuild/bundler.js | 8 +- tools/isobuild/compiler-plugin.js | 2 +- tools/isobuild/compiler.js | 2 +- tools/isobuild/import-scanner.js | 2 +- tools/isobuild/isopack-cache.js | 2 +- tools/isobuild/isopack.js | 2 +- tools/isobuild/linker.js | 2 +- tools/isobuild/meteor-npm.js | 2 +- tools/isobuild/package-source.js | 2 +- tools/isobuild/resolver.js | 2 +- tools/meteor-services/deploy.js | 2 +- tools/packaging/catalog/catalog-local.js | 2 +- tools/packaging/catalog/catalog-remote.js | 2 +- tools/packaging/package-client.js | 2 +- tools/project-context.js | 2 +- tools/runners/run-app.js | 2 +- tools/static-assets/server/boot.js | 2 +- tools/tool-env/isopackets.js | 2 +- tools/tool-env/{profile.js => profile.ts} | 449 ++++++++++------------ 26 files changed, 242 insertions(+), 263 deletions(-) rename tools/tool-env/{profile.js => profile.ts} (55%) diff --git a/tools/cli/commands.js b/tools/cli/commands.js index c387c2afef..a312133a93 100644 --- a/tools/cli/commands.js +++ b/tools/cli/commands.js @@ -16,7 +16,7 @@ var Console = require('../console/console.js').Console; var projectContextModule = require('../project-context.js'); var release = require('../packaging/release.js'); -const { Profile } = require("../tool-env/profile.js"); +const { Profile } = require("../tool-env/profile"); import { ensureDevBundleDependencies } from '../cordova/index.js'; import { CordovaRunner } from '../cordova/runner.js'; diff --git a/tools/cordova/project.js b/tools/cordova/project.js index 9955448539..a3fabf37c0 100644 --- a/tools/cordova/project.js +++ b/tools/cordova/project.js @@ -7,7 +7,7 @@ import semver from 'semver'; import files from '../fs/files'; import utils from '../utils/utils.js'; import { Console } from '../console/console.js'; -import { Profile } from '../tool-env/profile.js'; +import { Profile } from '../tool-env/profile'; import buildmessage from '../utils/buildmessage.js'; import main from '../cli/main.js'; import httpHelpers from '../utils/http-helpers.js'; diff --git a/tools/fs/files.ts b/tools/fs/files.ts index c165dbacc2..3d51cb8cc5 100644 --- a/tools/fs/files.ts +++ b/tools/fs/files.ts @@ -25,7 +25,7 @@ const buildmessage = require('../utils/buildmessage.js'); const fiberHelpers = require('../utils/fiber-helpers.js'); const colonConverter = require('../utils/colon-converter.js'); -const Profile = require('../tool-env/profile.js').Profile; +const Profile = require('../tool-env/profile').Profile; export * from '../static-assets/server/mini-files'; import { diff --git a/tools/fs/optimistic.ts b/tools/fs/optimistic.ts index 2993987c33..243cdb9e2b 100644 --- a/tools/fs/optimistic.ts +++ b/tools/fs/optimistic.ts @@ -1,7 +1,7 @@ import assert from "assert"; import { wrap, OptimisticWrapperFunction } from "optimism"; import ignore from "ignore"; -import { Profile } from "../tool-env/profile.js"; +import { Profile } from "../tool-env/profile"; import { watch } from "./safe-watcher"; import { sha1 } from "./watch"; import { diff --git a/tools/fs/safe-watcher.ts b/tools/fs/safe-watcher.ts index 327e1778ce..ce74023b31 100644 --- a/tools/fs/safe-watcher.ts +++ b/tools/fs/safe-watcher.ts @@ -1,5 +1,5 @@ import { FSWatcher, Stats } from "fs"; -import { Profile } from "../tool-env/profile.js"; +import { Profile } from "../tool-env/profile"; import { statOrNull, pathResolve, diff --git a/tools/fs/watch.ts b/tools/fs/watch.ts index 2dd87e9af9..34df7b6429 100644 --- a/tools/fs/watch.ts +++ b/tools/fs/watch.ts @@ -3,7 +3,7 @@ import * as files from "./files"; import * as safeWatcher from "./safe-watcher"; import { createHash } from "crypto"; import { coalesce } from "../utils/func-utils.js"; -import { Profile } from "../tool-env/profile.js"; +import { Profile } from "../tool-env/profile"; import { optimisticHashOrNull, } from "./optimistic"; diff --git a/tools/isobuild/builder.js b/tools/isobuild/builder.js index 5d3115e7f9..04a23919ec 100644 --- a/tools/isobuild/builder.js +++ b/tools/isobuild/builder.js @@ -4,7 +4,7 @@ import files, { symlinkWithOverwrite, } from '../fs/files'; import NpmDiscards from './npm-discards.js'; -import {Profile} from '../tool-env/profile.js'; +import {Profile} from '../tool-env/profile'; import { optimisticReadFile, optimisticReaddir, diff --git a/tools/isobuild/bundler.js b/tools/isobuild/bundler.js index 3c2fdb648d..2f876272ff 100644 --- a/tools/isobuild/bundler.js +++ b/tools/isobuild/bundler.js @@ -166,7 +166,7 @@ var archinfo = require('../utils/archinfo.js'); var buildmessage = require('../utils/buildmessage.js'); var watch = require('../fs/watch'); var colonConverter = require('../utils/colon-converter.js'); -var Profile = require('../tool-env/profile.js').Profile; +var Profile = require('../tool-env/profile').Profile; var packageVersionParser = require('../packaging/package-version-parser.js'); var release = require('../packaging/release.js'); import { loadIsopackage } from '../tool-env/isopackets.js'; @@ -2705,8 +2705,10 @@ class ServerTarget extends JsImageTarget { const toolsDir = files.pathDirname( files.convertToStandardPath(__dirname)); - builder.write("profile.js", { - file: files.pathJoin(toolsDir, "tool-env", "profile.js"), + builder.copyTranspiledModules([ + "profile.ts" + ], { + sourceRootDir: files.pathJoin(toolsDir, "tool-env"), }); // Server bootstrap diff --git a/tools/isobuild/compiler-plugin.js b/tools/isobuild/compiler-plugin.js index dc1b0dbdef..061157ead7 100644 --- a/tools/isobuild/compiler-plugin.js +++ b/tools/isobuild/compiler-plugin.js @@ -7,7 +7,7 @@ var compiler = require('./compiler.js'); var linker = require('./linker.js'); var util = require('util'); var _ = require('underscore'); -var Profile = require('../tool-env/profile.js').Profile; +var Profile = require('../tool-env/profile').Profile; import assert from "assert"; import {sha1, readAndWatchFileWithHash} from '../fs/watch'; import LRU from 'lru-cache'; diff --git a/tools/isobuild/compiler.js b/tools/isobuild/compiler.js index 56a143f9a8..fab5f1bdfe 100644 --- a/tools/isobuild/compiler.js +++ b/tools/isobuild/compiler.js @@ -11,7 +11,7 @@ var files = require('../fs/files'); var colonConverter = require('../utils/colon-converter.js'); var linterPluginModule = require('./linter-plugin.js'); var compileStepModule = require('./compiler-deprecated-compile-step.js'); -var Profile = require('../tool-env/profile.js').Profile; +var Profile = require('../tool-env/profile').Profile; import { SourceProcessorSet } from './build-plugin.js'; import { diff --git a/tools/isobuild/import-scanner.js b/tools/isobuild/import-scanner.js index 966b154974..376f8f60e2 100644 --- a/tools/isobuild/import-scanner.js +++ b/tools/isobuild/import-scanner.js @@ -10,7 +10,7 @@ import {findImportedModuleIdentifiers} from "./js-analyze.js"; import {cssToCommonJS} from "./css-modules"; import buildmessage from "../utils/buildmessage.js"; import LRU from "lru-cache"; -import {Profile} from "../tool-env/profile.js"; +import {Profile} from "../tool-env/profile"; import {SourceNode, SourceMapConsumer} from "source-map"; import { mkdir_p, diff --git a/tools/isobuild/isopack-cache.js b/tools/isobuild/isopack-cache.js index 0b6a0255a1..188d6822fd 100644 --- a/tools/isobuild/isopack-cache.js +++ b/tools/isobuild/isopack-cache.js @@ -6,7 +6,7 @@ var files = require('../fs/files'); var isopackModule = require('./isopack.js'); var watch = require('../fs/watch'); var colonConverter = require('../utils/colon-converter.js'); -var Profile = require('../tool-env/profile.js').Profile; +var Profile = require('../tool-env/profile').Profile; var archinfo = require('../utils/archinfo.js'); import { requestGarbageCollection } from "../utils/gc.js"; diff --git a/tools/isobuild/isopack.js b/tools/isobuild/isopack.js index 76cd4753bd..26192907a0 100644 --- a/tools/isobuild/isopack.js +++ b/tools/isobuild/isopack.js @@ -17,7 +17,7 @@ var colonConverter = require('../utils/colon-converter.js'); var utils = require('../utils/utils.js'); var buildPluginModule = require('./build-plugin.js'); var Console = require('../console/console.js').Console; -var Profile = require('../tool-env/profile.js').Profile; +var Profile = require('../tool-env/profile').Profile; import { requestGarbageCollection } from "../utils/gc.js"; import { Unibuild } from "./unibuild.js"; diff --git a/tools/isobuild/linker.js b/tools/isobuild/linker.js index ad95e6ba72..4288cf6b4a 100644 --- a/tools/isobuild/linker.js +++ b/tools/isobuild/linker.js @@ -2,7 +2,7 @@ var _ = require('underscore'); var sourcemap = require('source-map'); var buildmessage = require('../utils/buildmessage.js'); var watch = require('../fs/watch'); -var Profile = require('../tool-env/profile.js').Profile; +var Profile = require('../tool-env/profile').Profile; import assert from 'assert'; import LRU from 'lru-cache'; import { sourceMapLength } from '../utils/utils.js'; diff --git a/tools/isobuild/meteor-npm.js b/tools/isobuild/meteor-npm.js index 11325028be..b2f6809276 100644 --- a/tools/isobuild/meteor-npm.js +++ b/tools/isobuild/meteor-npm.js @@ -13,7 +13,7 @@ var httpHelpers = require('../utils/http-helpers.js'); var buildmessage = require('../utils/buildmessage.js'); var utils = require('../utils/utils.js'); var runLog = require('../runners/run-log.js'); -var Profile = require('../tool-env/profile.js').Profile; +var Profile = require('../tool-env/profile').Profile; import { version as npmVersion } from 'npm'; import { execFileAsync } from "../utils/processes.js"; import { diff --git a/tools/isobuild/package-source.js b/tools/isobuild/package-source.js index 222c018717..c2c3c895d8 100644 --- a/tools/isobuild/package-source.js +++ b/tools/isobuild/package-source.js @@ -11,7 +11,7 @@ var archinfo = require('../utils/archinfo.js'); var catalog = require('../packaging/catalog/catalog.js'); var packageVersionParser = require('../packaging/package-version-parser.js'); var compiler = require('./compiler.js'); -var Profile = require('../tool-env/profile.js').Profile; +var Profile = require('../tool-env/profile').Profile; import SourceArch from './source-arch.js'; import { PackageNamespace } from "./package-namespace.js"; diff --git a/tools/isobuild/resolver.js b/tools/isobuild/resolver.js index 4d5225c123..14137cc581 100644 --- a/tools/isobuild/resolver.js +++ b/tools/isobuild/resolver.js @@ -404,7 +404,7 @@ export default class Resolver { } }; -import { Profile } from "../tool-env/profile.js"; +import { Profile } from "../tool-env/profile"; each(Resolver.prototype, (value, key) => { if (key === "constructor") return; Resolver.prototype[key] = Profile( diff --git a/tools/meteor-services/deploy.js b/tools/meteor-services/deploy.js index 53bd50fcc5..01c2400fd6 100644 --- a/tools/meteor-services/deploy.js +++ b/tools/meteor-services/deploy.js @@ -21,7 +21,7 @@ import { } from './auth.js'; import { recordPackages } from './stats.js'; import { Console } from '../console/console.js'; -import { Profile } from '../tool-env/profile.js'; +import { Profile } from '../tool-env/profile'; function sleepForMilliseconds(millisecondsToWait) { return new Promise(function(resolve) { diff --git a/tools/packaging/catalog/catalog-local.js b/tools/packaging/catalog/catalog-local.js index 71249fd814..3368108aa1 100644 --- a/tools/packaging/catalog/catalog-local.js +++ b/tools/packaging/catalog/catalog-local.js @@ -5,7 +5,7 @@ var watch = require('../../fs/watch'); var PackageSource = require('../../isobuild/package-source.js'); import { KNOWN_ISOBUILD_FEATURE_PACKAGES } from '../../isobuild/compiler.js'; import { sync as glob } from "glob"; -import { Profile } from "../../tool-env/profile.js"; +import { Profile } from "../../tool-env/profile"; import { optimisticHashOrNull, } from "../../fs/optimistic"; diff --git a/tools/packaging/catalog/catalog-remote.js b/tools/packaging/catalog/catalog-remote.js index f7e3395a42..ab3e714d62 100644 --- a/tools/packaging/catalog/catalog-remote.js +++ b/tools/packaging/catalog/catalog-remote.js @@ -11,7 +11,7 @@ var Console = require('../../console/console.js').Console; var tropohouse = require('../tropohouse.js'); var packageClient = require('../package-client.js'); var VersionParser = require('../package-version-parser.js'); -var Profile = require('../../tool-env/profile.js').Profile; +var Profile = require('../../tool-env/profile').Profile; // XXX: Rationalize these flags. Maybe use the logger? var DEBUG_SQL = !!process.env.METEOR_DEBUG_SQL; diff --git a/tools/packaging/package-client.js b/tools/packaging/package-client.js index 0bf35fb33c..17f9d3a9d6 100644 --- a/tools/packaging/package-client.js +++ b/tools/packaging/package-client.js @@ -11,7 +11,7 @@ var authClient = require('../meteor-services/auth-client.js'); var catalog = require('./catalog/catalog.js'); var projectContextModule = require('../project-context.js'); var colonConverter = require('../utils/colon-converter.js'); -var Profile = require('../tool-env/profile.js').Profile; +var Profile = require('../tool-env/profile').Profile; import { requestGarbageCollection } from "../utils/gc.js"; diff --git a/tools/project-context.js b/tools/project-context.js index 1f14421ba1..3d8fcbe3c5 100644 --- a/tools/project-context.js +++ b/tools/project-context.js @@ -14,7 +14,7 @@ var release = require('./packaging/release.js'); var tropohouse = require('./packaging/tropohouse.js'); var utils = require('./utils/utils.js'); var watch = require('./fs/watch'); -var Profile = require('./tool-env/profile.js').Profile; +var Profile = require('./tool-env/profile').Profile; import { KNOWN_ISOBUILD_FEATURE_PACKAGES } from './isobuild/compiler.js'; import { diff --git a/tools/runners/run-app.js b/tools/runners/run-app.js index 5c86eb5838..b96192f7cd 100644 --- a/tools/runners/run-app.js +++ b/tools/runners/run-app.js @@ -10,7 +10,7 @@ var runLog = require('./run-log.js'); var stats = require('../meteor-services/stats.js'); var Console = require('../console/console.js').Console; var catalog = require('../packaging/catalog/catalog.js'); -var Profile = require('../tool-env/profile.js').Profile; +var Profile = require('../tool-env/profile').Profile; var release = require('../packaging/release.js'); import { pluginVersionsFromStarManifest } from '../cordova/index.js'; import { CordovaBuilder } from '../cordova/builder.js'; diff --git a/tools/static-assets/server/boot.js b/tools/static-assets/server/boot.js index 87d4e4d5c1..2f31189fe3 100644 --- a/tools/static-assets/server/boot.js +++ b/tools/static-assets/server/boot.js @@ -7,7 +7,7 @@ var sourcemap_support = require('source-map-support'); var bootUtils = require('./boot-utils.js'); var files = require('./mini-files'); var npmRequire = require('./npm-require.js').require; -var Profile = require('./profile.js').Profile; +var Profile = require('./profile').Profile; // This code is duplicated in tools/main.js. var MIN_NODE_VERSION = 'v8.0.0'; diff --git a/tools/tool-env/isopackets.js b/tools/tool-env/isopackets.js index 0c1828eb54..c28743fd77 100644 --- a/tools/tool-env/isopackets.js +++ b/tools/tool-env/isopackets.js @@ -14,7 +14,7 @@ var Console = require('../console/console.js').Console; var fiberHelpers = require('../utils/fiber-helpers.js'); var packageMapModule = require('../packaging/package-map.js'); var archinfo = require('../utils/archinfo.js'); -var Profile = require('./profile.js').Profile; +var Profile = require('./profile').Profile; // TL;DR: Isopacket is a set of isopacks. Isopackets are used only inside // meteor-tool. diff --git a/tools/tool-env/profile.js b/tools/tool-env/profile.ts similarity index 55% rename from tools/tool-env/profile.js rename to tools/tool-env/profile.ts index 5c8770a36b..3deb1aaa76 100644 --- a/tools/tool-env/profile.js +++ b/tools/tool-env/profile.ts @@ -161,223 +161,244 @@ // // In both reports the grand total is 600ms. -var _ = require('underscore'); -var Fiber = require('fibers'); +const Fiber = require('fibers'); -Profile.enabled = !! process.env['METEOR_PROFILE']; -var filter = parseFloat(process.env['METEOR_PROFILE']); // ms -if (isNaN(filter)) { - filter = 100; // ms +const filter = parseFloat(process.env.METEOR_PROFILE || "100"); // ms + +type Stats = { + time: number; + count: number; + isOther: boolean; } -var bucketStats = {}; +let bucketStats: Record = Object.create(null); -var SPACES_STR = ' '; +let SPACES_STR = ' '; // return a string of `x` spaces -var spaces = function (x) { - while (SPACES_STR.length < x) { +function spaces(len: number) { + while (SPACES_STR.length < len) { SPACES_STR = SPACES_STR + SPACES_STR; } - return SPACES_STR.slice(0, x); -}; + return SPACES_STR.slice(0, len); +} -var DOTS_STR = '.'; +let DOTS_STR = '.'; // return a string of `x` dots -var dots = function (x) { - while (DOTS_STR.length < x) { +function dots(len: number) { + while (DOTS_STR.length < len) { DOTS_STR = DOTS_STR + DOTS_STR; } - return DOTS_STR.slice(0, x); -}; + return DOTS_STR.slice(0, len); +} - -var leftAlign = function (str, len) { - if (str.length < len) { - str = str + spaces(len - str.length); - } - return str; -}; - -var rightAlign = function (str, len) { - if (str.length < len) { - str = spaces(len - str.length) + str; - } - return str; -}; - -var leftRightAlign = function (str1, str2, len) { +function leftRightAlign(str1: string, str2: string, len: number) { var middle = Math.max(1, len - str1.length - str2.length); return str1 + spaces(middle) + str2; -}; +} -var leftRightDots = function (str1, str2, len) { +function leftRightDots(str1: string, str2: string, len: number) { var middle = Math.max(1, len - str1.length - str2.length); return str1 + dots(middle) + str2; -}; +} -var printIndentation = function (isLastLeafStack) { - if (_.isEmpty(isLastLeafStack)) { +function printIndentation(isLastLeafStack: boolean[]) { + if (!isLastLeafStack.length) { return ''; } - var init = _.map(_.initial(isLastLeafStack), function(isLastLeaf) { - return isLastLeaf ? ' ' : '│ '; - }).join(''); - var last = _.last(isLastLeafStack) ? '└─ ' : '├─ '; - return init + last; -}; + const { length } = isLastLeafStack; + let init = ''; + for (let i = 0; i < length - 1; ++i) { + const isLastLeaf = isLastLeafStack[i]; + init += isLastLeaf ? ' ' : '│ '; + } -var formatMs = function (n) { + const last = isLastLeafStack[length - 1] ? '└─ ' : '├─ '; + + return init + last; +} + +function formatMs(n: number) { // integer with thousands separators return String(Math.round(n)).replace(/\B(?=(\d{3})+(?!\d))/g, ",") + " ms"; -}; +} -var encodeEntryKey = function (entry) { +function encodeEntryKey(entry: string[]) { return entry.join('\t'); -}; +} -var decodeEntryKey = function (key) { +function decodeEntryKey(key: string) { return key.split('\t'); -}; +} -var globalEntry = []; +const globalEntry: string[] = []; +let running = false; -var running = false; -var runningName; - -var start = function () { - bucketStats = {}; - running = true; -}; - -function Profile(bucketName, f) { +export function Profile< + TArgs extends any[], + TResult, +>( + bucketName: string | ((...args: TArgs) => string), + f: (...args: TArgs) => TResult, +): typeof f { if (! Profile.enabled) { return f; } - return Object.assign(function profileWrapper() { + return Object.assign(function profileWrapper(this: any) { if (! running) { - return f.apply(this, arguments); + return f.apply(this, arguments as any); } - var name; - if (_.isFunction(bucketName)) { - name = bucketName.apply(this, arguments); - } else { - name = bucketName; - } + const name = typeof bucketName === "function" + ? bucketName.apply(this, arguments as any) + : bucketName; - var currentEntry; - if (Fiber.current) { - currentEntry = - Fiber.current.profilerEntry || (Fiber.current.profilerEntry = []); - } else { - currentEntry = globalEntry; - } + const currentEntry = Fiber.current + ? Fiber.current.profilerEntry || (Fiber.current.profilerEntry = []) + : globalEntry; currentEntry.push(name); - var key = encodeEntryKey(currentEntry); - var start = process.hrtime(); - var err = null; + const key = encodeEntryKey(currentEntry); + const start = process.hrtime(); try { - return f.apply(this, arguments); - } - catch (e) { - err = e; - } - finally { - var elapsed = process.hrtime(start); - var stats = (bucketStats[key] || (bucketStats[key] = { - time: 0.0, count: 0 + return f.apply(this, arguments as any); + } finally { + const elapsed = process.hrtime(start); + const stats = (bucketStats[key] || (bucketStats[key] = { + time: 0.0, + count: 0, + isOther: false, })); stats.time += (elapsed[0] * 1000 + elapsed[1] / 1000000); stats.count++; currentEntry.pop(); } - - if (err) { - throw err; - } - }, f); + }, f) as typeof f; } -var time = function (bucket, f) { - return Profile(bucket, f)(); -}; +export namespace Profile { + export let enabled = !! process.env.METEOR_PROFILE; -var entries = null; + export function time(bucket: string, f: () => TResult) { + return Profile(bucket, f)(); + } -var prefix = "| "; + export function run(bucket: string, f: () => TResult) { + if (! Profile.enabled) { + return f(); + } -var entryName = function (entry) { - return _.last(entry); -}; + if (running) { + // We've kept the calls to Profile.run in the tool disjoint so far, + // and should probably keep doing so, but if we mess up, warn and continue. + console.log("Warning: Nested Profile.run at " + bucket); + return time(bucket, f); + } -var entryStats = function (entry) { + runningName = bucket; + print(`(#${reportNum}) Profiling: ${runningName}`); + start(); + try { + return time(bucket, f); + } finally { + report(); + reportNum++; + } + } + + function start() { + bucketStats = {}; + running = true; + } + + let runningName: string; + let reportNum = 1; + function report() { + if (! Profile.enabled) { + return; + } + running = false; + print(''); + setupReport(); + reportHierarchy(); + print(''); + reportHotLeaves(); + print(''); + print(`(#${reportNum}) Total: ${formatMs(getTopLevelTotal())}` + + ` (${runningName})`); + print(''); + } +} + +type Entry = string[]; +let entries: Entry[] = []; + +const prefix = "| "; + +function entryName(entry: Entry) { + return entry[entry.length - 1]; +} + +function entryStats(entry: Entry) { return bucketStats[encodeEntryKey(entry)]; -}; +} -var entryTime = function (entry) { +function entryTime(entry: Entry) { return entryStats(entry).time; -}; +} -var isTopLevelEntry = function (entry) { +function isTopLevelEntry(entry: Entry) { return entry.length === 1; -}; +} -var topLevelEntries = function () { - return _.filter(entries, isTopLevelEntry); -}; +function topLevelEntries() { + return entries.filter(isTopLevelEntry); +} -var print = function (text) { +function print(text: string) { console.log(prefix + text); -}; +} -var isChild = function (entry1, entry2) { +function isChild(entry1: Entry, entry2: Entry) { if (entry2.length !== entry1.length + 1) { return false; } - for (var i = entry1.length-1; i >= 0; i--) { + for (var i = entry1.length - 1; i >= 0; i--) { if (entry1[i] !== entry2[i]) { return false; } } - return true; -}; - -var children = function (entry1) { - return _.filter(entries, function (entry2) { - return isChild(entry1, entry2); - }); } -var hasChildren = function (entry) { - return children(entry).length !== 0; -}; +function children(entry1: Entry) { + return entries.filter(entry2 => isChild(entry1, entry2)); +} -var hasSignificantChildren = function (entry) { - return _.some(children(entry), function (entry) { - return (entryTime(entry) >= filter); - }); -}; +function hasChildren(entry: Entry) { + return children(entry).length > 0; +} -var isLeaf = function (entry) { +function hasSignificantChildren(entry: Entry) { + return children(entry).some(entry => entryTime(entry) >= filter); +} + +function isLeaf(entry: Entry) { return ! hasChildren(entry); -}; +} -var otherTime = function (entry) { - var total = 0; - _.each(children(entry), function (child) { +function otherTime(entry: Entry) { + let total = 0; + children(entry).forEach(child => { total += entryTime(child); }); return entryTime(entry) - total; -}; +} -var injectOtherTime = function (entry) { - var name = "other " + entryName(entry); - var other = _.clone(entry); - other.push(name); +function injectOtherTime(entry: Entry) { + const other: Entry = entry.slice(0); + other.push("other " + entryName(entry)); bucketStats[encodeEntryKey(other)] = { time: otherTime(entry), count: entryStats(entry).count, @@ -386,128 +407,84 @@ var injectOtherTime = function (entry) { entries.push(other); }; -var reportOn = function (entry, isLastLeafStack) { - isLastLeafStack = isLastLeafStack || []; - var stats = entryStats(entry); - var isParent = hasSignificantChildren(entry); - var name = entryName(entry); +function reportOn(entry: Entry, isLastLeafStack: boolean[] = []) { + const stats = entryStats(entry); + const isParent = hasSignificantChildren(entry); + const name = entryName(entry); + print((isParent ? leftRightDots : leftRightAlign) (printIndentation(isLastLeafStack) + name, formatMs(stats.time), 70) + (stats.isOther ? "" : (" (" + stats.count + ")"))); if (isParent) { - var childrenList = _.filter(children(entry), function(entry) { - var stats = entryStats(entry); - return stats.time > filter; + const childrenList = children(entry).filter(entry => { + return entryStats(entry).time > filter; }); - _.each(childrenList, function (child, i) { - var isLastLeaf = i === childrenList.length - 1; + childrenList.forEach((child, i) => { + const isLastLeaf = i === childrenList.length - 1; reportOn(child, isLastLeafStack.concat(isLastLeaf)); }); } -}; +} -var reportHierarchy = function () { - _.each(topLevelEntries(), function (entry) { - reportOn(entry); +function reportHierarchy() { + topLevelEntries().forEach(entry => reportOn(entry)); +} + +function allLeafs() { + const set: { [name: string]: any } = Object.create(null); + entries.filter(isLeaf).map(entryName).forEach(name => set[name] = true); + return Object.keys(set).sort(); +} + +function leafTotals(leafName: string) { + let time = 0; + let count = 0; + + entries.filter(entry => { + return entryName(entry) === leafName && isLeaf(entry); + }).forEach(leaf => { + const stats = entryStats(leaf); + time += stats.time; + count += stats.count; }); -}; -var allLeafs = function () { - return _.union(_.map(_.filter(entries, isLeaf), entryName)); -}; + return { time, count }; +} -var leafTotals = function (leafName) { - var time = 0; - var count = 0; - _.each( - _.filter(entries, function (entry) { - return entryName(entry) === leafName && isLeaf(entry); - }), - function (leaf) { - var stats = entryStats(leaf); - time += stats.time; - count += stats.count; - } - ); - return {time, count}; -}; - -var reportHotLeaves = function () { +function reportHotLeaves() { print('Top leaves:'); - var totals = []; - _.each(allLeafs(), function (leaf) { - var info = leafTotals(leaf); - totals.push({name: leaf, time: info.time, count: info.count}); - }); - totals.sort(function (a, b) { + + const totals = allLeafs().map(leaf => { + const info = leafTotals(leaf); + return { + name: leaf, + time: info.time, + count: info.count, + }; + }).sort((a, b) => { return a.time === b.time ? 0 : a.time > b.time ? -1 : 1; }); - _.each(totals, function (total) { + + totals.forEach(total => { if (total.time < 100) { // hard-coded larger filter to quality as "hot" here return; } - print(leftRightDots(total.name, formatMs(total.time), 65) + - ` (${total.count})`); + print(leftRightDots(total.name, formatMs(total.time), 65) + ` (${total.count})`); }); -}; +} -var getTopLevelTotal = function () { - var topTotal = 0; - _.each(topLevelEntries(), function (entry) { +function getTopLevelTotal() { + let topTotal = 0; + topLevelEntries().forEach(entry => { topTotal += entryTime(entry); }); return topTotal; -}; +} -var setupReport = function () { - entries = _.map(_.keys(bucketStats), decodeEntryKey); - _.each(_.filter(entries, hasSignificantChildren), function (parent) { +function setupReport() { + entries = Object.keys(bucketStats).map(decodeEntryKey); + entries.filter(hasSignificantChildren).forEach(parent => { injectOtherTime(parent); }); -}; - -var reportNum = 1; - -var report = function () { - if (! Profile.enabled) { - return; - } - running = false; - print(''); - setupReport(); - reportHierarchy(); - print(''); - reportHotLeaves(); - print(''); - print(`(#${reportNum}) Total: ${formatMs(getTopLevelTotal())}` + - ` (${runningName})`); - print(''); -}; - -var run = function (bucketName, f) { - if (! Profile.enabled) { - return f(); - } else if (running) { - // We've kept the calls to Profile.run in the tool disjoint so far, - // and should probably keep doing so, but if we mess up, warn and continue. - console.log("Warning: Nested Profile.run at " + bucketName); - return time(bucketName, f); - } else { - runningName = bucketName; - print(`(#${reportNum}) Profiling: ${runningName}`); - start(); - try { - return time(bucketName, f); - } - finally { - report(); - reportNum++; - } - } -}; - -Profile.time = time; -Profile.run = run; - -exports.Profile = Profile; +} From 88b085d8e1f68f48b832fdfd48d8b7192c21d61d Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Sat, 6 Jul 2019 09:15:43 -0400 Subject: [PATCH 161/327] Fix type errors now that Profile(name, fn) returns typeof fn. --- tools/fs/optimistic.ts | 8 ++++---- tools/fs/safe-watcher.ts | 9 ++++++--- tools/fs/watch.ts | 2 +- 3 files changed, 11 insertions(+), 8 deletions(-) diff --git a/tools/fs/optimistic.ts b/tools/fs/optimistic.ts index 243cdb9e2b..672430e0b3 100644 --- a/tools/fs/optimistic.ts +++ b/tools/fs/optimistic.ts @@ -2,7 +2,7 @@ import assert from "assert"; import { wrap, OptimisticWrapperFunction } from "optimism"; import ignore from "ignore"; import { Profile } from "../tool-env/profile"; -import { watch } from "./safe-watcher"; +import { watch, SafeWatcher } from "./safe-watcher"; import { sha1 } from "./watch"; import { pathSep, @@ -63,7 +63,7 @@ function makeOptimistic< assert.ok(pathIsAbsolute(path)); - let watcher = watch(path, () => { + let watcher: SafeWatcher | null = watch(path, () => { wrapper.dirty(...args); }); @@ -154,7 +154,7 @@ const dependOnDirectory = wrap((_dir: string) => { return ++dependOnDirectorySalt; }, { subscribe(dir: string) { - let watcher = watch( + let watcher: SafeWatcher | null = watch( dir, () => dependOnDirectory.dirty(dir), ); @@ -323,7 +323,7 @@ const optimisticIsSymbolicLink = wrap((path: string) => { } }, { subscribe(path) { - let watcher = watch(path, () => { + let watcher: SafeWatcher | null = watch(path, () => { optimisticIsSymbolicLink.dirty(path); }); diff --git a/tools/fs/safe-watcher.ts b/tools/fs/safe-watcher.ts index ce74023b31..9d6bf8830d 100644 --- a/tools/fs/safe-watcher.ts +++ b/tools/fs/safe-watcher.ts @@ -35,13 +35,16 @@ var NO_WATCHER_POLLING_INTERVAL = // file watchers, but it's to our advantage if they survive restarts. const WATCHER_CLEANUP_DELAY_MS = 30000; +export type SafeWatcher = { + close: () => void; +} + type EntryCallback = (event: string) => void; -interface Entry { +interface Entry extends SafeWatcher { callbacks: Set; rewatch: () => void; release: (callback: EntryCallback) => void; - close: () => void; } const entries: Record = Object.create(null); @@ -392,6 +395,6 @@ export const watch = Profile( close() { entry.release(callback); } - }; + } as SafeWatcher; } ); diff --git a/tools/fs/watch.ts b/tools/fs/watch.ts index 34df7b6429..34b479f585 100644 --- a/tools/fs/watch.ts +++ b/tools/fs/watch.ts @@ -361,7 +361,7 @@ export class Watcher { private watches: Record Date: Sat, 6 Jul 2019 11:27:30 -0400 Subject: [PATCH 162/327] Update meteor-babel to version 7.5.3. TypeScript is now supported by the actual TypeScript compiler, rather than by @babel/preset-typescript: https://github.com/meteor/babel/pull/25 --- History.md | 4 +- .../.npm/package/npm-shrinkwrap.json | 50 ++++++++----------- packages/babel-compiler/package.js | 2 +- scripts/dev-bundle-tool-package.js | 4 +- 4 files changed, 25 insertions(+), 35 deletions(-) diff --git a/History.md b/History.md index 448445fb18..f1c1b2944e 100644 --- a/History.md +++ b/History.md @@ -8,7 +8,7 @@ N/A ### Migration Steps * Be sure to update the `@babel/runtime` npm package to its latest version - (currently 7.5.0): + (currently 7.5.1): ```sh meteor npm install @babel/runtime@latest ``` @@ -47,7 +47,7 @@ N/A * The `mongodb` npm package used by the `npm-mongo` Meteor package has been updated to version 3.2.7. -* The `meteor-babel` npm package has been updated to version 7.5.1. +* The `meteor-babel` npm package has been updated to version 7.5.3. * The `reify` npm package has been updated to version 0.20.12. diff --git a/packages/babel-compiler/.npm/package/npm-shrinkwrap.json b/packages/babel-compiler/.npm/package/npm-shrinkwrap.json index 64a4750dde..e73e5ce22a 100644 --- a/packages/babel-compiler/.npm/package/npm-shrinkwrap.json +++ b/packages/babel-compiler/.npm/package/npm-shrinkwrap.json @@ -129,9 +129,9 @@ "integrity": "sha512-o9fP1BZLLSrYlxYEYyl2aS+Flun5gtjTIG8iln+XuEzQTs0PLagAGSXUcqruJwD5fM48jzIEggCKpIfWTcR7pQ==" }, "@babel/helpers": { - "version": "7.5.0", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.5.0.tgz", - "integrity": "sha512-EgCUEa8cNwuMrwo87l2d7i2oShi8m2Q58H7h3t4TWtqATZalJYFwfL9DulRe02f3KdqM9xmMCw3v/7Ll+EiaWg==" + "version": "7.5.1", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.5.1.tgz", + "integrity": "sha512-rVOTDv8sH8kNI72Unenusxw6u+1vEepZgLxeV+jHkhsQlYhzVhzL1EpfoWT7Ub3zpWSv2WV03V853dqsnyoQzA==" }, "@babel/highlight": { "version": "7.5.0", @@ -154,9 +154,9 @@ "integrity": "sha512-9L/JfPCT+kShiiTTzcnBJ8cOwdKVmlC1RcCf9F0F9tERVrM4iWtWnXtjWCRqNm2la2BxO1MPArWNsU9zsSJWSQ==" }, "@babel/plugin-proposal-object-rest-spread": { - "version": "7.5.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.5.0.tgz", - "integrity": "sha512-G1qy5EdcO3vYhbxlXjRSR2SXB8GsxYv9hoRKT1Jdn3qy/NUnFqUUnqymKZ00Pbj+3FXNh06B+BUZzecrp3sxNw==" + "version": "7.5.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.5.1.tgz", + "integrity": "sha512-PVGXx5LYHcT7L4MdoE+rM5uq68IKlvU9lljVQ4OXY6aUEnGvezcGbM4VNY57Ug+3R2Zg/nYHlEdiWoIBoRA0mw==" }, "@babel/plugin-syntax-async-generators": { "version": "7.2.0", @@ -188,11 +188,6 @@ "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.2.0.tgz", "integrity": "sha512-t0JKGgqk2We+9may3t0xDdmneaXmyxq0xieYcKHxIsrJO64n1OiMWNUtc5gQK1PA0NpdCRrtZp4z+IUaKugrSA==" }, - "@babel/plugin-syntax-typescript": { - "version": "7.3.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.3.3.tgz", - "integrity": "sha512-dGwbSMA1YhVS8+31CnPR7LB4pcbrzcV99wQzby4uAfrkZPYZlQ7ImwdpzLqi6Z6IL02b8IAL379CaMwo0x5Lag==" - }, "@babel/plugin-transform-arrow-functions": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.2.0.tgz", @@ -323,11 +318,6 @@ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.2.0.tgz", "integrity": "sha512-2LNhETWYxiYysBtrBTqL8+La0jIoQQnIScUJc74OYvUGRmkskNY4EzLCnjHBzdmb38wqtTaixpo1NctEcvMDZw==" }, - "@babel/plugin-transform-typescript": { - "version": "7.5.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.5.0.tgz", - "integrity": "sha512-z3T4P70XJFUAHzLtEsmJ37BGVDj+55/KX8W8TBSBF0qk0KLazw8xlwVcRHacxNPgprzTdI4QWW+2eS6bTkQbCA==" - }, "@babel/plugin-transform-unicode-regex": { "version": "7.4.4", "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.4.4.tgz", @@ -338,15 +328,10 @@ "resolved": "https://registry.npmjs.org/@babel/preset-react/-/preset-react-7.0.0.tgz", "integrity": "sha512-oayxyPS4Zj+hF6Et11BwuBkmpgT/zMxyuZgFrMeZID6Hdh3dGlk4sHCAhdBCpuCKW2ppBfl2uCCetlrUIJRY3w==" }, - "@babel/preset-typescript": { - "version": "7.3.3", - "resolved": "https://registry.npmjs.org/@babel/preset-typescript/-/preset-typescript-7.3.3.tgz", - "integrity": "sha512-mzMVuIP4lqtn4du2ynEfdO0+RYcslwrZiJHXu4MGaC1ctJiW2fyaeDrtjJGs7R/KebZ1sgowcIoWf4uRpEfKEg==" - }, "@babel/runtime": { - "version": "7.5.0", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.5.0.tgz", - "integrity": "sha512-2xsuyZ0R0RBFwjgae5NpXk8FcfH4qovj5cEM5VEeB7KXnKqzaisIu2HSV/mCEISolJJuR4wkViUGYujA8MH9tw==" + "version": "7.5.1", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.5.1.tgz", + "integrity": "sha512-g+hmPKs16iewFSmW57NkH9xpPkuYD1RV3UE2BCkXx9j+nhhRb9hsiSxPmEa67j35IecTQdn4iyMtHMbt5VoREg==" }, "@babel/template": { "version": "7.4.4", @@ -529,9 +514,9 @@ "integrity": "sha1-viQcqBQEAwZ4t0hxcyK4nQyP4oA=" }, "babel-preset-meteor": { - "version": "7.5.1", - "resolved": "https://registry.npmjs.org/babel-preset-meteor/-/babel-preset-meteor-7.5.1.tgz", - "integrity": "sha512-qmXkyQYiT0hqGgESo3Ns3bjQRU/JW7b96knzxOAM1vg/gJCcjL9wAkDG6sro5+dkKNP6l5AR+E5DbNcXeDuRiw==" + "version": "7.5.2", + "resolved": "https://registry.npmjs.org/babel-preset-meteor/-/babel-preset-meteor-7.5.2.tgz", + "integrity": "sha512-MB0UiWzyDZ/KhU8htSB3K7Yn43lG2dXKGOJBscnrJy42BA8XWTA2hoB91uQuewJPdC7bu9ztL4GAP6W/lyAHsA==" }, "babel-preset-minify": { "version": "0.5.0", @@ -634,9 +619,9 @@ "integrity": "sha512-6QK0OpF/phMz0Q2AxILkX2mFhi7m+WMwTRg0LQKq/WBB0cDP4rYH3Wp4/d3OTXlrPLVJT/RFqj8tFeAR4nk8AA==" }, "meteor-babel": { - "version": "7.5.1", - "resolved": "https://registry.npmjs.org/meteor-babel/-/meteor-babel-7.5.1.tgz", - "integrity": "sha512-Ff71xbTkpaqZvovOL6KXFzoOkOoyqT+/LScR3V8bcLLu726XhobUYKKIVjyjSc8IvXR/Pwi8rrstmpY1mZZqvg==" + "version": "7.5.3", + "resolved": "https://registry.npmjs.org/meteor-babel/-/meteor-babel-7.5.3.tgz", + "integrity": "sha512-d+uWIqSP15H0iadPMk9m9AxkpvnO3Skilkr6Y58jVQOS2sovP1NxD+6eoRvbMbRTCO/CYl8ceasVa2rZBho2+g==" }, "meteor-babel-helpers": { "version": "0.0.3", @@ -760,6 +745,11 @@ "resolved": "https://registry.npmjs.org/trim-right/-/trim-right-1.0.1.tgz", "integrity": "sha1-yy4SAwZ+DI3h9hQJS5/kVwTqYAM=" }, + "typescript": { + "version": "3.5.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.5.2.tgz", + "integrity": "sha512-7KxJovlYhTX5RaRbUdkAXN1KUZ8PwWlTzQdHV6xNqvuFOs7+WBo10TQUqT19Q/Jz2hk5v9TQDIhyLhhJY4p5AA==" + }, "unicode-canonical-property-names-ecmascript": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-1.0.4.tgz", diff --git a/packages/babel-compiler/package.js b/packages/babel-compiler/package.js index 2e359b741f..f86a612bd2 100644 --- a/packages/babel-compiler/package.js +++ b/packages/babel-compiler/package.js @@ -10,7 +10,7 @@ Package.describe({ }); Npm.depends({ - 'meteor-babel': '7.5.1', + 'meteor-babel': '7.5.3', 'json5': '2.1.0' }); diff --git a/scripts/dev-bundle-tool-package.js b/scripts/dev-bundle-tool-package.js index 7c8e05af71..ef294827be 100644 --- a/scripts/dev-bundle-tool-package.js +++ b/scripts/dev-bundle-tool-package.js @@ -14,14 +14,14 @@ var packageJson = { pacote: "https://github.com/meteor/pacote/tarball/74fafef8d16c3c5bdf4d3aca5123d49db63680e9", "node-gyp": "5.0.1", "node-pre-gyp": "0.13.0", - "meteor-babel": "7.5.1", + "meteor-babel": "7.5.3", // Keep the versions of these packages consistent with the versions // found in dev-bundle-server-package.js. "meteor-promise": "0.8.7", reify: "0.20.12", fibers: "3.1.1", // So that Babel can emit require("@babel/runtime/helpers/...") calls. - "@babel/runtime": "7.5.0", + "@babel/runtime": "7.5.1", // For backwards compatibility with isopackets that still depend on // babel-runtime rather than @babel/runtime. "babel-runtime": "7.0.0-beta.3", From e2bbda28173efc08b2fba06f93c66e14bf3775d8 Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Sat, 6 Jul 2019 11:29:31 -0400 Subject: [PATCH 163/327] Bump $BUNDLE_VERSION to 8.16.0.20 before rebuilding dev bundle. --- meteor | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meteor b/meteor index 71f05f498c..4fdf55e874 100755 --- a/meteor +++ b/meteor @@ -1,6 +1,6 @@ #!/usr/bin/env bash -BUNDLE_VERSION=8.16.0.19 +BUNDLE_VERSION=8.16.0.20 # OS Check. Put here because here is where we download the precompiled # bundles that are arch specific. From ead1214a1fbacda890dd7cfbb8bf0001232213f3 Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Sat, 6 Jul 2019 11:59:38 -0400 Subject: [PATCH 164/327] Temporarily work around injection of objectSpread helper. https://github.com/babel/babel/pull/10170#issuecomment-508936150 --- packages/ecmascript/transpilation-tests.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/packages/ecmascript/transpilation-tests.js b/packages/ecmascript/transpilation-tests.js index a56ecaae07..f961e7c335 100644 --- a/packages/ecmascript/transpilation-tests.js +++ b/packages/ecmascript/transpilation-tests.js @@ -78,11 +78,13 @@ Tinytest.add("ecmascript - transpilation - helpers - bind", (test) => { }); Tinytest.add("ecmascript - transpilation - helpers - extends", (test) => { - const output = transform(` - var full = {a:1, ...middle, d:4}; -`); + const output = transform("class A extends getBaseClass() {}"); + test.isTrue(/helpers\/inheritsLoose/.test(output)); +}); - test.isTrue(/helpers\/(builtin\/)?(extends|objectSpread)/.test(output)); +Tinytest.add("ecmascript - transpilation - helpers - objectSpread", (test) => { + const output = transform("var full = {a:1, ...middle, d:4};"); + test.isTrue(/objectSpread/.test(output)); }); Tinytest.add("ecmascript - transpilation - helpers - objectWithoutProperties", (test) => { From cdafcb8ebc894f69a82ce0564630fd5d18bcd932 Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Sat, 6 Jul 2019 12:34:59 -0400 Subject: [PATCH 165/327] Avoid transpiling .d.ts files when bundling meteor-tool. --- tools/isobuild/isopack.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tools/isobuild/isopack.js b/tools/isobuild/isopack.js index 26192907a0..b6cba9088e 100644 --- a/tools/isobuild/isopack.js +++ b/tools/isobuild/isopack.js @@ -1414,6 +1414,12 @@ _.extend(Isopack.prototype, { const parts = path.split("/"); if (parts[0] === "tools" && (path.endsWith(".js") || path.endsWith(".ts"))) { + if (path.endsWith(".d.ts")) { + // The official TypeScript compiler's transpileModule function fails + // for .d.ts declaration files with the cryptic error "Error: Debug + // Failure. Output generation failed". + return false; + } if (parts[1] === "static-assets") { return parts[2] === "server"; } From df4e54a80d2d822bba013c2390f6dd20c5c1ec78 Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Sat, 6 Jul 2019 12:11:55 -0400 Subject: [PATCH 166/327] Test that the ganalytics npm package is importable. As reported by @arggh in this comment: https://github.com/meteor/meteor/pull/10522#issuecomment-508908306 --- .../.npm/package/npm-shrinkwrap.json | 104 ++++++++---------- .../packages/modules-test-package/common.js | 3 + .../packages/modules-test-package/package.js | 3 +- 3 files changed, 51 insertions(+), 59 deletions(-) diff --git a/tools/tests/apps/modules/packages/modules-test-package/.npm/package/npm-shrinkwrap.json b/tools/tests/apps/modules/packages/modules-test-package/.npm/package/npm-shrinkwrap.json index 9d6b263e5e..dc8c2d0563 100644 --- a/tools/tests/apps/modules/packages/modules-test-package/.npm/package/npm-shrinkwrap.json +++ b/tools/tests/apps/modules/packages/modules-test-package/.npm/package/npm-shrinkwrap.json @@ -21,42 +21,30 @@ "resolved": "https://registry.npmjs.org/cheerio/-/cheerio-0.22.0.tgz", "integrity": "sha1-qbqoYKP5tZWmuBsahocxIe06Jp4=" }, - "core-util-is": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", - "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" - }, "css-select": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/css-select/-/css-select-1.2.0.tgz", "integrity": "sha1-KzoRBTnFNV8c2NMUYj6HCxIeyFg=" }, "css-what": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/css-what/-/css-what-2.1.0.tgz", - "integrity": "sha1-lGfQMsOM+u+58teVASUwYvh/ob0=" + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/css-what/-/css-what-2.1.3.tgz", + "integrity": "sha512-a+EPoD+uZiNfh+5fxw2nO9QwFa6nJe2Or35fGY6Ipw1R3R4AGz1d1TEZrCegvw2YTmZ0jXirGYlzxxpYSHwpEg==" }, "dom-serializer": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-0.1.0.tgz", - "integrity": "sha1-BzxpdUbOB4DOI75KKOKT5AvDDII=", - "dependencies": { - "domelementtype": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-1.1.3.tgz", - "integrity": "sha1-vSh3PiZCiBrsUVRJJCmcXNgiGFs=" - } - } + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-0.1.1.tgz", + "integrity": "sha512-l0IU0pPzLWSHBcieZbpOKgkIn3ts3vAh7ZuFyXNwJxJXk/c4Gwj9xaTJwIDVQCXawWD0qb3IzMGH5rglQaO0XA==" }, "domelementtype": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-1.3.0.tgz", - "integrity": "sha1-sXrtguirWeUt2cGbF1bg/BhyBMI=" + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-1.3.1.tgz", + "integrity": "sha512-BSKB+TSpMpFI/HOxCNr1O8aMOTZ8hT3pM3GQ0w/mWRmkhEDSFJkkyzz4XQsBV44BChwGkrDfMyjVD0eA2aFV3w==" }, "domhandler": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-2.4.1.tgz", - "integrity": "sha1-iS5HAAqZvlW783dP/qBWHYh5wlk=" + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-2.4.2.tgz", + "integrity": "sha512-JiK04h0Ht5u/80fdLMCEmV4zkNh2BcoMFBmZ/91WtYZ8qVXSKjiw7fXMgFPnHcSZgOo3XdinHvmnDUeMf5R4wA==" }, "domutils": { "version": "1.5.1", @@ -64,25 +52,25 @@ "integrity": "sha1-3NhIiib1Y9YQeeSMn3t+Mjc2gs8=" }, "entities": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/entities/-/entities-1.1.1.tgz", - "integrity": "sha1-blwtClYhtdra7O+AuQ7ftc13cvA=" + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/entities/-/entities-1.1.2.tgz", + "integrity": "sha512-f2LZMYl1Fzu7YSBKg+RoROelpOaNrcGmE9AZubeDfrCEia483oW4MI4VyFd5VNHIgQ/7qm1I0wUHK1eJnn2y2w==" + }, + "ganalytics": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/ganalytics/-/ganalytics-3.1.2.tgz", + "integrity": "sha512-+v7cGYFyte8cNtakkBKCBL7M6fQdAXZumghAryLHztJ08jG6bFEfidfOcMQErAe8sLsekboyavKH5tF9MaDT1Q==" }, "htmlparser2": { - "version": "3.9.2", - "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-3.9.2.tgz", - "integrity": "sha1-G9+HrMoPP55T+k/M6w9LTLsAszg=" + "version": "3.10.1", + "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-3.10.1.tgz", + "integrity": "sha512-IgieNijUMbkDovyoKObU1DUhm1iwNYE/fuifEoEHfd1oZKZDaONBSkal7Y01shxsM49R4XaMdGez3WnF9UfiCQ==" }, "inherits": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz", "integrity": "sha1-sX0I0ya0Qj5Wjv9xn5GwscvfafE=" }, - "isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" - }, "lodash.assignin": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/lodash.assignin/-/lodash.assignin-4.2.0.tgz", @@ -119,9 +107,9 @@ "integrity": "sha1-dx7Hg540c9nEzeKLGTlMNWL09tM=" }, "lodash.merge": { - "version": "4.6.0", - "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.0.tgz", - "integrity": "sha1-aYhLoUSsM/5plzemCG3v+t0PicU=" + "version": "4.6.1", + "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.1.tgz", + "integrity": "sha512-AOYza4+Hf5z1/0Hztxpm2/xiPZgi/cjMqdnKTUWTBSKchJlxXXuUSxCCl8rJlf4g6yww/j6mA8nC8Hw/EZWxKQ==" }, "lodash.pick": { "version": "4.4.0", @@ -144,41 +132,41 @@ "integrity": "sha1-G7nzFO9ri63tE7VJFpsqlF62jk0=" }, "nth-check": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/nth-check/-/nth-check-1.0.1.tgz", - "integrity": "sha1-mSms32KPwsQQmN6rgqxYDPFJquQ=" + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/nth-check/-/nth-check-1.0.2.tgz", + "integrity": "sha512-WeBOdju8SnzPN5vTUJYxYUxLeXpCaVP5i5e0LF8fg7WORF2Wd7wFX/pk0tYZk7s8T+J7VLy0Da6J1+wCT0AtHg==" }, "os-browserify": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/os-browserify/-/os-browserify-0.2.0.tgz", "integrity": "sha1-SRfR6su/0qoaLuQ5tD1EsPnTx5A=" }, - "process-nextick-args": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz", - "integrity": "sha1-FQ4gt1ZZCtP5EJPyWk8q2L/zC6M=" - }, "readable-stream": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.2.tgz", - "integrity": "sha1-WgTfBeT1f+Pw3Gj90R3FyXx+b00=", + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.4.0.tgz", + "integrity": "sha512-jItXPLmrSR8jmTRmRWJXCnGJsfy85mB3Wd/uINMXA65yrnFo0cPClFIUWzo2najVNSl+mx7/4W8ttlLWJe99pQ==", "dependencies": { "inherits": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", - "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" } } }, "safe-buffer": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz", - "integrity": "sha512-kKvNJn6Mm93gAczWVJg7wH+wGYWNrDHdWvpUmHyEsgCtIwwo3bqPtV4tR5tuPaUhTOo/kvhVwd8XwwOllGYkbg==" + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" }, "string_decoder": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.3.tgz", - "integrity": "sha512-4AH6Z5fzNNBcH+6XDMfA/BTt87skxqJlO0lAh3Dker5zThcAxG6mKz+iGu308UKoPPQ8Dcqx/4JhujzltRa+hQ==" + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.2.0.tgz", + "integrity": "sha512-6YqyX6ZWEYguAxgZzHGL7SsCeGx3V2TtOTqZz1xSTSWnqsbWwbptafNyvf/ACquZUXV3DANr5BDIwNYe1mN42w==" + }, + "tslib": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.10.0.tgz", + "integrity": "sha512-qOebF53frne81cf0S9B41ByenJ3/IuH8yJKngAX35CmiZySA0khhkovshKK+jGCaMnVomla7gVlIcc3EvKPbTQ==" }, "util": { "version": "0.10.3", diff --git a/tools/tests/apps/modules/packages/modules-test-package/common.js b/tools/tests/apps/modules/packages/modules-test-package/common.js index b271372428..74d3f6a1b7 100644 --- a/tools/tests/apps/modules/packages/modules-test-package/common.js +++ b/tools/tests/apps/modules/packages/modules-test-package/common.js @@ -15,6 +15,9 @@ assert.strictEqual( idPrefix + (Meteor.isClient ? "context.esm.js" : "context.js"), ); +import ganalytics from "ganalytics"; +assert.strictEqual(typeof ganalytics, "function"); + export function checkWhere(where) { const { where: serverWhere } = require("./server/where.js"); const { where: clientWhere } = require("./client/where.js"); diff --git a/tools/tests/apps/modules/packages/modules-test-package/package.js b/tools/tests/apps/modules/packages/modules-test-package/package.js index 2e44d7459c..c79fd35cbf 100644 --- a/tools/tests/apps/modules/packages/modules-test-package/package.js +++ b/tools/tests/apps/modules/packages/modules-test-package/package.js @@ -9,7 +9,8 @@ Npm.depends({ "@wry/context": "0.4.0", "os-browserify": "0.2.0", "assert": "1.3.0", - "cheerio": "0.22.0" + "cheerio": "0.22.0", + "ganalytics": "3.1.2", }); Package.onUse(function(api) { From c926e9ebd7fe68b9fe0a25d341626ea3f77a6645 Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Sat, 6 Jul 2019 12:17:21 -0400 Subject: [PATCH 167/327] Fix importing of unanticipated .mjs modules in ImportScanner. Should fix this problem reported by @arggh: https://github.com/meteor/meteor/pull/10522#issuecomment-508908306 --- tools/isobuild/import-scanner.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tools/isobuild/import-scanner.js b/tools/isobuild/import-scanner.js index 376f8f60e2..5ad9361da7 100644 --- a/tools/isobuild/import-scanner.js +++ b/tools/isobuild/import-scanner.js @@ -147,6 +147,11 @@ class DefaultHandlers { } } + // Files with an .mjs extension are just JavaScript plus module syntax. + mjs(file) { + return this.js(file); + } + json(file) { file.jsonData = JSON.parse(file.dataString); return jsonDataToCommonJS(file.jsonData); From bd1834c3e34fce85677422dcec935912c2f80ee1 Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Sat, 6 Jul 2019 13:10:35 -0400 Subject: [PATCH 168/327] Update meteor-babel to version 7.5.5. --- History.md | 2 +- packages/babel-compiler/.npm/package/npm-shrinkwrap.json | 6 +++--- packages/babel-compiler/package.js | 2 +- scripts/dev-bundle-tool-package.js | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/History.md b/History.md index f1c1b2944e..7078535aed 100644 --- a/History.md +++ b/History.md @@ -47,7 +47,7 @@ N/A * The `mongodb` npm package used by the `npm-mongo` Meteor package has been updated to version 3.2.7. -* The `meteor-babel` npm package has been updated to version 7.5.3. +* The `meteor-babel` npm package has been updated to version 7.5.5. * The `reify` npm package has been updated to version 0.20.12. diff --git a/packages/babel-compiler/.npm/package/npm-shrinkwrap.json b/packages/babel-compiler/.npm/package/npm-shrinkwrap.json index e73e5ce22a..6f0777d1d1 100644 --- a/packages/babel-compiler/.npm/package/npm-shrinkwrap.json +++ b/packages/babel-compiler/.npm/package/npm-shrinkwrap.json @@ -619,9 +619,9 @@ "integrity": "sha512-6QK0OpF/phMz0Q2AxILkX2mFhi7m+WMwTRg0LQKq/WBB0cDP4rYH3Wp4/d3OTXlrPLVJT/RFqj8tFeAR4nk8AA==" }, "meteor-babel": { - "version": "7.5.3", - "resolved": "https://registry.npmjs.org/meteor-babel/-/meteor-babel-7.5.3.tgz", - "integrity": "sha512-d+uWIqSP15H0iadPMk9m9AxkpvnO3Skilkr6Y58jVQOS2sovP1NxD+6eoRvbMbRTCO/CYl8ceasVa2rZBho2+g==" + "version": "7.5.5", + "resolved": "https://registry.npmjs.org/meteor-babel/-/meteor-babel-7.5.5.tgz", + "integrity": "sha512-3WUfWPoSL4MLVqi99JZrEb/mamWKRkEihLAqzr6IdCtznqc/fbSyOeeLuABZwgfHU/HkDLjhMymmDooEwV7v8g==" }, "meteor-babel-helpers": { "version": "0.0.3", diff --git a/packages/babel-compiler/package.js b/packages/babel-compiler/package.js index f86a612bd2..9cfd164bfa 100644 --- a/packages/babel-compiler/package.js +++ b/packages/babel-compiler/package.js @@ -10,7 +10,7 @@ Package.describe({ }); Npm.depends({ - 'meteor-babel': '7.5.3', + 'meteor-babel': '7.5.5', 'json5': '2.1.0' }); diff --git a/scripts/dev-bundle-tool-package.js b/scripts/dev-bundle-tool-package.js index ef294827be..0d1bc87bf8 100644 --- a/scripts/dev-bundle-tool-package.js +++ b/scripts/dev-bundle-tool-package.js @@ -14,7 +14,7 @@ var packageJson = { pacote: "https://github.com/meteor/pacote/tarball/74fafef8d16c3c5bdf4d3aca5123d49db63680e9", "node-gyp": "5.0.1", "node-pre-gyp": "0.13.0", - "meteor-babel": "7.5.3", + "meteor-babel": "7.5.5", // Keep the versions of these packages consistent with the versions // found in dev-bundle-server-package.js. "meteor-promise": "0.8.7", From c919ad6fb6d296ad1ddbe89c9cd4bf8760369014 Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Sat, 6 Jul 2019 13:11:31 -0400 Subject: [PATCH 169/327] Bump $BUNDLE_VERSION to 8.16.0.21 before rebuilding dev bundle. --- meteor | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meteor b/meteor index 4fdf55e874..bd531a9d41 100755 --- a/meteor +++ b/meteor @@ -1,6 +1,6 @@ #!/usr/bin/env bash -BUNDLE_VERSION=8.16.0.20 +BUNDLE_VERSION=8.16.0.21 # OS Check. Put here because here is where we download the precompiled # bundles that are arch specific. From 596c1998bea0f7c93822cac454f3cee53142a239 Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Sat, 6 Jul 2019 17:16:47 -0400 Subject: [PATCH 170/327] Bump package versions for 1.8.2-beta.15 release. --- packages/babel-compiler/package.js | 2 +- packages/babel-runtime/package.js | 2 +- packages/context/package.js | 2 +- packages/ecmascript-runtime-client/package.js | 2 +- packages/ecmascript-runtime-server/package.js | 2 +- packages/ecmascript/package.js | 2 +- packages/meteor-tool/package.js | 2 +- packages/modules-runtime/package.js | 2 +- packages/modules/package.js | 2 +- packages/mongo/package.js | 2 +- packages/npm-mongo/package.js | 2 +- scripts/admin/meteor-release-experimental.json | 2 +- 12 files changed, 12 insertions(+), 12 deletions(-) diff --git a/packages/babel-compiler/package.js b/packages/babel-compiler/package.js index 9cfd164bfa..1e8e62ad2c 100644 --- a/packages/babel-compiler/package.js +++ b/packages/babel-compiler/package.js @@ -6,7 +6,7 @@ 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.4.0-beta182.14' + version: '7.4.0-beta182.15' }); Npm.depends({ diff --git a/packages/babel-runtime/package.js b/packages/babel-runtime/package.js index af711f4eff..c75dbf868f 100644 --- a/packages/babel-runtime/package.js +++ b/packages/babel-runtime/package.js @@ -1,7 +1,7 @@ Package.describe({ name: "babel-runtime", summary: "Runtime support for output of Babel transpiler", - version: '1.4.0-beta182.14', + version: '1.4.0-beta182.15', documentation: 'README.md' }); diff --git a/packages/context/package.js b/packages/context/package.js index 5469fc9a11..6ecfa3a20e 100644 --- a/packages/context/package.js +++ b/packages/context/package.js @@ -1,6 +1,6 @@ Package.describe({ name: "context", - version: "0.4.0-beta182.14", + version: "0.4.0-beta182.15", summary: "Manage contextual information without passing objects around", documentation: "README.md" }); diff --git a/packages/ecmascript-runtime-client/package.js b/packages/ecmascript-runtime-client/package.js index fa0184b8ef..cce8d5038f 100644 --- a/packages/ecmascript-runtime-client/package.js +++ b/packages/ecmascript-runtime-client/package.js @@ -1,6 +1,6 @@ Package.describe({ name: "ecmascript-runtime-client", - version: "0.9.0-beta182.14", + version: "0.9.0-beta182.15", summary: "Polyfills for new ECMAScript 2015 APIs like Map and Set", git: "https://github.com/meteor/meteor/tree/devel/packages/ecmascript-runtime-client", documentation: "README.md" diff --git a/packages/ecmascript-runtime-server/package.js b/packages/ecmascript-runtime-server/package.js index 6849d3fa77..949ee9d020 100644 --- a/packages/ecmascript-runtime-server/package.js +++ b/packages/ecmascript-runtime-server/package.js @@ -1,6 +1,6 @@ Package.describe({ name: "ecmascript-runtime-server", - version: "0.8.0-beta182.14", + version: "0.8.0-beta182.15", summary: "Polyfills for new ECMAScript 2015 APIs like Map and Set", git: "https://github.com/meteor/meteor/tree/devel/packages/ecmascript-runtime-client", documentation: "README.md" diff --git a/packages/ecmascript/package.js b/packages/ecmascript/package.js index 64ba793bd2..fe8cd9920e 100644 --- a/packages/ecmascript/package.js +++ b/packages/ecmascript/package.js @@ -1,6 +1,6 @@ Package.describe({ name: 'ecmascript', - version: '0.13.0-beta182.14', + version: '0.13.0-beta182.15', summary: 'Compiler plugin that supports ES2015+ in all .js files', documentation: 'README.md' }); diff --git a/packages/meteor-tool/package.js b/packages/meteor-tool/package.js index 99d0323d33..473f157c7f 100644 --- a/packages/meteor-tool/package.js +++ b/packages/meteor-tool/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "The Meteor command-line tool", - version: '1.8.2-beta.14' + version: '1.8.2-beta.15' }); Package.includeTool(); diff --git a/packages/modules-runtime/package.js b/packages/modules-runtime/package.js index 901a60efff..6e210c8b5e 100644 --- a/packages/modules-runtime/package.js +++ b/packages/modules-runtime/package.js @@ -1,6 +1,6 @@ Package.describe({ name: "modules-runtime", - version: "0.11.0-beta182.14", + version: "0.11.0-beta182.15", summary: "CommonJS module system", git: "https://github.com/benjamn/install", documentation: "README.md" diff --git a/packages/modules/package.js b/packages/modules/package.js index 3ab1dd4bf3..1bcf226deb 100644 --- a/packages/modules/package.js +++ b/packages/modules/package.js @@ -1,6 +1,6 @@ Package.describe({ name: "modules", - version: "0.14.0-beta182.14", + version: "0.14.0-beta182.15", summary: "CommonJS module system", documentation: "README.md" }); diff --git a/packages/mongo/package.js b/packages/mongo/package.js index 6825589e9f..990ef4d4ec 100644 --- a/packages/mongo/package.js +++ b/packages/mongo/package.js @@ -9,7 +9,7 @@ Package.describe({ summary: "Adaptor for using MongoDB and Minimongo over DDP", - version: '1.7.0-beta182.14' + version: '1.7.0-beta182.15' }); Npm.depends({ diff --git a/packages/npm-mongo/package.js b/packages/npm-mongo/package.js index 2e228c7dd0..8983d9e98c 100644 --- a/packages/npm-mongo/package.js +++ b/packages/npm-mongo/package.js @@ -3,7 +3,7 @@ Package.describe({ summary: "Wrapper around the mongo npm package", - version: "3.2.0-beta182.14", + version: "3.2.0-beta182.15", documentation: null }); diff --git a/scripts/admin/meteor-release-experimental.json b/scripts/admin/meteor-release-experimental.json index 9b4413da57..ad1c2603b4 100644 --- a/scripts/admin/meteor-release-experimental.json +++ b/scripts/admin/meteor-release-experimental.json @@ -1,6 +1,6 @@ { "track": "METEOR", - "version": "1.8.2-beta.14", + "version": "1.8.2-beta.15", "recommended": false, "official": false, "description": "Meteor" From d24a2dbb52464f9d8b9449141a9b244937995db5 Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Sun, 7 Jul 2019 17:32:59 -0400 Subject: [PATCH 171/327] Abort _emitResources if buildmessage.jobHasMessages(). --- tools/isobuild/bundler.js | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/tools/isobuild/bundler.js b/tools/isobuild/bundler.js index 2f876272ff..23f9d2c814 100644 --- a/tools/isobuild/bundler.js +++ b/tools/isobuild/bundler.js @@ -1136,6 +1136,22 @@ class Target { const jsOutputFilesMap = compilerPluginModule.PackageSourceBatch .computeJsOutputFilesMap(sourceBatches); + sourceBatches.forEach(batch => { + const { unibuild } = batch; + + // Depend on the source files that produced these resources. + this.watchSet.merge(unibuild.watchSet); + + // Remember the versions of all of the build-time dependencies + // that were used in these resources. Depend on them as well. + // XXX assumes that this merges cleanly + this.watchSet.merge(unibuild.pkg.pluginWatchSet); + }); + + if (buildmessage.jobHasMessages()) { + return; + } + const versions = {}; const dynamicImportFiles = new Set; @@ -1293,14 +1309,6 @@ class Target { addToTree(file.hash(), file.targetPath, versions); } }); - - // Depend on the source files that produced these resources. - this.watchSet.merge(unibuild.watchSet); - - // Remember the versions of all of the build-time dependencies - // that were used in these resources. Depend on them as well. - // XXX assumes that this merges cleanly - this.watchSet.merge(unibuild.pkg.pluginWatchSet); }); dynamicImportFiles.forEach(file => { From 01fb509fff44bc8d840ec57a6244b71999d913ce Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Sat, 6 Jul 2019 12:12:31 -0400 Subject: [PATCH 172/327] Implement an official typescript compiler plugin. --- packages/typescript/README.md | 98 +++++++++++++++++++ packages/typescript/package.js | 31 ++++++ packages/typescript/plugin.js | 19 ++++ packages/typescript/tests.ts | 39 ++++++++ .../static-assets/skel-bare/.meteor/packages | 1 + .../static-assets/skel-full/.meteor/packages | 1 + .../skel-minimal/.meteor/packages | 1 + .../static-assets/skel-react/.meteor/packages | 1 + tools/static-assets/skel/.meteor/packages | 1 + tools/tool-testing/sandbox.js | 2 + 10 files changed, 194 insertions(+) create mode 100644 packages/typescript/README.md create mode 100644 packages/typescript/package.js create mode 100644 packages/typescript/plugin.js create mode 100644 packages/typescript/tests.ts diff --git a/packages/typescript/README.md b/packages/typescript/README.md new file mode 100644 index 0000000000..406f24fa50 --- /dev/null +++ b/packages/typescript/README.md @@ -0,0 +1,98 @@ +# typescript +[Source code of released version](https://github.com/meteor/meteor/tree/master/packages/typescript) | [Source code of development version](https://github.com/meteor/meteor/tree/devel/packages/typescript) +*** + +This plugin package enables the use of +[TypeScript](https://www.typescriptlang.org) modules with `.ts` or `.tsx` +file extensions in Meteor applications and packages, alongside `.js` +modules (or whatever other types of modules you might be using). + +## Usage + +The `typescript` package registers a compiler plugin that transpiles +TypeScript to plain ECMAScript, which is then compiled by Babel for +multiple targets (server, modern browsers, legacy browsers, cordova). +By default, the `typescript` package is included in the `.meteor/packages` +file of all new Meteor applications. + +To add the `typescript` package to an existing app, run the following +command from your app directory: + +```bash +meteor add typescript +``` + +To add the `typescript` package to an existing package, include the +statement `api.use('typescript');` in the `Package.onUse` callback in your +`package.js` file: + +```js +Package.onUse(function (api) { + api.use('typescript'); +}); +``` + +## Supported TypeScript features + +Almost all TypeScript syntax is supported, though this plugin currently +does not attempt to provide type checking (just compilation). + +Since the Meteor `typescript` package runs the official TypeScript +compiler before running Babel, it does not suffer from the same +[caveats](https://babeljs.io/docs/en/babel-plugin-transform-typescript#caveats) +known to affect the Babel TypeScript transform. In particular, +`namespace`s are fully supported. + +However, as of this writing, the Meteor `typescript` package compiles +TypeScript modules individually, using the `transpileModule` function, +which means that certain cross-file analysis and compilation will not +work. For example, `export const enum {...}` is not fully supported, +though `const enum {...}` works when confined to a single module. + +Unlike the Babel implementation of TypeScript, there is nothing +fundamentally preventing Meteor from compiling all TypeScript modules +together, rather than individually, which would enable full support for +features like `export const enum`. That's an area for future improvement, +though we will have to weigh the performance implications carefully. + +As of this writing, `tsconfig.json` files are ignored by the plugin. +There's nothing fundamentally preventing the Meteor `typescript` plugin +from accepting configuration options from `tsconfig.json`, but for now +we've kept things simple by avoiding configuration complexities. You may +still want to have a `tsconfig.json` file in your application root +directory to configure the behavior of editors like VSCode, but it will +not be respected by Meteor. + +Finally, since the TypeScript compiler runs first, syntax that is not +understood by the TypeScript compiler, such as experimental ECMAScript +proposals, may cause the TypeScript parser to reject your code. You can +use `.babelrc` files to configure Babel compilation, but TypeScript still +has to accept the code first. + +## Areas for improvement + +* Compile all TypeScript modules at the same time, rather than compiling + them individually, to enable cross-module analysis and compilation. In + the meantime, if you need this behavior, consider using + [`adornis:typescript`](https://atmospherejs.com/adornis/typescript). + +* Use the version of `typescript` installed in the application + `node_modules` directory, rather than the one bundled with + `meteor-babel`. We will attempt to keep `meteor-babel`'s version of + `typescript` up-to-date, but it would be better to leave this decision + to the application developer. + +* Generate `.d.ts` declaration files that can be consumed by external + tools. In particular, a Meteor package that uses TypeScript could + generate `.d.ts` files in the `/node_modules/meteor/package-name/` + directory, which would allow tools like VSCode to find the right types + for the package when importing from `meteor/package-name`. + +* Cache the output of the TypeScript compiler separately from the output + of Meteor's Babel compiler pipeline. The TypeScript compiler does not + compile code differently for different targets (server, modern, legacy, + etc.), so its results could theoretically be reused for all targets. + +* Make the `typescript` plugin look up `tsconfig.json` files (similar to + how `babel-compiler` looks up `.babelrc` files) and obey (some of) the + configuration options. diff --git a/packages/typescript/package.js b/packages/typescript/package.js new file mode 100644 index 0000000000..ddec9d5b72 --- /dev/null +++ b/packages/typescript/package.js @@ -0,0 +1,31 @@ +Package.describe({ + name: "typescript", + version: "3.5.2", + summary: "Compiler plugin that compiles TypeScript and ECMAScript in .ts and .tsx files", + documentation: "README.md" +}); + +Package.registerBuildPlugin({ + name: "compile-typescript", + use: ["babel-compiler"], + sources: ["plugin.js"] +}); + +Package.onUse(function (api) { + api.use("isobuild:compiler-plugin@1.0.0"); + // The following api.imply calls should match those in + // ../ecmascript/package.js. + api.imply("modules"); + api.imply("ecmascript-runtime"); + api.imply("babel-runtime"); + api.imply("promise"); + // Runtime support for Meteor 1.5 dynamic import(...) syntax. + api.imply("dynamic-import"); +}); + +Package.onTest(function (api) { + api.use("tinytest"); + api.use("es5-shim"); + api.use("typescript"); + api.mainModule("tests.ts"); +}); diff --git a/packages/typescript/plugin.js b/packages/typescript/plugin.js new file mode 100644 index 0000000000..35e4ee3a51 --- /dev/null +++ b/packages/typescript/plugin.js @@ -0,0 +1,19 @@ +Plugin.registerCompiler({ + extensions: ["ts", "tsx"], +}, function () { + return new TypeScriptCompiler({ + react: true, + typescript: true, + }); +}); + +class TypeScriptCompiler extends BabelCompiler { + processFilesForTarget(inputFiles) { + return super.processFilesForTarget(inputFiles.filter( + // TypeScript .d.ts declaration files look like .ts files, but it's + // important that we do not compile them using the TypeScript + // compiler, as it will fail with a cryptic error message. + file => ! file.getPathInPackage().endsWith(".d.ts") + )); + } +} diff --git a/packages/typescript/tests.ts b/packages/typescript/tests.ts new file mode 100644 index 0000000000..5cf37303ac --- /dev/null +++ b/packages/typescript/tests.ts @@ -0,0 +1,39 @@ +import { Tinytest } from "meteor/tinytest"; + +Tinytest.add("TypeScript - basics", test => { + test.equal(2 + 2, 4); +}); + +Tinytest.add("TypeScript - const enum", test => { + const enum Kind { + NORMAL, + WEIRD, + } + test.equal(typeof Kind.NORMAL, "number"); + test.equal(typeof Kind.WEIRD, "number"); + test.equal(Kind.NORMAL + 1, Kind.WEIRD); +}); + +Tinytest.add("TypeScript - constructor member parameters", test => { + class Test { + constructor( + private a: number, + public b: string, + ) {} + } + const t = new Test(1234, "asdf"); + test.equal((t as any).a, 1234); + test.equal(t.b, "asdf"); +}); + +Tinytest.add("TypeScript - namespaces", test => { + function foo() { + return foo.bar; + } + + namespace foo { + export const bar = "oyez"; + } + + test.equal(foo(), "oyez"); +}); diff --git a/tools/static-assets/skel-bare/.meteor/packages b/tools/static-assets/skel-bare/.meteor/packages index 1dacd59dda..62bedd2c00 100644 --- a/tools/static-assets/skel-bare/.meteor/packages +++ b/tools/static-assets/skel-bare/.meteor/packages @@ -15,4 +15,5 @@ standard-minifier-css # CSS minifier run for production mode standard-minifier-js # JS minifier run for production mode es5-shim # ECMAScript 5 compatibility for older browsers ecmascript # Enable ECMAScript2015+ syntax in app code +typescript # Enable TypeScript syntax in .ts and .tsx modules shell-server # Server-side component of the `meteor shell` command diff --git a/tools/static-assets/skel-full/.meteor/packages b/tools/static-assets/skel-full/.meteor/packages index 31294f8311..f4a8c36f6f 100644 --- a/tools/static-assets/skel-full/.meteor/packages +++ b/tools/static-assets/skel-full/.meteor/packages @@ -15,6 +15,7 @@ standard-minifier-css # CSS minifier run for production mode standard-minifier-js # JS minifier run for production mode es5-shim # ECMAScript 5 compatibility for older browsers ecmascript # Enable ECMAScript2015+ syntax in app code +typescript # Enable TypeScript syntax in .ts and .tsx modules shell-server # Server-side component of the `meteor shell` command kadira:flow-router # FlowRouter is a very simple router for Meteor diff --git a/tools/static-assets/skel-minimal/.meteor/packages b/tools/static-assets/skel-minimal/.meteor/packages index 341bbfc93a..8ddd70b7d2 100644 --- a/tools/static-assets/skel-minimal/.meteor/packages +++ b/tools/static-assets/skel-minimal/.meteor/packages @@ -10,6 +10,7 @@ standard-minifier-css # CSS minifier run for production mode standard-minifier-js # JS minifier run for production mode es5-shim # ECMAScript 5 compatibility for older browsers ecmascript # Enable ECMAScript2015+ syntax in app code +typescript # Enable TypeScript syntax in .ts and .tsx modules shell-server # Server-side component of the `meteor shell` command webapp # Serves a Meteor app over HTTP server-render # Support for server-side rendering diff --git a/tools/static-assets/skel-react/.meteor/packages b/tools/static-assets/skel-react/.meteor/packages index 1405595e1b..3319ee0005 100644 --- a/tools/static-assets/skel-react/.meteor/packages +++ b/tools/static-assets/skel-react/.meteor/packages @@ -13,6 +13,7 @@ standard-minifier-css # CSS minifier run for production mode standard-minifier-js # JS minifier run for production mode es5-shim # ECMAScript 5 compatibility for older browsers ecmascript # Enable ECMAScript2015+ syntax in app code +typescript # Enable TypeScript syntax in .ts and .tsx modules shell-server # Server-side component of the `meteor shell` command autopublish # Publish all data to the clients (for prototyping) diff --git a/tools/static-assets/skel/.meteor/packages b/tools/static-assets/skel/.meteor/packages index 18f8d45d89..7bfecd24ce 100644 --- a/tools/static-assets/skel/.meteor/packages +++ b/tools/static-assets/skel/.meteor/packages @@ -15,6 +15,7 @@ standard-minifier-css # CSS minifier run for production mode standard-minifier-js # JS minifier run for production mode es5-shim # ECMAScript 5 compatibility for older browsers ecmascript # Enable ECMAScript2015+ syntax in app code +typescript # Enable TypeScript syntax in .ts and .tsx modules shell-server # Server-side component of the `meteor shell` command autopublish # Publish all data to the clients (for prototyping) diff --git a/tools/tool-testing/sandbox.js b/tools/tool-testing/sandbox.js index a024977037..578b182d9c 100644 --- a/tools/tool-testing/sandbox.js +++ b/tools/tool-testing/sandbox.js @@ -566,6 +566,8 @@ const ROOT_PACKAGES_TO_BUILD_IN_SANDBOX = [ "es5-shim", "shell-server", "modern-browsers", + "ecmascript", + "typescript", ]; function newSelfTestCatalog() { From 4e894663f59c5c5ccfd735cd4d9d90766427e07c Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Sun, 7 Jul 2019 19:19:36 -0400 Subject: [PATCH 173/327] Add basic test of TypeScript support to modules test app. --- tools/tests/apps/modules/.meteor/packages | 1 + tools/tests/apps/modules/tests.js | 8 ++++++++ tools/tests/apps/modules/typescript.ts | 3 +++ 3 files changed, 12 insertions(+) create mode 100644 tools/tests/apps/modules/typescript.ts diff --git a/tools/tests/apps/modules/.meteor/packages b/tools/tests/apps/modules/.meteor/packages index 7b80a7a68c..b39115f075 100644 --- a/tools/tests/apps/modules/.meteor/packages +++ b/tools/tests/apps/modules/.meteor/packages @@ -27,3 +27,4 @@ underscore@1.0.10 import-local-json-module akryum:vue-component dummy-compiler +typescript diff --git a/tools/tests/apps/modules/tests.js b/tools/tests/apps/modules/tests.js index 3f15c556fa..5394a52b30 100644 --- a/tools/tests/apps/modules/tests.js +++ b/tools/tests/apps/modules/tests.js @@ -708,6 +708,14 @@ describe("ecmascript miscellany", () => { }); }); +describe("TypeScript", () => { + it("can be imported", () => { + const { Test } = require("./typescript"); + assert.strictEqual(typeof Test, "function"); + assert.strictEqual(new Test(1234).value, 1234); + }); +}); + Meteor.isClient && describe("client/compatibility directories", () => { it("should contain bare files", () => { diff --git a/tools/tests/apps/modules/typescript.ts b/tools/tests/apps/modules/typescript.ts new file mode 100644 index 0000000000..72228b2f7d --- /dev/null +++ b/tools/tests/apps/modules/typescript.ts @@ -0,0 +1,3 @@ +export class Test { + constructor(public readonly value: T) {} +} From 4334fd4ceb447506f0a0802c1a0e05f529037e8e Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Mon, 8 Jul 2019 16:57:04 -0400 Subject: [PATCH 174/327] Convert tools/isobuild/resolver.js to TypeScript. :tada: --- tools/isobuild/compiler-plugin.js | 2 +- tools/isobuild/import-scanner.js | 2 +- tools/isobuild/{resolver.js => resolver.ts} | 151 +++++++++++--------- tools/project-context.js | 2 +- 4 files changed, 85 insertions(+), 72 deletions(-) rename tools/isobuild/{resolver.js => resolver.ts} (75%) diff --git a/tools/isobuild/compiler-plugin.js b/tools/isobuild/compiler-plugin.js index 061157ead7..f78acaf517 100644 --- a/tools/isobuild/compiler-plugin.js +++ b/tools/isobuild/compiler-plugin.js @@ -15,7 +15,7 @@ import {sourceMapLength} from '../utils/utils.js'; import {Console} from '../console/console.js'; import ImportScanner from './import-scanner.js'; import {cssToCommonJS} from "./css-modules"; -import Resolver from "./resolver.js"; +import Resolver from "./resolver"; import { optimisticStatOrNull, optimisticReadJsonOrNull, diff --git a/tools/isobuild/import-scanner.js b/tools/isobuild/import-scanner.js index 5ad9361da7..7b786c7c9a 100644 --- a/tools/isobuild/import-scanner.js +++ b/tools/isobuild/import-scanner.js @@ -45,7 +45,7 @@ import { wrap } from "optimism"; import { compile as reifyCompile } from "reify/lib/compiler"; import { parse as reifyBabelParse } from "reify/lib/parsers/babel"; -import Resolver from "./resolver.js"; +import Resolver from "./resolver"; const fakeFileStat = { isFile() { diff --git a/tools/isobuild/resolver.js b/tools/isobuild/resolver.ts similarity index 75% rename from tools/isobuild/resolver.js rename to tools/isobuild/resolver.ts index 14137cc581..cd7c809d7f 100644 --- a/tools/isobuild/resolver.js +++ b/tools/isobuild/resolver.ts @@ -1,12 +1,9 @@ -import { +const { isString, isObject, - isFunction, - each, has, -} from "underscore"; +} = require("underscore"); -import { sha1 } from "../fs/watch"; import { matches as archMatches } from "../utils/archinfo.js"; import { pathJoin, @@ -18,16 +15,14 @@ import { convertToPosixPath, } from "../fs/files"; -import LRU from "lru-cache"; - import { wrap } from "optimism"; import { optimisticStatOrNull, optimisticReadJsonOrNull, } from "../fs/optimistic"; -const nativeModulesMap = Object.create(null); -const nativeNames = Object.keys(process.binding("natives")); +const nativeModulesMap: Record = Object.create(null); +const nativeNames = Object.keys((process as any).binding("natives")); // Node 0.10 does not include process as a built-in module, but later // versions of Node do, and we provide a stub for it on the client. @@ -46,34 +41,46 @@ nativeNames.forEach(id => { nativeModulesMap[id] = "meteor-node-stubs/deps/" + id; }); -const resolverCache = new LRU({ - max: Math.pow(2, 12) -}); +export type ResolverOptions = { + sourceRoot: string; + targetArch: string; + extensions: string[]; + nodeModulesPaths: string[]; + caller?: string; +} export default class Resolver { - static getOrCreate(options) { - const key = JSON.stringify(options); - let resolver = resolverCache.get(key); - if (! resolver) { - resolverCache.set(key, resolver = new Resolver(options)); + static getOrCreate = wrap(function (options: ResolverOptions) { + return new Resolver(options); + }, { + makeCacheKey(options) { + return JSON.stringify(options); } - return resolver; - } + }); + + private sourceRoot: string; + private targetArch: string; + private extensions: string[]; + private nodeModulesPaths: string[]; + private mainFields: string[]; + + public statOrNull = optimisticStatOrNull; constructor({ sourceRoot, targetArch, extensions = [".js", ".json"], nodeModulesPaths = [], - }) { + }: ResolverOptions) { this.sourceRoot = sourceRoot; this.extensions = extensions; this.targetArch = targetArch; this.nodeModulesPaths = nodeModulesPaths; this.statOrNull = optimisticStatOrNull; + const { resolve } = this; this.resolve = wrap((id, absParentPath) => { - return this._resolve(id, absParentPath); + return resolve.call(this, id, absParentPath); }, { makeCacheKey(id, absParentPath) { // Only the directory of the absParentPath matters for caching. @@ -81,8 +88,16 @@ export default class Resolver { } }); - this._cacheMethod("_findPkgJsonSubsetForPath"); - this._cacheMethod("_getPkgJsonSubsetForDir"); + const { + findPkgJsonSubsetForPath, + getPkgJsonSubsetForDir, + } = this; + + this.findPkgJsonSubsetForPath = wrap( + path => findPkgJsonSubsetForPath.call(this, path)); + + this.getPkgJsonSubsetForDir = wrap( + path => getPkgJsonSubsetForDir.call(this, path)); if (archMatches(this.targetArch, "web")) { this.mainFields = ["browser", "module", "main"]; @@ -91,33 +106,26 @@ export default class Resolver { } } - _cacheMethod(name) { - const original = this[name]; - this[name] = wrap( - (...args) => original.apply(this, args) - ); - } - - static isTopLevel(id) { + static isTopLevel(id: string) { return "./".indexOf(id.charAt(0)) < 0; } - static isNative(id) { + static isNative(id: string): boolean { return has(nativeModulesMap, id); } - static getNativeStubId(id) { + static getNativeStubId(id: string) { return nativeModulesMap[id] || null; } // Resolve the given module identifier to an object { path, stat } or // null, relative to an absolute parent path. The _seenDirPaths // parameter is for internal use only and should be ommitted. - _resolve(id, absParentPath, _seenDirPaths) { + public resolve(id: string, absParentPath: string, _seenDirPaths?: Set) { let resolved = - this._resolveAbsolute(id, absParentPath) || - this._resolveRelative(id, absParentPath) || - this._resolveNodeModule(id, absParentPath); + this.resolveAbsolute(id, absParentPath) || + this.resolveRelative(id, absParentPath) || + this.resolveNodeModule(id, absParentPath); if (typeof resolved === "string") { // The _resolveNodeModule method can return "missing" to indicate @@ -128,7 +136,7 @@ export default class Resolver { let packageJsonMap = null; - while (resolved && resolved.stat.isDirectory()) { + while (resolved && resolved.stat && resolved.stat.isDirectory()) { let dirPath = resolved.path; _seenDirPaths = _seenDirPaths || new Set; @@ -138,7 +146,7 @@ export default class Resolver { if (! _seenDirPaths.has(dirPath)) { _seenDirPaths.add(dirPath); - const found = this._getPkgJsonSubsetForDir(dirPath); + const found = this.getPkgJsonSubsetForDir(dirPath); const foundPkgJsonMain = found && this.mainFields.some(name => { const value = found.pkg[name]; if (isString(value)) { @@ -146,19 +154,19 @@ export default class Resolver { // to be considered relative, so first we try simply appending it // to the directory path before falling back to a full resolve, // which might return a package from a node_modules directory. - resolved = this._joinAndStat(dirPath, value) || - this._resolve(value, found.path, _seenDirPaths); + resolved = this.joinAndStat(dirPath, value) || + this.resolve(value, found.path, _seenDirPaths); return resolved && typeof resolved === "object"; } return false; }); - if (foundPkgJsonMain) { + if (foundPkgJsonMain && found) { if (! resolved.packageJsonMap) { resolved.packageJsonMap = Object.create(null); } - resolved.packageJsonMap[found.path] = found.pkg; + resolved.packageJsonMap![found.path] = found.pkg; // The resolution above may have returned a directory, so we // merge resolved.packageJsonMap into packageJsonMap so that we @@ -192,7 +200,7 @@ export default class Resolver { // there's very little chance an `index.js` file will be a // directory. However, in principle it is remotely possible that a // file called `index.js` could be a directory instead of a file. - resolved = this._joinAndStat(dirPath, "index"); + resolved = this.joinAndStat(dirPath, "index"); } if (resolved) { @@ -203,13 +211,13 @@ export default class Resolver { // If the package.json file that governs resolved.path has a // "browser" field, include it in resolved.packageJsonMap so that // the ImportScanner can register the appropriate browser aliases. - const pkgJsonInfo = this._findPkgJsonSubsetForPath(resolved.path); + const pkgJsonInfo = this.findPkgJsonSubsetForPath(resolved.path); if (pkgJsonInfo && isObject(pkgJsonInfo.pkg.browser)) { if (! resolved.packageJsonMap) { resolved.packageJsonMap = Object.create(null); } - resolved.packageJsonMap[pkgJsonInfo.path] = pkgJsonInfo.pkg; + resolved.packageJsonMap![pkgJsonInfo.path] = pkgJsonInfo.pkg; } resolved.id = convertToPosixPath( @@ -221,15 +229,20 @@ export default class Resolver { return resolved; } - _joinAndStat(...joinArgs) { - const joined = pathJoin(...joinArgs); + private joinAndStat(...joinArgs: string[]) { + const joined: string = pathJoin(...joinArgs); const path = pathNormalize(joined); const exactStat = this.statOrNull(path); const exactResult = exactStat && { path, stat: exactStat }; - let result = null; + let result: { + stat: typeof exactStat; + path: string; + packageJsonMap?: Record>; + id?: string; + } | null = null; - if (exactResult && exactStat.isFile()) { + if (exactResult && exactStat && exactStat.isFile()) { result = exactResult; } else { // No point in trying alternate file extensions if the parent @@ -247,7 +260,7 @@ export default class Resolver { } } - if (! result && exactResult && exactStat.isDirectory()) { + if (! result && exactResult && exactStat && exactStat.isDirectory()) { // After trying all available file extensions, fall back to the // original result if it was a directory. result = exactResult; @@ -256,18 +269,18 @@ export default class Resolver { return result; } - _resolveAbsolute(id, absParentPath) { + private resolveAbsolute(id: string, _absParentPath: string) { return id.charAt(0) === "/" && - this._joinAndStat(this.sourceRoot, id.slice(1)); + this.joinAndStat(this.sourceRoot, id.slice(1)); } - _resolveRelative(id, absParentPath) { + private resolveRelative(id: string, absParentPath: string) { if (id.charAt(0) === ".") { - return this._joinAndStat(absParentPath, "..", id); + return this.joinAndStat(absParentPath, "..", id); } } - _resolveNodeModule(id, absParentPath) { + private resolveNodeModule(id: string, absParentPath: string) { if (! Resolver.isTopLevel(id)) { return null; } @@ -279,7 +292,7 @@ export default class Resolver { return null; } - let sourceRoot; + let sourceRoot: string | undefined; const relParentPath = pathRelative(this.sourceRoot, absParentPath); if (! relParentPath.startsWith("..")) { // If the file is contained by this.sourceRoot, then it's safe to @@ -309,7 +322,7 @@ export default class Resolver { dir = pathDirname(dir); } - while (! (resolved = this._joinAndStat(dir, "node_modules", id))) { + while (! (resolved = this.joinAndStat(dir, "node_modules", id))) { if (dir === sourceRoot) { break; } @@ -328,7 +341,7 @@ export default class Resolver { // After checking any local node_modules directories, fall back to // the package NPM directory, if one was specified. this.nodeModulesPaths.some(path => { - return resolved = this._joinAndStat(path, id); + return resolved = this.joinAndStat(path, id); }); } @@ -343,7 +356,7 @@ export default class Resolver { return resolved || "missing"; } - _getPkgJsonSubsetForDir(dirPath) { + private getPkgJsonSubsetForDir(dirPath: string) { const pkgJsonPath = pathJoin(dirPath, "package.json"); const pkg = optimisticReadJsonOrNull(pkgJsonPath); if (! pkg) { @@ -352,7 +365,7 @@ export default class Resolver { // Output a JS module that exports just the "name", "version", "main", // and "browser" properties (if defined) from the package.json file. - const pkgSubset = {}; + const pkgSubset: Partial = {}; if (has(pkg, "name")) { pkgSubset.name = pkg.name; @@ -376,11 +389,13 @@ export default class Resolver { }; } - _findPkgJsonSubsetForPath(path) { + private findPkgJsonSubsetForPath( + path: string, + ): ReturnType { const stat = this.statOrNull(path); if (stat && stat.isDirectory()) { - const found = this._getPkgJsonSubsetForDir(path); + const found = this.getPkgJsonSubsetForDir(path); if (found) { return found; } @@ -400,15 +415,13 @@ export default class Resolver { return null; } - return this._findPkgJsonSubsetForPath(parentDir); + return this.findPkgJsonSubsetForPath(parentDir); } }; import { Profile } from "../tool-env/profile"; -each(Resolver.prototype, (value, key) => { +const Rp = Resolver.prototype as any; +Object.keys(Rp).forEach(key => { if (key === "constructor") return; - Resolver.prototype[key] = Profile( - `Resolver#${key}`, - Resolver.prototype[key] - ); + Rp[key] = Profile(`Resolver#${key}`, Rp[key]); }); diff --git a/tools/project-context.js b/tools/project-context.js index 3d8fcbe3c5..68bebf54b8 100644 --- a/tools/project-context.js +++ b/tools/project-context.js @@ -26,7 +26,7 @@ import { mapWhereToArches, } from "./isobuild/package-api.js"; -import Resolver from "./isobuild/resolver.js"; +import Resolver from "./isobuild/resolver"; const CAN_DELAY_LEGACY_BUILD = ! JSON.parse( process.env.METEOR_DISALLOW_DELAYED_LEGACY_BUILD || "false" From 06b5f322159a4660c896fc6e6a3af1bd2fd71457 Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Mon, 15 Jul 2019 11:11:46 -0400 Subject: [PATCH 175/327] Make `meteor npx tsc` run without errors, and test it. This makes type checking possible without an external tool like VSCode. --- .circleci/config.yml | 4 ++++ tools/tsconfig.json | 7 ++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 3020df1304..7dfe7f968c 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -147,6 +147,10 @@ jobs: name: Get Ready command: | eval $PRE_TEST_COMMANDS; + pushd tools + # Ensure that meteor/tools has no TypeScript errors. + ../meteor npx tsc --noEmit + popd ./meteor --get-ready # shouldn't take longer than 20 minutes no_output_timeout: 20m diff --git a/tools/tsconfig.json b/tools/tsconfig.json index b7793b4b38..668d91e71b 100644 --- a/tools/tsconfig.json +++ b/tools/tsconfig.json @@ -25,5 +25,10 @@ "types": ["node"], "esModuleInterop": true, "preserveSymlinks": true, - } + }, + "exclude": [ + "./tests/apps/**", + "./tests/packages/**", + "./static-assets/skel*/**" + ] } From 8af53f97d67ea5314cbb7dafd44036c039b1cc69 Mon Sep 17 00:00:00 2001 From: Michael Newman Date: Mon, 15 Jul 2019 08:34:45 -0700 Subject: [PATCH 176/327] Convert tools/utils/eachline.js to TypeScript (#10614) Thanks to @menewman for tackling this small but important module! --- tools/cordova/run-targets.js | 2 +- tools/runners/run-app.js | 2 +- tools/shell-client.js | 2 +- tools/utils/{eachline.js => eachline.ts} | 15 +++++++++------ tools/utils/utils.js | 4 ++-- 5 files changed, 14 insertions(+), 11 deletions(-) rename tools/utils/{eachline.js => eachline.ts} (50%) diff --git a/tools/cordova/run-targets.js b/tools/cordova/run-targets.js index 021ccc9ed0..75c66c2eac 100644 --- a/tools/cordova/run-targets.js +++ b/tools/cordova/run-targets.js @@ -132,7 +132,7 @@ export class AndroidRunTarget extends CordovaRunTarget { } async tailLogs(cordovaProject, target) { - const { transform } = require("../utils/eachline.js"); + const { transform } = require("../utils/eachline"); cordovaProject.runCommands(`tailing logs for ${this.displayName}`, async () => { await this.checkPlatformRequirementsAndSetEnv(cordovaProject); diff --git a/tools/runners/run-app.js b/tools/runners/run-app.js index b96192f7cd..9c72e526ce 100644 --- a/tools/runners/run-app.js +++ b/tools/runners/run-app.js @@ -15,7 +15,7 @@ var release = require('../packaging/release.js'); import { pluginVersionsFromStarManifest } from '../cordova/index.js'; import { CordovaBuilder } from '../cordova/builder.js'; import { closeAllWatchers } from "../fs/safe-watcher"; -import { eachline } from "../utils/eachline.js"; +import { eachline } from "../utils/eachline"; import { loadIsopackage } from '../tool-env/isopackets.js'; const hasOwn = Object.prototype.hasOwnProperty; diff --git a/tools/shell-client.js b/tools/shell-client.js index 14931559dc..1caec8d097 100644 --- a/tools/shell-client.js +++ b/tools/shell-client.js @@ -181,7 +181,7 @@ Cp.setUpSocket = function setUpSocket(sock, key) { sock.pipe(process.stdout); - require("./utils/eachline.js").eachline(sock, function (line) { + require("./utils/eachline").eachline(sock, function (line) { self.exitOnClose = line.indexOf(EXITING_MESSAGE) >= 0; }); diff --git a/tools/utils/eachline.js b/tools/utils/eachline.ts similarity index 50% rename from tools/utils/eachline.js rename to tools/utils/eachline.ts index dff1cd36a8..c0c1fdfb15 100644 --- a/tools/utils/eachline.js +++ b/tools/utils/eachline.ts @@ -1,19 +1,22 @@ -import split from "split2"; -import pipe from "multipipe"; -import { Transform } from "stream"; +const split = require("split2"); +const pipe = require("multipipe"); -export function eachline(stream, callback) { +import { Transform, Stream } from "stream"; + +type LineTransformer = (line: string) => string | Promise + +export function eachline(stream: Stream, callback: LineTransformer) { stream.pipe(transform(callback)); } -export function transform(callback) { +export function transform(callback: LineTransformer) { const splitStream = split(/\r?\n/, null, { trailing: false }); const transform = new Transform(); - transform._transform = async function (chunk, encoding, done) { + transform._transform = async function (chunk, _encoding, done) { let line = chunk.toString("utf8"); try { line = await callback(line); diff --git a/tools/utils/utils.js b/tools/utils/utils.js index c5c936421f..41c97dad72 100644 --- a/tools/utils/utils.js +++ b/tools/utils/utils.js @@ -532,7 +532,7 @@ exports.isValidVersion = function (version, {forCordova}) { exports.execFileSync = function (file, args, opts) { var child_process = require('child_process'); - var { eachline } = require('./eachline.js'); + var { eachline } = require('./eachline'); opts = opts || {}; if (! _.has(opts, 'maxBuffer')) { @@ -573,7 +573,7 @@ exports.execFileSync = function (file, args, opts) { exports.execFileAsync = function (file, args, opts) { opts = opts || {}; var child_process = require('child_process'); - var { eachline } = require('./eachline.js'); + var { eachline } = require('./eachline'); var p = child_process.spawn(file, args, opts); var mapper = opts.lineMapper || _.identity; From 122f7e4d2d8571f1e3fbe9df5323e289a0100dc1 Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Mon, 15 Jul 2019 11:35:11 -0400 Subject: [PATCH 177/327] Update underscore to v1.9.1 and install @types/underscore. --- History.md | 5 +++++ scripts/dev-bundle-server-package.js | 6 ++---- scripts/dev-bundle-tool-package.js | 6 ++---- tools/isobuild/resolver.ts | 4 ++-- 4 files changed, 11 insertions(+), 10 deletions(-) diff --git a/History.md b/History.md index 7078535aed..57e2914105 100644 --- a/History.md +++ b/History.md @@ -62,6 +62,11 @@ N/A * The `pathwatcher` npm package has been updated to version 8.1.0. +* The `underscore` npm package installed in the Meteor dev bundle (for use + by the `meteor/tools` codebase) has been updated from version 1.5.2 to + version 1.9.1, and `@types/underscore` has been installed for better + TypeScript support. + * In addition to the `.js` and `.jsx` file extensions, the `ecmascript` compiler plugin now automatically handles JavaScript modules with the `.mjs` file extension. diff --git a/scripts/dev-bundle-server-package.js b/scripts/dev-bundle-server-package.js index 41a15d86db..d6a51220c0 100644 --- a/scripts/dev-bundle-server-package.js +++ b/scripts/dev-bundle-server-package.js @@ -15,10 +15,8 @@ var packageJson = { promise: "8.0.2", reify: "0.20.12", "@babel/parser": "7.5.0", - // Not yet upgrading Underscore from 1.5.2 to 1.7.0 (which should be done - // in the package too) because we should consider using lodash instead - // (and there are backwards-incompatible changes either way). - underscore: "1.5.2", + "@types/underscore": "1.9.2", + underscore: "1.9.1", "source-map-support": "https://github.com/meteor/node-source-map-support/tarball/1912478769d76e5df4c365e147f25896aee6375e", semver: "5.4.1" }, diff --git a/scripts/dev-bundle-tool-package.js b/scripts/dev-bundle-tool-package.js index 0d1bc87bf8..4cbef5feca 100644 --- a/scripts/dev-bundle-tool-package.js +++ b/scripts/dev-bundle-tool-package.js @@ -25,10 +25,8 @@ var packageJson = { // For backwards compatibility with isopackets that still depend on // babel-runtime rather than @babel/runtime. "babel-runtime": "7.0.0-beta.3", - // Not yet upgrading Underscore from 1.5.2 to 1.7.0 (which should be done - // in the package too) because we should consider using lodash instead - // (and there are backwards-incompatible changes either way). - underscore: "1.5.2", + "@types/underscore": "1.9.2", + underscore: "1.9.1", "source-map-support": "https://github.com/meteor/node-source-map-support/tarball/1912478769d76e5df4c365e147f25896aee6375e", semver: "5.4.1", request: "2.88.0", diff --git a/tools/isobuild/resolver.ts b/tools/isobuild/resolver.ts index cd7c809d7f..ddc212b9b7 100644 --- a/tools/isobuild/resolver.ts +++ b/tools/isobuild/resolver.ts @@ -1,8 +1,8 @@ -const { +import { isString, isObject, has, -} = require("underscore"); +} from "underscore"; import { matches as archMatches } from "../utils/archinfo.js"; import { From 4457cd3cd19a39dcba02c760071ef16a07599960 Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Mon, 15 Jul 2019 11:43:02 -0400 Subject: [PATCH 178/327] Explicitly install version 3.5.3 of typescript in dev bundle. The typescript package was previously installed as a dependency of meteor-babel, but it clearly deserves to be a direct dependency. --- History.md | 4 +++- scripts/dev-bundle-tool-package.js | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/History.md b/History.md index 57e2914105..754101ea37 100644 --- a/History.md +++ b/History.md @@ -47,7 +47,9 @@ N/A * The `mongodb` npm package used by the `npm-mongo` Meteor package has been updated to version 3.2.7. -* The `meteor-babel` npm package has been updated to version 7.5.5. +* The `meteor-babel` npm package has been updated to version 7.5.5, + enabling compilation of the `meteor/tools` codebase with TypeScript + (specifically, version 3.5.3 of the `typescript` npm package). * The `reify` npm package has been updated to version 0.20.12. diff --git a/scripts/dev-bundle-tool-package.js b/scripts/dev-bundle-tool-package.js index 4cbef5feca..74829763f0 100644 --- a/scripts/dev-bundle-tool-package.js +++ b/scripts/dev-bundle-tool-package.js @@ -14,6 +14,7 @@ var packageJson = { pacote: "https://github.com/meteor/pacote/tarball/74fafef8d16c3c5bdf4d3aca5123d49db63680e9", "node-gyp": "5.0.1", "node-pre-gyp": "0.13.0", + typescript: "3.5.3", "meteor-babel": "7.5.5", // Keep the versions of these packages consistent with the versions // found in dev-bundle-server-package.js. From d350e25c015a72007f1bbb974de94ff30101e4a9 Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Mon, 15 Jul 2019 11:44:35 -0400 Subject: [PATCH 179/327] Bump $BUNDLE_VERSION to 8.16.0.22 before rebuilding dev bundle. --- meteor | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meteor b/meteor index bd531a9d41..dfe0396fbd 100755 --- a/meteor +++ b/meteor @@ -1,6 +1,6 @@ #!/usr/bin/env bash -BUNDLE_VERSION=8.16.0.21 +BUNDLE_VERSION=8.16.0.22 # OS Check. Put here because here is where we download the precompiled # bundles that are arch specific. From e299c86ecff80b9870ff6a654831872049ef3da2 Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Mon, 15 Jul 2019 12:32:42 -0400 Subject: [PATCH 180/327] Assume npx (as in `meteor npx ...`) is a valid command. Sometimes, before dev_bundle/bin/.meteor-commands.json has been written, a command like `./meteor npx tsc` can fail because `npx` is not blessed in the same way `node` and `npm` are. Since `npx` is a core tool that we want folks to be able to use without confusion, I think it makes sense to include it in the list of known subcommands. --- tools/cli/dev-bundle-bin-helpers.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/cli/dev-bundle-bin-helpers.js b/tools/cli/dev-bundle-bin-helpers.js index 2d8b7b62c5..1854cb3e04 100644 --- a/tools/cli/dev-bundle-bin-helpers.js +++ b/tools/cli/dev-bundle-bin-helpers.js @@ -38,7 +38,8 @@ exports.getCommand = function (name, devBundleDir) { function isValidCommand(name, devBundleDir) { if (name === "node" || - name === "npm") { + name === "npm" || + name === "npx") { return true; } From 480c5d5a56f820af616df535817f679dbf7e19a2 Mon Sep 17 00:00:00 2001 From: James Burgess Date: Tue, 16 Jul 2019 00:38:10 +0800 Subject: [PATCH 181/327] Avoid use of forEach in Base64 encode method (#10629) For strings we convert to Uint8Array, which does not support forEach on any version of IE, and is not polyfilled by default. --- packages/base64/base64.js | 22 +++++++++++----------- packages/base64/package.js | 2 +- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/packages/base64/base64.js b/packages/base64/base64.js index 2e938371d8..de33c8566a 100644 --- a/packages/base64/base64.js +++ b/packages/base64/base64.js @@ -32,19 +32,19 @@ const encode = array => { let c = null; let d = null; - array.forEach((elm, i) => { + for (let i = 0; i < array.length; i++) { switch (i % 3) { case 0: - a = (elm >> 2) & 0x3F; - b = (elm & 0x03) << 4; + a = (array[i] >> 2) & 0x3F; + b = (array[i] & 0x03) << 4; break; case 1: - b = b | (elm >> 4) & 0xF; - c = (elm & 0xF) << 2; + b = b | (array[i] >> 4) & 0xF; + c = (array[i] & 0xF) << 2; break; case 2: - c = c | (elm >> 6) & 0x03; - d = elm & 0x3F; + c = c | (array[i] >> 6) & 0x03; + d = array[i] & 0x3F; answer.push(getChar(a)); answer.push(getChar(b)); answer.push(getChar(c)); @@ -55,7 +55,7 @@ const encode = array => { d = null; break; } - }); + } if (a != null) { answer.push(getChar(a)); @@ -65,7 +65,7 @@ const encode = array => { } else { answer.push(getChar(c)); } - + if (d == null) { answer.push('='); } @@ -102,7 +102,7 @@ const decode = str => { len--; } } - + const arr = newBinary(len); let one = null; @@ -147,7 +147,7 @@ const decode = str => { break; } } - + return arr; }; diff --git a/packages/base64/package.js b/packages/base64/package.js index 710e5f873e..547992b2a4 100644 --- a/packages/base64/package.js +++ b/packages/base64/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Base64 encoding and decoding", - version: '1.0.11', + version: '1.0.12', }); Package.onUse(api => { From 5c32331591f268f2acdac5a1a7481eb9e65dc3d4 Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Mon, 15 Jul 2019 12:41:18 -0400 Subject: [PATCH 182/327] Temporarily disable SIGKILL self-test on devel branch. --- tools/tests/run.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/tests/run.js b/tools/tests/run.js index e5e9270a12..2cfd8f2263 100644 --- a/tools/tests/run.js +++ b/tools/tests/run.js @@ -361,7 +361,7 @@ selftest.define("run with mongo crash", ["checkout"], function () { // Test that when the parent runner process is SIGKILLed, the child // process exits also. -selftest.define("run and SIGKILL parent process", ["yet-unsolved-windows-failure"], function () { +selftest.skip.define("run and SIGKILL parent process", ["yet-unsolved-windows-failure"], function () { var s = new Sandbox(); var run; From 23b67d9a476cab54254cf63827a1e674abb737ec Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Mon, 15 Jul 2019 12:41:55 -0400 Subject: [PATCH 183/327] Revert "Temporarily disable SIGKILL self-test on devel branch." This reverts commit 5c32331591f268f2acdac5a1a7481eb9e65dc3d4. This test is passing reliably on the release-1.8.2 branch, so we should keep running it there. --- tools/tests/run.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/tests/run.js b/tools/tests/run.js index 7f1a1804ae..f6e7537eb2 100644 --- a/tools/tests/run.js +++ b/tools/tests/run.js @@ -362,7 +362,7 @@ selftest.define("run with mongo crash", ["checkout"], function () { // Test that when the parent runner process is SIGKILLed, the child // process exits also. -selftest.skip.define("run and SIGKILL parent process", ["yet-unsolved-windows-failure"], function () { +selftest.define("run and SIGKILL parent process", ["yet-unsolved-windows-failure"], function () { var s = new Sandbox(); var run; From a3b13705c57342a1eab39b5f421ea6c5b2abd1e5 Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Mon, 15 Jul 2019 12:52:52 -0400 Subject: [PATCH 184/327] Bump package versions for 1.8.2-beta.16 release. --- packages/babel-compiler/package.js | 2 +- packages/babel-runtime/package.js | 2 +- packages/context/package.js | 2 +- packages/ecmascript-runtime-client/package.js | 2 +- packages/ecmascript-runtime-server/package.js | 2 +- packages/ecmascript/package.js | 2 +- packages/meteor-tool/package.js | 2 +- packages/modules-runtime/package.js | 2 +- packages/modules/package.js | 2 +- packages/mongo/package.js | 2 +- packages/npm-mongo/package.js | 2 +- packages/typescript/package.js | 2 +- scripts/admin/meteor-release-experimental.json | 2 +- 13 files changed, 13 insertions(+), 13 deletions(-) diff --git a/packages/babel-compiler/package.js b/packages/babel-compiler/package.js index 1e8e62ad2c..0fbfa4669e 100644 --- a/packages/babel-compiler/package.js +++ b/packages/babel-compiler/package.js @@ -6,7 +6,7 @@ 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.4.0-beta182.15' + version: '7.4.0-beta182.16' }); Npm.depends({ diff --git a/packages/babel-runtime/package.js b/packages/babel-runtime/package.js index c75dbf868f..f851acd3b5 100644 --- a/packages/babel-runtime/package.js +++ b/packages/babel-runtime/package.js @@ -1,7 +1,7 @@ Package.describe({ name: "babel-runtime", summary: "Runtime support for output of Babel transpiler", - version: '1.4.0-beta182.15', + version: '1.4.0-beta182.16', documentation: 'README.md' }); diff --git a/packages/context/package.js b/packages/context/package.js index 6ecfa3a20e..ae7b5d472b 100644 --- a/packages/context/package.js +++ b/packages/context/package.js @@ -1,6 +1,6 @@ Package.describe({ name: "context", - version: "0.4.0-beta182.15", + version: "0.4.0-beta182.16", summary: "Manage contextual information without passing objects around", documentation: "README.md" }); diff --git a/packages/ecmascript-runtime-client/package.js b/packages/ecmascript-runtime-client/package.js index cce8d5038f..f6cee1be83 100644 --- a/packages/ecmascript-runtime-client/package.js +++ b/packages/ecmascript-runtime-client/package.js @@ -1,6 +1,6 @@ Package.describe({ name: "ecmascript-runtime-client", - version: "0.9.0-beta182.15", + version: "0.9.0-beta182.16", summary: "Polyfills for new ECMAScript 2015 APIs like Map and Set", git: "https://github.com/meteor/meteor/tree/devel/packages/ecmascript-runtime-client", documentation: "README.md" diff --git a/packages/ecmascript-runtime-server/package.js b/packages/ecmascript-runtime-server/package.js index 949ee9d020..1488309542 100644 --- a/packages/ecmascript-runtime-server/package.js +++ b/packages/ecmascript-runtime-server/package.js @@ -1,6 +1,6 @@ Package.describe({ name: "ecmascript-runtime-server", - version: "0.8.0-beta182.15", + version: "0.8.0-beta182.16", summary: "Polyfills for new ECMAScript 2015 APIs like Map and Set", git: "https://github.com/meteor/meteor/tree/devel/packages/ecmascript-runtime-client", documentation: "README.md" diff --git a/packages/ecmascript/package.js b/packages/ecmascript/package.js index fe8cd9920e..724d984c0a 100644 --- a/packages/ecmascript/package.js +++ b/packages/ecmascript/package.js @@ -1,6 +1,6 @@ Package.describe({ name: 'ecmascript', - version: '0.13.0-beta182.15', + version: '0.13.0-beta182.16', summary: 'Compiler plugin that supports ES2015+ in all .js files', documentation: 'README.md' }); diff --git a/packages/meteor-tool/package.js b/packages/meteor-tool/package.js index 473f157c7f..cda8e0a4c1 100644 --- a/packages/meteor-tool/package.js +++ b/packages/meteor-tool/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "The Meteor command-line tool", - version: '1.8.2-beta.15' + version: '1.8.2-beta.16' }); Package.includeTool(); diff --git a/packages/modules-runtime/package.js b/packages/modules-runtime/package.js index 6e210c8b5e..0968f33741 100644 --- a/packages/modules-runtime/package.js +++ b/packages/modules-runtime/package.js @@ -1,6 +1,6 @@ Package.describe({ name: "modules-runtime", - version: "0.11.0-beta182.15", + version: "0.11.0-beta182.16", summary: "CommonJS module system", git: "https://github.com/benjamn/install", documentation: "README.md" diff --git a/packages/modules/package.js b/packages/modules/package.js index 1bcf226deb..f21dd85a2d 100644 --- a/packages/modules/package.js +++ b/packages/modules/package.js @@ -1,6 +1,6 @@ Package.describe({ name: "modules", - version: "0.14.0-beta182.15", + version: "0.14.0-beta182.16", summary: "CommonJS module system", documentation: "README.md" }); diff --git a/packages/mongo/package.js b/packages/mongo/package.js index 990ef4d4ec..76e4cb51da 100644 --- a/packages/mongo/package.js +++ b/packages/mongo/package.js @@ -9,7 +9,7 @@ Package.describe({ summary: "Adaptor for using MongoDB and Minimongo over DDP", - version: '1.7.0-beta182.15' + version: '1.7.0-beta182.16' }); Npm.depends({ diff --git a/packages/npm-mongo/package.js b/packages/npm-mongo/package.js index 8983d9e98c..d94297f6c5 100644 --- a/packages/npm-mongo/package.js +++ b/packages/npm-mongo/package.js @@ -3,7 +3,7 @@ Package.describe({ summary: "Wrapper around the mongo npm package", - version: "3.2.0-beta182.15", + version: "3.2.0-beta182.16", documentation: null }); diff --git a/packages/typescript/package.js b/packages/typescript/package.js index ddec9d5b72..264726fbcc 100644 --- a/packages/typescript/package.js +++ b/packages/typescript/package.js @@ -1,6 +1,6 @@ Package.describe({ name: "typescript", - version: "3.5.2", + version: "3.5.2-beta182.16", summary: "Compiler plugin that compiles TypeScript and ECMAScript in .ts and .tsx files", documentation: "README.md" }); diff --git a/scripts/admin/meteor-release-experimental.json b/scripts/admin/meteor-release-experimental.json index ad1c2603b4..d7af115612 100644 --- a/scripts/admin/meteor-release-experimental.json +++ b/scripts/admin/meteor-release-experimental.json @@ -1,6 +1,6 @@ { "track": "METEOR", - "version": "1.8.2-beta.15", + "version": "1.8.2-beta.16", "recommended": false, "official": false, "description": "Meteor" From a1184bdea388e2d93f2812b1e1a26238e4e922c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Chiciuc=20Nicu=C8=99or?= Date: Tue, 16 Jul 2019 18:07:40 +0300 Subject: [PATCH 185/327] Add @types/semver@5.4.0 to dev-bundle. (#10633) --- scripts/dev-bundle-server-package.js | 1 + scripts/dev-bundle-tool-package.js | 1 + tools/isobuild/meteor-npm.js | 3 +-- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/dev-bundle-server-package.js b/scripts/dev-bundle-server-package.js index d6a51220c0..394a87d5b9 100644 --- a/scripts/dev-bundle-server-package.js +++ b/scripts/dev-bundle-server-package.js @@ -18,6 +18,7 @@ var packageJson = { "@types/underscore": "1.9.2", underscore: "1.9.1", "source-map-support": "https://github.com/meteor/node-source-map-support/tarball/1912478769d76e5df4c365e147f25896aee6375e", + "@types/semver": "5.4.0", semver: "5.4.1" }, // These are only used in dev mode (by shell.js) so end-users can avoid diff --git a/scripts/dev-bundle-tool-package.js b/scripts/dev-bundle-tool-package.js index 74829763f0..10bf19ed68 100644 --- a/scripts/dev-bundle-tool-package.js +++ b/scripts/dev-bundle-tool-package.js @@ -29,6 +29,7 @@ var packageJson = { "@types/underscore": "1.9.2", underscore: "1.9.1", "source-map-support": "https://github.com/meteor/node-source-map-support/tarball/1912478769d76e5df4c365e147f25896aee6375e", + "@types/semver": "5.4.0", semver: "5.4.1", request: "2.88.0", uuid: "3.3.2", diff --git a/tools/isobuild/meteor-npm.js b/tools/isobuild/meteor-npm.js index b2f6809276..4736bb73a4 100644 --- a/tools/isobuild/meteor-npm.js +++ b/tools/isobuild/meteor-npm.js @@ -14,6 +14,7 @@ var buildmessage = require('../utils/buildmessage.js'); var utils = require('../utils/utils.js'); var runLog = require('../runners/run-log.js'); var Profile = require('../tool-env/profile').Profile; +import { parse } from "semver"; import { version as npmVersion } from 'npm'; import { execFileAsync } from "../utils/processes.js"; import { @@ -239,8 +240,6 @@ function recordLastRebuildVersions(pkgDir) { // Returns true iff isSubtreeOf(currentVersions, versions), allowing // valid semantic versions to differ in their patch versions. function versionsAreCompatible(versions) { - import { parse } from "semver"; - return isSubtreeOf(currentVersions, versions, (a, b) => { // Technically already handled by isSubtreeOf, but doesn't hurt. if (a === b) { From 2db8d07791e4d618a6edc8fc3d0d1774dbcab73f Mon Sep 17 00:00:00 2001 From: afrokick Date: Tue, 16 Jul 2019 18:10:17 +0300 Subject: [PATCH 186/327] Convert tools/shell-client.js to TypeScript (#10619) --- .eslintignore | 2 +- tools/cli/commands.js | 2 +- tools/shell-client.js | 216 ----------------------------------------- tools/shell-client.ts | 217 ++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 219 insertions(+), 218 deletions(-) delete mode 100644 tools/shell-client.js create mode 100644 tools/shell-client.ts diff --git a/.eslintignore b/.eslintignore index 42f463beff..c4d6cb792b 100644 --- a/.eslintignore +++ b/.eslintignore @@ -39,7 +39,7 @@ tools/runners/run-log.js tools/fs/safe-pathwatcher.js tools/selftest.js tools/service-connection.js -tools/shell-client.js +tools/shell-client.ts tools/stats.js tools/test-utils.js tools/upgraders.js diff --git a/tools/cli/commands.js b/tools/cli/commands.js index a312133a93..7e4f0e7fe6 100644 --- a/tools/cli/commands.js +++ b/tools/cli/commands.js @@ -482,7 +482,7 @@ main.registerCommand({ // Convert to OS path here because shell/server.js doesn't know how to // convert paths, since it exists in the app and in the tool. - require('../shell-client.js').connect( + require('../shell-client').connect( files.convertToOSPath(projectContext.getMeteorShellDirectory()) ); diff --git a/tools/shell-client.js b/tools/shell-client.js deleted file mode 100644 index 1caec8d097..0000000000 --- a/tools/shell-client.js +++ /dev/null @@ -1,216 +0,0 @@ -var assert = require("assert"); -var fs = require("fs"); -var path = require("path"); -var net = require("net"); -var chalk = require("chalk"); -var EOL = require("os").EOL; -import { isEmacs } from "./utils/utils.js"; - -// These two values (EXITING_MESSAGE and getInfoFile) must match the -// values used by the shell-server package. -var EXITING_MESSAGE = "Shell exiting..."; -function getInfoFile(shellDir) { - return path.join(shellDir, "info.json"); -} - -// Invoked by the process running `meteor shell` to attempt to connect to -// the server via the socket file. -exports.connect = function connect(shellDir) { - new Client(shellDir).connect(); -}; - -function Client(shellDir) { - var self = this; - assert.ok(self instanceof Client); - - self.shellDir = shellDir; - self.exitOnClose = false; - self.firstTimeConnecting = true; - self.connected = false; - self.reconnectCount = 0; -} - -var Cp = Client.prototype; - -Cp.reconnect = function reconnect(delay) { - var self = this; - - // Display the "Server unavailable" warning only on the third attempt - // to reconnect, so it doesn't get shown for successful reconnects. - if (++self.reconnectCount === 3) { - console.error(chalk.yellow( - "Server unavailable (waiting to reconnect)" - )); - } - - if (!self.reconnectTimer) { - self.reconnectTimer = setTimeout(function() { - delete self.reconnectTimer; - self.connect(); - }, delay || 100); - } -}; - -Cp.connect = function connect() { - var self = this; - var infoFile = getInfoFile(self.shellDir); - - fs.readFile(infoFile, "utf8", function(err, json) { - if (err) { - return self.reconnect(); - } - - try { - var info = JSON.parse(json); - } catch (err) { - return self.reconnect(); - } - - if (info.status !== "enabled") { - if (self.firstTimeConnecting) { - return self.reconnect(); - } - - if (info.reason) { - console.error(info.reason); - } - - console.error(EXITING_MESSAGE); - process.exit(0); - } - - self.setUpSocket( - net.connect(info.port, "127.0.0.1"), - info.key - ); - }); -}; - -Cp.setUpSocketForSingleUse = function (sock, key) { - sock.on("connect", function () { - const inputBuffers = []; - process.stdin.on("data", buffer => inputBuffers.push(buffer)); - process.stdin.on("end", () => { - sock.write(JSON.stringify({ - evaluateAndExit: { - // Make sure the entire command is written as a string within a - // JSON object, so that the server can easily tell when it has - // received the whole command. - command: Buffer.concat(inputBuffers).toString("utf8") - }, - terminal: false, - key: key - }) + "\n"); - }); - }); - - const outputBuffers = []; - sock.on("data", buffer => outputBuffers.push(buffer)); - sock.on("close", function () { - var output = JSON.parse(Buffer.concat(outputBuffers)); - if (output.error) { - console.error(output.error); - process.exit(output.code); - } else { - process.stdout.write(JSON.stringify(output.result) + "\n"); - process.exit(0); - } - }); -}; - -Cp.setUpSocket = function setUpSocket(sock, key) { - const self = this; - - if (! process.stdin.isTTY) { - return self.setUpSocketForSingleUse(sock, key); - } - - // Put STDIN into "flowing mode": - // http://nodejs.org/api/stream.html#stream_compatibility_with_older_node_versions - process.stdin.resume(); - - function onConnect() { - self.firstTimeConnecting = false; - self.reconnectCount = 0; - self.connected = true; - - // Sending a JSON-stringified options object (even just an empty - // object) over the socket is required to start the REPL session. - sock.write(JSON.stringify({ - columns: process.stdout.columns, - terminal: ! isEmacs(), - key: key - }) + "\n"); - - process.stderr.write(shellBanner()); - process.stdin.pipe(sock); - if (process.stdin.setRawMode) { // https://github.com/joyent/node/issues/8204 - process.stdin.setRawMode(true); - } - } - - function onClose() { - tearDown(); - - // If we received the special EXITING_MESSAGE just before the socket - // closed, then exit the shell instead of reconnecting. - if (self.exitOnClose) { - process.exit(0); - } else { - self.reconnect(); - } - } - - function onError(err) { - tearDown(); - self.reconnect(); - } - - function tearDown() { - self.connected = false; - if (process.stdin.setRawMode) { // https://github.com/joyent/node/issues/8204 - process.stdin.setRawMode(false); - } - process.stdin.unpipe(sock); - sock.unpipe(process.stdout); - sock.removeListener("connect", onConnect); - sock.removeListener("close", onClose); - sock.removeListener("error", onError); - sock.end(); - } - - sock.pipe(process.stdout); - - require("./utils/eachline").eachline(sock, function (line) { - self.exitOnClose = line.indexOf(EXITING_MESSAGE) >= 0; - }); - - sock.on("connect", onConnect); - sock.on("close", onClose); - sock.on("error", onError); -}; - -function shellBanner() { - var bannerLines = [ - "", - "Welcome to the server-side interactive shell!" - ]; - - if (! isEmacs()) { - // Tab completion sadly does not work in Emacs. - bannerLines.push( - "", - "Tab completion is enabled for global variables." - ); - } - - bannerLines.push( - "", - "Type .reload to restart the server and the shell.", - "Type .exit to disconnect from the server and leave the shell.", - "Type .help for additional help.", - EOL - ); - - return chalk.green(bannerLines.join(EOL)); -} diff --git a/tools/shell-client.ts b/tools/shell-client.ts new file mode 100644 index 0000000000..7e46812bb8 --- /dev/null +++ b/tools/shell-client.ts @@ -0,0 +1,217 @@ +import * as fs from "fs"; +import * as path from "path"; +import * as net from "net"; +import { isEmacs } from "./utils/utils"; +import { eachline } from "./utils/eachline"; + +const chalk = require("chalk"); +const EOL = require("os").EOL; + +// These two values (EXITING_MESSAGE and getInfoFile) must match the +// values used by the shell-server package. +const EXITING_MESSAGE = "Shell exiting..."; + +function getInfoFile(shellDir: string): string { + return path.join(shellDir, "info.json"); +} + +// Invoked by the process running `meteor shell` to attempt to connect to +// the server via the socket file. +export function connect(shellDir: string) { + new Client(shellDir).connect(); +} + +class Client { + public connected = false; + + private exitOnClose = false; + private firstTimeConnecting = true; + private reconnectCount = 0; + private reconnectTimer?: NodeJS.Timeout; + + constructor(public shellDir: string) {} + + reconnect(delay: number = 100) { + // Display the "Server unavailable" warning only on the third attempt + // to reconnect, so it doesn't get shown for successful reconnects. + if (++this.reconnectCount === 3) { + console.error(chalk.yellow( + "Server unavailable (waiting to reconnect)" + )); + } + + if (!this.reconnectTimer) { + this.reconnectTimer = setTimeout(() => { + delete this.reconnectTimer; + this.connect(); + }, delay); + } + }; + + connect() { + const infoFile = getInfoFile(this.shellDir); + + fs.readFile(infoFile, "utf8", (err, json) => { + if (err) { + return this.reconnect(); + } + + let info; + try { + info = JSON.parse(json); + } catch (err) { + return this.reconnect(); + } + + if (info.status !== "enabled") { + if (this.firstTimeConnecting) { + return this.reconnect(); + } + + if (info.reason) { + console.error(info.reason); + } + + console.error(EXITING_MESSAGE); + process.exit(0); + } + + this.setUpSocket( + net.connect(info.port, "127.0.0.1"), + info.key + ); + }); + }; + + setUpSocketForSingleUse(sock: net.Socket, key: string) { + sock.on("connect", function () { + const inputBuffers: Buffer[] = []; + process.stdin.on("data", buffer => inputBuffers.push(buffer)); + process.stdin.on("end", () => { + sock.write(JSON.stringify({ + evaluateAndExit: { + // Make sure the entire command is written as a string within a + // JSON object, so that the server can easily tell when it has + // received the whole command. + command: Buffer.concat(inputBuffers).toString("utf8") + }, + terminal: false, + key: key + }) + "\n"); + }); + }); + + const outputBuffers: Buffer[] = []; + sock.on("data", buffer => outputBuffers.push(buffer)); + sock.on("close", function () { + const output = JSON.parse(Buffer.concat(outputBuffers)); + if (output.error) { + console.error(output.error); + process.exit(output.code); + } else { + process.stdout.write(JSON.stringify(output.result) + "\n"); + process.exit(0); + } + }); + }; + + setUpSocket(sock: net.Socket, key: string) { + if (!process.stdin.isTTY) { + return this.setUpSocketForSingleUse(sock, key); + } + + // Put STDIN into "flowing mode": + // http://nodejs.org/api/stream.html#stream_compatibility_with_older_node_versions + process.stdin.resume(); + + const onConnect = () => { + this.firstTimeConnecting = false; + this.reconnectCount = 0; + this.connected = true; + + // Sending a JSON-stringified options object (even just an empty + // object) over the socket is required to start the REPL session. + sock.write(JSON.stringify({ + columns: process.stdout.columns, + terminal: !isEmacs(), + key: key + }) + "\n"); + + process.stderr.write(shellBanner()); + process.stdin.pipe(sock); + if (process.stdin.setRawMode) { // https://github.com/joyent/node/issues/8204 + process.stdin.setRawMode(true); + } + } + + const onClose = () => { + tearDown(); + + // If we received the special EXITING_MESSAGE just before the socket + // closed, then exit the shell instead of reconnecting. + if (this.exitOnClose) { + process.exit(0); + } else { + this.reconnect(); + } + } + + const onError = () => { + tearDown(); + this.reconnect(); + } + + const tearDown = () => { + this.connected = false; + + if (process.stdin.setRawMode) { // https://github.com/joyent/node/issues/8204 + process.stdin.setRawMode(false); + } + + process.stdin.unpipe(sock); + sock.unpipe(process.stdout); + sock.removeListener("connect", onConnect); + sock.removeListener("close", onClose); + sock.removeListener("error", onError); + sock.end(); + } + + sock.pipe(process.stdout); + + eachline(sock, (line: string) => { + this.exitOnClose = line.indexOf(EXITING_MESSAGE) >= 0; + return line; + }); + + sock.on("connect", onConnect); + sock.on("close", onClose); + sock.on("error", onError); + }; +} + + + +function shellBanner(): string { + const bannerLines = [ + "", + "Welcome to the server-side interactive shell!" + ]; + + if (!isEmacs()) { + // Tab completion sadly does not work in Emacs. + bannerLines.push( + "", + "Tab completion is enabled for global variables." + ); + } + + bannerLines.push( + "", + "Type .reload to restart the server and the shell.", + "Type .exit to disconnect from the server and leave the shell.", + "Type .help for additional help.", + EOL + ); + + return chalk.green(bannerLines.join(EOL)); +} From a811d1255bae0e2c6a2f7c2e131c19789b5ac0b5 Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Fri, 19 Jul 2019 18:34:03 -0400 Subject: [PATCH 187/327] Convert tools/isobuild/import-scanner.js to TypeScript. (#10635) --- tools/isobuild/compiler-plugin.js | 2 +- tools/isobuild/css-modules.ts | 2 +- .../{import-scanner.js => import-scanner.ts} | 611 ++++++++++-------- tools/isobuild/js-analyze.js | 2 +- tools/isobuild/resolver.ts | 40 +- 5 files changed, 386 insertions(+), 271 deletions(-) rename tools/isobuild/{import-scanner.js => import-scanner.ts} (76%) diff --git a/tools/isobuild/compiler-plugin.js b/tools/isobuild/compiler-plugin.js index f78acaf517..28e42cd6ad 100644 --- a/tools/isobuild/compiler-plugin.js +++ b/tools/isobuild/compiler-plugin.js @@ -13,7 +13,7 @@ import {sha1, readAndWatchFileWithHash} from '../fs/watch'; import LRU from 'lru-cache'; import {sourceMapLength} from '../utils/utils.js'; import {Console} from '../console/console.js'; -import ImportScanner from './import-scanner.js'; +import ImportScanner from './import-scanner'; import {cssToCommonJS} from "./css-modules"; import Resolver from "./resolver"; import { diff --git a/tools/isobuild/css-modules.ts b/tools/isobuild/css-modules.ts index 5a7c589b0d..d9141b4ec6 100644 --- a/tools/isobuild/css-modules.ts +++ b/tools/isobuild/css-modules.ts @@ -1,4 +1,4 @@ -export function cssToCommonJS(css: string) { +export function cssToCommonJS(css: string, _hash: string) { return [ 'module.exports = require("meteor/modules").addStyles(', " " + JSON.stringify(css), diff --git a/tools/isobuild/import-scanner.js b/tools/isobuild/import-scanner.ts similarity index 76% rename from tools/isobuild/import-scanner.js rename to tools/isobuild/import-scanner.ts index 7b786c7c9a..93e27dacc3 100644 --- a/tools/isobuild/import-scanner.js +++ b/tools/isobuild/import-scanner.ts @@ -2,22 +2,19 @@ import assert from "assert"; import {inspect} from "util"; import {Script} from "vm"; import { - isString, isObject, isEmpty, has, keys, each, map, omit, + isString, isObject, isEmpty, has, keys, each, omit, } from "underscore"; -import {sha1} from "../fs/watch"; +import {sha1, WatchSet} from "../fs/watch"; import {matches as archMatches} from "../utils/archinfo.js"; import {findImportedModuleIdentifiers} from "./js-analyze.js"; import {cssToCommonJS} from "./css-modules"; import buildmessage from "../utils/buildmessage.js"; -import LRU from "lru-cache"; import {Profile} from "../tool-env/profile"; -import {SourceNode, SourceMapConsumer} from "source-map"; import { mkdir_p, pathJoin, pathRelative, pathNormalize, - pathBasename, pathExtname, pathDirname, pathIsAbsolute, @@ -27,10 +24,11 @@ import { writeFileAtomically, } from "../fs/files"; +const { SourceNode, SourceMapConsumer } = require("source-map"); + const { relative: posixRelative, dirname: posixDirname, - sep: posixSep, } = require("path").posix; import { @@ -42,10 +40,10 @@ import { } from "../fs/optimistic"; import { wrap } from "optimism"; -import { compile as reifyCompile } from "reify/lib/compiler"; -import { parse as reifyBabelParse } from "reify/lib/parsers/babel"; +const { compile: reifyCompile } = require("reify/lib/compiler"); +const { parse: reifyBabelParse } = require("reify/lib/parsers/babel"); -import Resolver from "./resolver"; +import Resolver, { Resolution } from "./resolver"; const fakeFileStat = { isFile() { @@ -55,19 +53,23 @@ const fakeFileStat = { isDirectory() { return false; } -}; +} as import("fs").Stats; // Symbol used by scanMissingModules to mark certain files as temporary, // to prevent them from being added to scanner.outputFiles. const fakeSymbol = Symbol("fake"); -function stripHashBang(dataString) { +const emptyDataString = ""; +const emptyData = Buffer.from(emptyDataString, "utf8"); +const emptyHash = sha1(emptyDataString); + +function stripHashBang(dataString: string) { return dataString.replace(/^#![^\n]*/, ""); } const reifyCompileWithCache = Profile("reifyCompileWithCache", wrap(function ( source, - hash, + _hash, bundleArch, ) { const isLegacy = @@ -83,21 +85,20 @@ const reifyCompileWithCache = Profile("reifyCompileWithCache", wrap(function ( ast: false, }).code; }, { - makeCacheKey(source, hash, bundleArch) { + makeCacheKey(_source, hash, bundleArch) { return JSON.stringify([hash, bundleArch]); } })); class DefaultHandlers { + private cacheDir?: string; + private bundleArch: string; + constructor({ - sourceRoot, cacheDir, bundleArch, - }) { - Object.assign(this, { - sourceRoot, - }); - + }: Record) { + this.bundleArch = bundleArch; if (cacheDir) { mkdir_p(this.cacheDir = pathJoin( cacheDir, @@ -106,11 +107,18 @@ class DefaultHandlers { } } - getCacheFileName(file) { - return pathJoin(this.cacheDir, "reify-" + file.hash + ".js"); + getCacheFileName(file: RawFile) { + return this.cacheDir && pathJoin(this.cacheDir, "reify-" + file.hash + ".js"); } - js(file) { + call( + method: "js" | "mjs" | "json" | "css", + file: RawFile, + ): string { + return this[method](file); + } + + js(file: RawFile) { const parts = file.absPath.split("/"); const nmi = parts.lastIndexOf("node_modules"); if (nmi >= 0) { @@ -125,7 +133,7 @@ class DefaultHandlers { } if (this.cacheDir) { - const cacheFileName = this.getCacheFileName(file); + const cacheFileName = this.getCacheFileName(file)!; try { return optimisticReadFile(cacheFileName, "utf8"); } catch (e) { @@ -148,16 +156,16 @@ class DefaultHandlers { } // Files with an .mjs extension are just JavaScript plus module syntax. - mjs(file) { + mjs(file: RawFile) { return this.js(file); } - json(file) { + json(file: RawFile) { file.jsonData = JSON.parse(file.dataString); return jsonDataToCommonJS(file.jsonData); } - css({ dataString, hash }) { + css({ dataString, hash }: RawFile) { return cssToCommonJS(dataString, hash); } } @@ -166,11 +174,11 @@ class DefaultHandlers { "js", "json", "css", -].forEach(function (type) { +].forEach(function (this: any, type: string) { this[type] = Profile("DefaultHandlers." + type, this[type]); }, DefaultHandlers.prototype); -function jsonDataToCommonJS(data) { +function jsonDataToCommonJS(data: any) { return "module.exports = " + JSON.stringify(data, null, 2) + ";\n"; } @@ -179,7 +187,7 @@ function jsonDataToCommonJS(data) { // eviction logic. const scriptParseCache = Object.create(null); -function canBeParsedAsPlainJS(dataString, hash) { +function canBeParsedAsPlainJS(dataString: string, hash: string): boolean { if (hash && has(scriptParseCache, hash)) { return scriptParseCache[hash]; } @@ -197,7 +205,7 @@ function canBeParsedAsPlainJS(dataString, hash) { return result; } -function stripLeadingSlash(path) { +function stripLeadingSlash(path?: string) { if (typeof path === "string" && path.charAt(0) === "/") { return path.slice(1); @@ -206,7 +214,7 @@ function stripLeadingSlash(path) { return path; } -function ensureLeadingSlash(path) { +function ensureLeadingSlash(path?: string) { if (typeof path !== "string") { return path; } @@ -228,7 +236,7 @@ function ensureLeadingSlash(path) { const importedStatusOrder = [false, "dynamic", "static"]; // Set each file.imported status to the maximum status of provided files. -function alignImportedStatuses(...files) { +function alignImportedStatuses(...files: File[]) { const maxIndex = Math.max(...files.map( file => importedStatusOrder.indexOf(file.imported))); const maxStatus = importedStatusOrder[maxIndex]; @@ -237,42 +245,101 @@ function alignImportedStatuses(...files) { // Set file.imported to status if status has a higher index than the // current value of file.imported. -function setImportedStatus(file, status) { +function setImportedStatus(file: File, status: string | boolean) { if (importedStatusOrder.indexOf(status) > importedStatusOrder.indexOf(file.imported)) { file.imported = status; } } -// Map from SHA (which is already calculated, so free for us) -// to the results of calling findImportedModuleIdentifiers. -// Each entry is an array of strings, and this is a case where -// the computation is expensive but the output is very small. -// The cache can be global because findImportedModuleIdentifiers -// is a pure function, and that way it applies across instances -// of ImportScanner (which do not persist across builds). -const IMPORT_SCANNER_CACHE = new LRU({ - max: 1024*1024, - length(ids) { - let total = 40; // size of key - each(ids, (info, id) => { total += id.length; }); - return total; - } -}); - // Stub used for entry point modules within node_modules directories on // the server. These stub modules delegate to native Node evaluation by // calling module.useNode() immediately, but it's important that we have // something to include in the bundle so that parent modules have // something to resolve. -const useNodeStub = { - dataString: "module.useNode();", - deps: Object.create(null), -}; -useNodeStub.data = Buffer.from(useNodeStub.dataString, "utf8"); -useNodeStub.hash = sha1(useNodeStub.data); +const useNodeStub: Omit = function () { + const dataString = "module.useNode();"; + const data = Buffer.from(dataString, "utf8"); + return { + type: "js", + data, + dataString, + hash: sha1(data), + deps: Object.create(null), + }; +}(); + +export type ImportScannerOptions = { + name: string; + bundleArch: string; + extensions: string[]; + sourceRoot: string; + nodeModulesPaths: string[]; + watchSet: WatchSet; + cacheDir: string; +} + +interface RawFile { + absPath: string; + data: Buffer; + dataString: string; + hash: string; + jsonData?: Record; +} + +interface File extends RawFile { + type: string; + sourcePath: string; + targetPath?: string; + servePath?: string; + absModuleId?: string; + deps?: Record; + lazy: boolean; + bare?: boolean; + // TODO Improve the sourceMap type. + sourceMap?: Record; + implicit?: boolean; + imported: string | boolean; + [fakeSymbol]?: boolean; + reportPendingErrors?: () => number; + hasErrors?: boolean; + missingModules?: Record; + alias?: FileAlias; +} + +type FileAlias = { + path: string; + absModuleId?: string | false; +} + +type MissingMap = Record; +// TODO Get this type from js-analyze.ts (after converting from .js). +type ImportInfo = { + dynamic: boolean; + possiblySpurious: boolean; + parentPath: string; + bundleArch?: string; + packageName?: string; + parentWasDynamic?: boolean; + helpers?: Record; +} export default class ImportScanner { + public name: string; + + private bundleArch: string; + private sourceRoot: string; + private nodeModulesPaths: string[]; + private watchSet: WatchSet; + private defaultHandlers: DefaultHandlers; + private resolver: Resolver; + + private absPathToOutputIndex: Record = Object.create(null); + private realPathToFiles: Record = Object.create(null); + private realPathCache: Record = Object.create(null); + private allMissingModules: MissingMap = Object.create(null); + private outputFiles: File[] = []; + constructor({ name, bundleArch, @@ -281,27 +348,30 @@ export default class ImportScanner { nodeModulesPaths = [], watchSet, cacheDir, - }) { - assert.ok(isString(sourceRoot)); - + }: ImportScannerOptions) { this.name = name; this.bundleArch = bundleArch; this.sourceRoot = sourceRoot; this.nodeModulesPaths = nodeModulesPaths; this.watchSet = watchSet; - this.cacheDir = cacheDir; - this.absPathToOutputIndex = Object.create(null); - this.realPathToFiles = Object.create(null); - this.realPathCache = Object.create(null); - this.allMissingModules = Object.create(null); - this.outputFiles = []; this.defaultHandlers = new DefaultHandlers({ - sourceRoot, cacheDir, bundleArch, }); + const { + findImportedModuleIdentifiers, + } = this; + + this.findImportedModuleIdentifiers = wrap(file => { + return findImportedModuleIdentifiers.call(this, file); + }, { + makeCacheKey(file) { + return file.hash; + } + }); + this.resolver = Resolver.getOrCreate({ caller: "ImportScanner#constructor", sourceRoot, @@ -319,7 +389,7 @@ export default class ImportScanner { return stat; } - const file = this._getFile(absPath); + const file = this.getFile(absPath); if (file) { return fakeFileStat; } @@ -328,14 +398,15 @@ export default class ImportScanner { }; } - _getFile(absPath) { + private getFile(absPath: string): File | null { absPath = absPath.toLowerCase(); if (has(this.absPathToOutputIndex, absPath)) { return this.outputFiles[this.absPathToOutputIndex[absPath]]; } + return null; } - _addFile(absPath, file) { + private addFile(absPath: string, file: File): File | null { if (! file || file[fakeSymbol]) { // Return file without adding it to this.outputFiles. return file; @@ -368,11 +439,13 @@ export default class ImportScanner { return file; } + + return null; } - addInputFiles(files) { + addInputFiles(files: File[]) { files.forEach(file => { - this._checkSourceAndTargetPaths(file); + this.checkSourceAndTargetPaths(file); // Note: this absolute path may not necessarily exist on the file // system, but any import statements or require calls in file.data @@ -385,24 +458,21 @@ export default class ImportScanner { file.imported = false; file.absModuleId = file.absModuleId || - this._getAbsModuleId(file.absPath); + this.getAbsModuleId(file.absPath); - if (! this._addFile(file.absPath, file)) { + if (! this.addFile(file.absPath, file)) { // Collisions can happen if a compiler plugin calls addJavaScript // multiple times with the same sourcePath. #6422 - this._combineFiles(this._getFile(file.absPath), file); + this.combineFiles(this.getFile(file.absPath)!, file); } - this._addFileByRealPath(file, this._realPath(file.absPath)); + this.addFileByRealPath(file, this.realPath(file.absPath)); }); return this; } - _addFileByRealPath(file, realPath) { - assert.ok(isObject(file)); - assert.strictEqual(typeof realPath, "string"); - + private addFileByRealPath(file: File, realPath: string) { if (! has(this.realPathToFiles, realPath)) { this.realPathToFiles[realPath] = []; } @@ -416,13 +486,13 @@ export default class ImportScanner { return file; } - _getInfoByRealPath(realPath) { - assert.strictEqual(typeof realPath, "string"); + private getInfoByRealPath(realPath: string): RawFile | null { const files = this.realPathToFiles[realPath]; if (files && files.length > 0) { const firstFile = files[0]; - const dataString = this._getDataString(firstFile); + const dataString = this.getDataString(firstFile); return { + absPath: realPath, data: firstFile.data, dataString: dataString, hash: firstFile.hash, @@ -431,7 +501,7 @@ export default class ImportScanner { return null; } - _realPath(absPath) { + private realPath(absPath: string) { if (has(this.realPathCache, absPath)) { return this.realPathCache[absPath]; } @@ -477,8 +547,8 @@ export default class ImportScanner { // Make sure file.sourcePath is defined, and handle the possibility that // file.targetPath differs from file.sourcePath. - _checkSourceAndTargetPaths(file) { - file.sourcePath = this._getSourcePath(file); + private checkSourceAndTargetPaths(file: File) { + file.sourcePath = this.getSourcePath(file); if (! isString(file.targetPath)) { return; @@ -490,28 +560,29 @@ export default class ImportScanner { const absSourcePath = pathJoin(this.sourceRoot, file.sourcePath); const absTargetPath = pathJoin(this.sourceRoot, file.targetPath); - const absSourceId = this._getAbsModuleId(absSourcePath); - const absTargetId = this._getAbsModuleId(absTargetPath); + const absSourceId = this.getAbsModuleId(absSourcePath); + const absTargetId = this.getAbsModuleId(absTargetPath); + + if (!absSourceId || !absTargetId) { + return; + } // If file.targetPath differs from file.sourcePath, generate a new // file object with that .sourcePath that imports the original file. // This allows either the .sourcePath or the .targetPath to be used // when importing the original file, and also allows multiple files // to have the same .sourcePath but different .targetPaths. - let sourceFile = this._getFile(absSourcePath); - if (! sourceFile) { - sourceFile = this._addFile(absSourcePath, { - type: file.type, - sourcePath: file.sourcePath, - servePath: stripLeadingSlash(absSourceId), - absModuleId: absSourceId, - dataString: "", - deps: {}, - lazy: true, - imported: false, - implicit: true, - }); - } + const sourceFile = this.getFile(absSourcePath) || this.addFile(absSourcePath, { + ...file, + servePath: stripLeadingSlash(absSourceId), + absModuleId: absSourceId, + data: emptyData, + dataString: emptyDataString, + deps: Object.create(null), + lazy: true, + imported: false, + implicit: true, + })!; // Make sure the original file gets installed at the target path // instead of the source path. @@ -525,7 +596,7 @@ export default class ImportScanner { return; } - const relativeId = this._getRelativeImportId( + const relativeId = this.getRelativeImportId( absSourceId, absTargetId, ); @@ -545,17 +616,18 @@ export default class ImportScanner { // plugin calling inputFile.addJavaScript multiple times for the // same source file (see discussion in #9176), with different target // paths, code, laziness, etc. - sourceFile.dataString = this._getDataString(sourceFile) + + sourceFile.dataString = this.getDataString(sourceFile) + // The + in "*+" indicates that the "default" property should be // included as well as any other re-exported properties. "module.link(" + JSON.stringify(relativeId) + ', { "*": "*+" });\n'; sourceFile.data = Buffer.from(sourceFile.dataString, "utf8"); sourceFile.hash = sha1(sourceFile.data); - sourceFile.deps[relativeId] = { - absModuleId: file.absModuleId, + sourceFile.deps = sourceFile.deps || Object.create(null); + sourceFile.deps![relativeId] = { + dynamic: false, possiblySpurious: false, - dynamic: false + parentPath: absSourcePath, }; } } @@ -563,16 +635,16 @@ export default class ImportScanner { // Concatenate the contents of oldFile and newFile, combining source // maps and updating all other properties appropriately. Once this // combination is done, oldFile should be kept and newFile discarded. - _combineFiles(oldFile, newFile) { + private combineFiles(oldFile: File, newFile: File) { const scanner = this; - function checkProperty(name) { + function checkProperty(name: "lazy" | "bare") { if (has(oldFile, name)) { if (! has(newFile, name)) { - newFile[name] = oldFile[name]; + newFile[name] = oldFile[name]!; } } else if (has(newFile, name)) { - oldFile[name] = newFile[name]; + oldFile[name] = newFile[name]!; } if (oldFile[name] !== newFile[name]) { @@ -594,15 +666,15 @@ export default class ImportScanner { checkProperty("lazy"); checkProperty("bare"); - function getChunk(file) { + function getChunk(file: File) { const consumer = file.sourceMap && new SourceMapConsumer(file.sourceMap); const node = consumer && SourceNode.fromStringWithSourceMap( - scanner._getDataString(file), + scanner.getDataString(file), consumer ); - return node || scanner._getDataString(file); + return node || scanner.getDataString(file); } const { @@ -623,22 +695,22 @@ export default class ImportScanner { alignImportedStatuses(oldFile, newFile); oldFile.sourceMap = combinedSourceMap.toJSON(); - if (! oldFile.sourceMap.mappings) { - oldFile.sourceMap = null; + if (! oldFile.sourceMap!.mappings) { + oldFile.sourceMap = void 0; } } scanImports() { this.outputFiles.forEach(file => { if (! file.lazy) { - this._scanFile(file); + this.scanFile(file); } }); return this; } - scanMissingModules(missingModules) { + scanMissingModules(missingModules: MissingMap) { assert.ok(missingModules); assert.ok(typeof missingModules === "object"); assert.ok(! Array.isArray(missingModules)); @@ -651,8 +723,8 @@ export default class ImportScanner { this.allMissingModules = newlyMissing; Object.keys(missingModules).forEach(id => { - let staticImportInfo = null; - let dynamicImportInfo = null; + let staticImportInfo: ImportInfo | null = null; + let dynamicImportInfo: ImportInfo | null = null; // Although it would be logically valid to call this._scanFile for // each and every importInfo object, there can be a lot of them @@ -672,23 +744,33 @@ export default class ImportScanner { return staticImportInfo && dynamicImportInfo; }); + const fakeStub = { + type: "js", + sourcePath: "fake.js", + absPath: pathJoin(this.sourceRoot, "fake.js"), + data: emptyData, + dataString: emptyDataString, + hash: emptyHash, + [fakeSymbol]: true, + imported: false, + lazy: true, + } + if (staticImportInfo) { - this._scanFile({ - sourcePath: "fake.js", - [fakeSymbol]: true, + this.scanFile({ + ...fakeStub, // By specifying the .deps property of this fake file ahead of // time, we can avoid calling findImportedModuleIdentifiers in // the _scanFile method, which is important because this file // doesn't have a .data or .dataString property. - deps: { [id]: staticImportInfo } + deps: { [id]: staticImportInfo }, }, false); // !forDynamicImport } if (dynamicImportInfo) { - this._scanFile({ - sourcePath: "fake.js", - [fakeSymbol]: true, - deps: { [id]: dynamicImportInfo } + this.scanFile({ + ...fakeStub, + deps: { [id]: dynamicImportInfo }, }, true); // forDynamicImport } }); @@ -728,7 +810,7 @@ export default class ImportScanner { // concatenating values (which must be arrays) if a property already // exists. The array elements should be importInfo objects, and will be // deduplicated according to their .parentPath properties. - static mergeMissing(target, source) { + static mergeMissing(target: MissingMap, source: MissingMap) { keys(source).forEach(id => { const importInfoList = source[id]; const pathToIndex = Object.create(null); @@ -758,7 +840,7 @@ export default class ImportScanner { }); } - _mergeFilesWithSameRealPath() { + private mergeFilesWithSameRealPath() { Object.keys(this.realPathToFiles).forEach(realPath => { const files = this.realPathToFiles[realPath]; if (! files || files.length < 2) { @@ -789,18 +871,20 @@ export default class ImportScanner { } }); + const absContainerPath = pathJoin(this.sourceRoot, container.sourcePath); + // Alias every non-container file to container.absModuleId. files.forEach(file => { if (file !== container) { - file.alias = file.alias || {}; - file.alias.absModuleId = container.absModuleId; + file.alias = file.alias || { path: absContainerPath }; + file.alias!.absModuleId = container.absModuleId; } }); }); } getOutputFiles() { - this._mergeFilesWithSameRealPath(); + this.mergeFilesWithSameRealPath(); // Return all installable output files that are either eager or // imported (statically or dynamically). @@ -812,16 +896,16 @@ export default class ImportScanner { }); } - _getSourcePath(file) { + private getSourcePath(file: File) { let sourcePath = file.sourcePath; if (sourcePath) { if (pathIsAbsolute(sourcePath)) { + let relPath: string | undefined; try { - var relPath = pathRelative(this.sourceRoot, sourcePath); - + relPath = pathRelative(this.sourceRoot, sourcePath); } finally { if (! relPath || relPath.startsWith("..")) { - if (this.resolver._joinAndStat(this.sourceRoot, sourcePath)) { + if (this.resolver.joinAndStat(this.sourceRoot, sourcePath)) { // If sourcePath exists as a path relative to this.sourceRoot, // strip away the leading / that made it look absolute. return pathNormalize(pathJoin(".", sourcePath)); @@ -843,55 +927,47 @@ export default class ImportScanner { } else if (file.servePath) { sourcePath = convertToOSPath(file.servePath.replace(/^\//, "")); - } else if (file.path) { - sourcePath = file.path; + } else if ((file as any).path) { + sourcePath = (file as any).path; } return pathNormalize(pathJoin(".", sourcePath)); } - _findImportedModuleIdentifiers(file) { - if (IMPORT_SCANNER_CACHE.has(file.hash)) { - return IMPORT_SCANNER_CACHE.get(file.hash); - } - - const result = findImportedModuleIdentifiers( - this._getDataString(file), - file.hash, - ); - - // there should always be file.hash, but better safe than sorry - if (file.hash) { - IMPORT_SCANNER_CACHE.set(file.hash, result); - } - - return result; + private findImportedModuleIdentifiers( + file: File, + ): Record { + return findImportedModuleIdentifiers(this.getDataString(file), file.hash); } - _resolve(parentFile, id, forDynamicImport = false) { + private resolve( + parentFile: File, + id: string, + forDynamicImport = false, + ): Resolution | FileAlias { const absPath = pathJoin(this.sourceRoot, parentFile.sourcePath); const resolved = this.resolver.resolve(id, absPath); if (resolved === "missing") { - return this._onMissing(parentFile, id, forDynamicImport); + return this.onMissing(parentFile, id, forDynamicImport); } if (resolved && resolved.packageJsonMap) { - const info = parentFile.deps[id]; + const info = parentFile.deps![id]; info.helpers = info.helpers || {}; each(resolved.packageJsonMap, (pkg, path) => { const packageJsonFile = - this._addPkgJsonToOutput(path, pkg, forDynamicImport); + this.addPkgJsonToOutput(path, pkg, forDynamicImport); - if (! parentFile.absModuleId) { + if (! parentFile.absModuleId || ! packageJsonFile.absModuleId) { // If parentFile is not installable, then we won't return it // from getOutputFiles, so we don't need to worry about // recording any parentFile.deps[id].helpers. return; } - const relativeId = this._getRelativeImportId( + const relativeId = this.getRelativeImportId( parentFile.absModuleId, packageJsonFile.absModuleId ); @@ -899,7 +975,7 @@ export default class ImportScanner { // Although not explicitly imported, any package.json modules // involved in resolving this import should be recorded as // implicit "helpers." - info.helpers[relativeId] = forDynamicImport; + info.helpers![relativeId] = forDynamicImport; }); // Any relevant package.json files must have already been added via @@ -907,7 +983,7 @@ export default class ImportScanner { // .alias. In other words, the Resolver is responsible for including // relevant package.json files in resolved.packageJsonMap so that // they can be handled by the loop above. - const file = this._getFile(resolved.path); + const file = this.getFile(resolved.path); if (file && file.alias) { setImportedStatus(file, forDynamicImport ? "dynamic" : "static"); return file.alias; @@ -917,7 +993,7 @@ export default class ImportScanner { return resolved; } - _getRelativeImportId(absParentId, absChildId) { + private getRelativeImportId(absParentId: string, absChildId: string) { const relativeId = posixRelative( posixDirname(absParentId), absChildId @@ -933,7 +1009,7 @@ export default class ImportScanner { return relativeId; } - _scanFile(file, forDynamicImport = false) { + private scanFile(file: File, forDynamicImport = false) { if (file.imported === "static") { // If we've already scanned this file non-dynamically, then we don't // need to scan it again. @@ -960,10 +1036,10 @@ export default class ImportScanner { } try { - file.deps = file.deps || this._findImportedModuleIdentifiers(file); + file.deps = file.deps || this.findImportedModuleIdentifiers(file); } catch (e) { if (e.$ParseError) { - buildmessage.error(e.message, { + (buildmessage as any).error(e.message, { file: file.sourcePath, line: e.loc.line, column: e.loc.column, @@ -973,7 +1049,7 @@ export default class ImportScanner { throw e; } - each(file.deps, (info, id) => { + each(file.deps, (info: ImportInfo, id: string) => { // Asynchronous module fetching only really makes sense in the // browser (even though it works equally well on the server), so // it's better if forDynamicImport never becomes true on the server. @@ -982,13 +1058,13 @@ export default class ImportScanner { info.parentWasDynamic || info.dynamic); - const resolved = this._resolve(file, id, dynamic); - const absImportedPath = resolved && resolved.path; + const resolved = this.resolve(file, id, dynamic); + const absImportedPath = resolved && resolved !== "missing" && resolved.path; if (! absImportedPath) { return; } - let depFile = this._getFile(absImportedPath); + let depFile = this.getFile(absImportedPath); if (depFile) { // We should never have stored a fake file in this.outputFiles, so // it's surprising if depFile[fakeSymbol] is true. @@ -997,9 +1073,10 @@ export default class ImportScanner { // If the module is an implicit package.json stub, update to the // explicit version now. if (depFile.jsonData && + depFile.absModuleId && depFile.absModuleId.endsWith("/package.json") && depFile.implicit === true) { - const file = this._readPackageJson(absImportedPath); + const file = this.readPackageJson(absImportedPath); if (file) { depFile.implicit = false; Object.assign(depFile, file); @@ -1009,21 +1086,21 @@ export default class ImportScanner { // If depFile has already been scanned, this._scanFile will return // immediately thanks to the depFile.imported-checking logic at // the top of the method. - this._scanFile(depFile, dynamic); + this.scanFile(depFile, dynamic); return; } - depFile = this._readDepFile(absImportedPath); + depFile = this.readDepFile(absImportedPath); if (! depFile) { return; } // Append this file to the output array and record its index. - this._addFile(absImportedPath, depFile); + this.addFile(absImportedPath, depFile); // Recursively scan the module's imported dependencies. - this._scanFile(depFile, dynamic); + this.scanFile(depFile, dynamic); }); } @@ -1036,7 +1113,7 @@ export default class ImportScanner { return archMatches(this.bundleArch, "web.browser"); } - _getDataString(file) { + private getDataString(file: File) { if (typeof file.dataString === "string") { return file.dataString; } @@ -1048,7 +1125,7 @@ export default class ImportScanner { file.dataString = stripHashBang(rawDataString); } else { file.dataString = rawDataString; - file.dataString = this.defaultHandlers[file.type](file); + file.dataString = this.defaultHandlers.call(file.type as any, file); } if (! (file.data instanceof Buffer) || @@ -1059,17 +1136,17 @@ export default class ImportScanner { return file.dataString; } - _readFile(absPath) { - const info = { + private readFile(absPath: string) { + const data = optimisticReadFile(absPath) as Buffer; + const info: RawFile = { absPath, - data: optimisticReadFile(absPath), - hash: optimisticHashOrNull(absPath), + data, + dataString: data.toString("utf8"), + hash: optimisticHashOrNull(absPath)!, }; this.watchSet.addFile(absPath, info.hash); - info.dataString = info.data.toString("utf8"); - // Same logic/comment as stripBOM in node/lib/module.js: // Remove byte order marker. This catches EF BB BF (the UTF-8 BOM) // because the buffer-to-string conversion in `fs.readFileSync()` @@ -1083,9 +1160,9 @@ export default class ImportScanner { return info; } - _readPackageJson(absPath) { + private readPackageJson(absPath: string) { try { - var info = this._readFile(absPath); + var info = this.readFile(absPath); } catch (e) { if (e.code !== "ENOENT") throw e; return null; @@ -1111,7 +1188,7 @@ export default class ImportScanner { return info; } - _readModule(absPath) { + private readModule(absPath: string): RawFile | null { const dotExt = pathExtname(absPath).toLowerCase(); if (dotExt === ".node") { @@ -1128,7 +1205,7 @@ export default class ImportScanner { } try { - var info = this._readFile(absPath); + var info = this.readFile(absPath); } catch (e) { if (e.code !== "ENOENT") throw e; return null; @@ -1138,14 +1215,14 @@ export default class ImportScanner { let ext = dotExt.slice(1); if (! has(DefaultHandlers.prototype, ext)) { - if (canBeParsedAsPlainJS(dataString)) { + if (canBeParsedAsPlainJS(dataString, info.hash)) { ext = "js"; } else { return null; } } - info.dataString = this.defaultHandlers[ext](info); + info.dataString = this.defaultHandlers.call(ext as any, info); if (info.dataString !== dataString) { info.data = Buffer.from(info.dataString, "utf8"); } @@ -1153,17 +1230,17 @@ export default class ImportScanner { return info; } - _readDepFile(absPath) { - const absModuleId = this._getAbsModuleId(absPath); + private readDepFile(absPath: string): File | null { + const absModuleId = this.getAbsModuleId(absPath); if (! absModuleId) { // The given path cannot be installed on this architecture. return null; } - const realPath = this._realPath(absPath); + const realPath = this.realPath(absPath); - let depFile = this._getInfoByRealPath(realPath); - if (depFile) { + let rawFile = this.getInfoByRealPath(realPath); + if (rawFile) { // If we already have a file with the same real path, use its data // rather than reading the file again, or generating a stub. This // logic enables selective compilation of node_modules in an elegant @@ -1174,14 +1251,17 @@ export default class ImportScanner { // raw version found in node_modules. See also: // https://github.com/meteor/meteor-feature-requests/issues/6 - } else if (this._shouldUseNode(absModuleId)) { + } else if (this.shouldUseNode(absModuleId)) { // On the server, modules in node_modules directories will be // handled natively by Node, so we just need to generate a stub // module that calls module.useNode(), rather than calling // this._readModule to read the actual module file. Note that // useNodeStub includes an empty .deps property, which will make // this._scanFile(depFile, dynamic) return immediately. - depFile = { ...useNodeStub }; + rawFile = { + ...useNodeStub, + absPath, + }; // If optimistic functions care about this file, e.g. because it // resides in a linked npm package, then we should allow it to @@ -1195,35 +1275,38 @@ export default class ImportScanner { } } else { - depFile = absModuleId.endsWith("/package.json") - ? this._readPackageJson(absPath) - : this._readModule(absPath); + rawFile = absModuleId.endsWith("/package.json") + ? this.readPackageJson(absPath) + : this.readModule(absPath); // If the module is not readable, _readModule may return null. // Otherwise it will return { data, dataString, hash }. - if (! depFile) { + if (! rawFile) { return null; } } - depFile.type = "js"; // TODO Is this correct? - depFile.sourcePath = pathRelative(this.sourceRoot, absPath); - depFile.absModuleId = absModuleId; - depFile.servePath = stripLeadingSlash(absModuleId); - depFile.lazy = true; - // Setting depFile.imported = false is necessary so that - // this._scanFile(depFile, dynamic) doesn't think the file has been - // scanned already and return immediately. - depFile.imported = false; + const depFile: File = { + ...rawFile, + type: "js", + sourcePath: pathRelative(this.sourceRoot, absPath), + absModuleId, + servePath: stripLeadingSlash(absModuleId), + lazy: true, + // Setting depFile.imported = false is necessary so that + // this._scanFile(depFile, dynamic) doesn't think the file has been + // scanned already and return immediately. + imported: false, + }; - this._addFileByRealPath(depFile, realPath); + this.addFileByRealPath(depFile, realPath); return depFile; } // Similar to logic in Module.prototype.useNode as defined in // packages/modules-runtime/server.js. Introduced to fix issue #10122. - _shouldUseNode(absModuleId) { + private shouldUseNode(absModuleId: string) { if (this.isWeb()) { // Node should never be used in a browser, obviously. return false; @@ -1252,10 +1335,10 @@ export default class ImportScanner { // Returns an absolute module identifier indicating where to install the // given file via meteorInstall. May return undefined if the file should // not be installed on the current architecture. - _getAbsModuleId(absPath) { + private getAbsModuleId(absPath: string) { let path = - this._getNodeModulesAbsModuleId(absPath) || - this._getSourceRootAbsModuleId(absPath); + this.getNodeModulesAbsModuleId(absPath) || + this.getSourceRootAbsModuleId(absPath); if (! path) { return; @@ -1276,29 +1359,30 @@ export default class ImportScanner { return ensureLeadingSlash(path); } - _getNodeModulesAbsModuleId(absPath) { - let absModuleId; + private getNodeModulesAbsModuleId(absPath: string) { + let absModuleId: string | undefined; this.nodeModulesPaths.some(path => { const relPathWithinNodeModules = pathRelative(path, absPath); if (relPathWithinNodeModules.startsWith("..")) { // absPath is not a subdirectory of path. - return; + return false; } // Install the module into the local node_modules directory within // this app or package. - return absModuleId = pathJoin( + absModuleId = pathJoin( "node_modules", relPathWithinNodeModules ); + return true; }); - return ensureLeadingSlash(absModuleId); + return absModuleId && ensureLeadingSlash(absModuleId); } - _getSourceRootAbsModuleId(absPath) { + private getSourceRootAbsModuleId(absPath: string) { const relPath = pathRelative(this.sourceRoot, absPath); if (relPath.startsWith("..")) { @@ -1356,7 +1440,11 @@ export default class ImportScanner { } // Called by this.resolver when a module identifier cannot be resolved. - _onMissing(parentFile, id, forDynamicImport = false) { + private onMissing( + parentFile: File, + id: string, + forDynamicImport = false, + ): Resolution | FileAlias { const isApp = ! this.name; const absParentPath = pathJoin( this.sourceRoot, @@ -1370,18 +1458,18 @@ export default class ImportScanner { // a dependency on meteor-node-stubs/deps/.js. const stubId = Resolver.getNativeStubId(id); if (isString(stubId) && stubId !== id) { - const info = parentFile.deps[id]; + const info = parentFile.deps![id]; // Although not explicitly imported, any stubs associated with // this native import should be recorded as implicit "helpers." info.helpers = info.helpers || {}; info.helpers[stubId] = forDynamicImport; - return this._resolve(parentFile, stubId, forDynamicImport); + return this.resolve(parentFile, stubId, forDynamicImport); } } - const info = { + const info: ImportInfo = { packageName: this.name, parentPath: absParentPath, bundleArch: this.bundleArch, @@ -1425,10 +1513,16 @@ export default class ImportScanner { this.allMissingModules, { [id]: [info] } ); + + return null; } - _addPkgJsonToOutput(pkgJsonPath, pkg, forDynamicImport = false) { - const file = this._getFile(pkgJsonPath); + private addPkgJsonToOutput( + pkgJsonPath: string, + pkg: Record, + forDynamicImport = false, + ): File { + const file = this.getFile(pkgJsonPath); if (file) { // If the file already exists, just update file.imported according @@ -1437,13 +1531,16 @@ export default class ImportScanner { return file; } - const data = Buffer.from(jsonDataToCommonJS(pkg), "utf8"); + const dataString = jsonDataToCommonJS(pkg); + const data = Buffer.from(dataString, "utf8"); const relPkgJsonPath = pathRelative(this.sourceRoot, pkgJsonPath); - const absModuleId = this._getAbsModuleId(pkgJsonPath); + const absModuleId = this.getAbsModuleId(pkgJsonPath); - const pkgFile = { + const pkgFile: File = { type: "js", // We represent the JSON module with JS. + absPath: pkgJsonPath, data, + dataString, jsonData: pkg, deps: {}, // Avoid accidentally re-scanning this file. sourcePath: relPkgJsonPath, @@ -1461,29 +1558,29 @@ export default class ImportScanner { implicit: true, }; - this._addFile(pkgJsonPath, pkgFile); + this.addFile(pkgJsonPath, pkgFile); const hash = optimisticHashOrNull(pkgJsonPath); if (hash) { this.watchSet.addFile(pkgJsonPath, hash); } - this._resolvePkgJsonBrowserAliases(pkgFile, forDynamicImport); + this.resolvePkgJsonBrowserAliases(pkgFile); return pkgFile; } - _resolvePkgJsonBrowserAliases(pkgFile, forDynamicImport = false) { + private resolvePkgJsonBrowserAliases(pkgFile: File) { if (! this.isWeb()) { return; } - const browser = pkgFile.jsonData.browser; + const browser = pkgFile.jsonData!.browser; if (! isObject(browser)) { return; } - const deps = pkgFile.deps; + const deps = pkgFile.deps || (pkgFile.deps = Object.create(null)); const absPkgJsonPath = pathJoin(this.sourceRoot, pkgFile.sourcePath); Object.keys(browser).forEach(sourceId => { @@ -1495,16 +1592,20 @@ export default class ImportScanner { return; } - const file = this._getFile(source.path); + const file = this.getFile(source.path); if (file && file.alias) { // If we previously set an .alias for this file, assume it is // complete and return early. return; } - const sourceAbsModuleId = this._getAbsModuleId(source.path); + const sourceAbsModuleId = this.getAbsModuleId(source.path); + if (! sourceAbsModuleId || ! pkgFile.absModuleId) { + return; + } + const hasAuthorityToCreateAlias = - this._areAbsModuleIdsInSamePackage( + this.areAbsModuleIdsInSamePackage( pkgFile.absModuleId, sourceAbsModuleId ); @@ -1516,7 +1617,10 @@ export default class ImportScanner { } const targetId = browser[sourceId]; - const alias = {}; + const alias: FileAlias = { + path: source.path, + absModuleId: sourceAbsModuleId, + }; if (typeof targetId === "string") { deps[targetId] = deps[targetId] || {}; @@ -1533,7 +1637,7 @@ export default class ImportScanner { } Object.assign(alias, target); - alias.absModuleId = this._getAbsModuleId(target.path); + alias.absModuleId = this.getAbsModuleId(target.path); } else if (targetId === false) { // This is supposed to indicate the alias refers to an empty stub. @@ -1548,10 +1652,13 @@ export default class ImportScanner { } else { const relSourcePath = pathRelative(this.sourceRoot, source.path); - this._addFile(source.path, { + this.addFile(source.path, { + type: "js", alias, - data: Buffer.from("", "utf8"), - dataString: "", + absPath: absPkgJsonPath, + data: emptyData, + dataString: emptyDataString, + hash: emptyHash, sourcePath: relSourcePath, absModuleId: sourceAbsModuleId, servePath: stripLeadingSlash(sourceAbsModuleId), @@ -1563,7 +1670,7 @@ export default class ImportScanner { }); } - _areAbsModuleIdsInSamePackage(path1, path2) { + private areAbsModuleIdsInSamePackage(path1: string, path2: string) { if (! (isString(path1) && isString(path2))) { return false; } @@ -1572,7 +1679,7 @@ export default class ImportScanner { assert.strictEqual(path1.charAt(0), "/"); assert.strictEqual(path2.charAt(0), "/"); - function getPackageRoot(path) { + function getPackageRoot(path: string) { const parts = path.split("/"); assert.strictEqual(parts[0], ""); const nmi = parts.lastIndexOf("node_modules"); @@ -1583,15 +1690,15 @@ export default class ImportScanner { } } -const ISp = ImportScanner.prototype; +const ISp = ImportScanner.prototype as any; -[ "_addPkgJsonToOutput", - "_findImportedModuleIdentifiers", - "_getAbsModuleId", - "_readFile", - "_realPath", - "_resolve", - "_resolvePkgJsonBrowserAliases", +[ "addPkgJsonToOutput", + "findImportedModuleIdentifiers", + "getAbsModuleId", + "readFile", + "realPath", + "resolve", + "resolvePkgJsonBrowserAliases", // We avoid profiling _scanFile here because it doesn't typically have // much "own time," and it gets called recursively, resulting in deeply // nested METEOR_PROFILE output, which often obscures actual problems. @@ -1605,7 +1712,7 @@ const ISp = ImportScanner.prototype; "scanImports", "scanMissingModules", ].forEach(name => { - ISp[name] = Profile(function (...args) { + ISp[name] = Profile(function (this: ImportScanner) { return `ImportScanner#${name} for ${this.name || "the app"}`; }, ISp[name]); }); diff --git a/tools/isobuild/js-analyze.js b/tools/isobuild/js-analyze.js index 88d13490d4..04cac3fd5a 100644 --- a/tools/isobuild/js-analyze.js +++ b/tools/isobuild/js-analyze.js @@ -46,7 +46,7 @@ function tryToParse(source, hash) { /** * The `findImportedModuleIdentifiers` function takes a string of module * source code and returns a map from imported module identifiers to AST - * nodes. The keys of this map are used in ./import-scanner.js to traverse + * nodes. The keys of this map are used in ./import-scanner.ts to traverse * the module dependency graph. The AST nodes are generally ignored. * * The implementation uses a regular expression to scan quickly for diff --git a/tools/isobuild/resolver.ts b/tools/isobuild/resolver.ts index ddc212b9b7..8dd86a0871 100644 --- a/tools/isobuild/resolver.ts +++ b/tools/isobuild/resolver.ts @@ -14,7 +14,7 @@ import { convertToOSPath, convertToPosixPath, } from "../fs/files"; - +import { Stats } from "fs"; import { wrap } from "optimism"; import { optimisticStatOrNull, @@ -49,6 +49,13 @@ export type ResolverOptions = { caller?: string; } +export type Resolution = { + stat: Stats; + path: string; + packageJsonMap?: Record>; + id?: string; +} | "missing" | null + export default class Resolver { static getOrCreate = wrap(function (options: ResolverOptions) { return new Resolver(options); @@ -64,7 +71,7 @@ export default class Resolver { private nodeModulesPaths: string[]; private mainFields: string[]; - public statOrNull = optimisticStatOrNull; + public statOrNull = optimisticStatOrNull as (path: string) => Stats | null; constructor({ sourceRoot, @@ -121,13 +128,17 @@ export default class Resolver { // Resolve the given module identifier to an object { path, stat } or // null, relative to an absolute parent path. The _seenDirPaths // parameter is for internal use only and should be ommitted. - public resolve(id: string, absParentPath: string, _seenDirPaths?: Set) { + public resolve( + id: string, + absParentPath: string, + _seenDirPaths?: Set, + ): Resolution { let resolved = this.resolveAbsolute(id, absParentPath) || this.resolveRelative(id, absParentPath) || this.resolveNodeModule(id, absParentPath); - if (typeof resolved === "string") { + if (resolved === "missing") { // The _resolveNodeModule method can return "missing" to indicate // that the ImportScanner should look elsewhere for this module, // such as in the app node_modules directory. @@ -229,18 +240,13 @@ export default class Resolver { return resolved; } - private joinAndStat(...joinArgs: string[]) { + public joinAndStat(...joinArgs: string[]) { const joined: string = pathJoin(...joinArgs); const path = pathNormalize(joined); const exactStat = this.statOrNull(path); const exactResult = exactStat && { path, stat: exactStat }; - let result: { - stat: typeof exactStat; - path: string; - packageJsonMap?: Record>; - id?: string; - } | null = null; + let result: Resolution = null; if (exactResult && exactStat && exactStat.isFile()) { result = exactResult; @@ -269,18 +275,20 @@ export default class Resolver { return result; } - private resolveAbsolute(id: string, _absParentPath: string) { - return id.charAt(0) === "/" && - this.joinAndStat(this.sourceRoot, id.slice(1)); + private resolveAbsolute(id: string, _absParentPath: string): Resolution { + return id.charAt(0) === "/" + && this.joinAndStat(this.sourceRoot, id.slice(1)) + || null; } - private resolveRelative(id: string, absParentPath: string) { + private resolveRelative(id: string, absParentPath: string): Resolution { if (id.charAt(0) === ".") { return this.joinAndStat(absParentPath, "..", id); } + return null; } - private resolveNodeModule(id: string, absParentPath: string) { + private resolveNodeModule(id: string, absParentPath: string): Resolution { if (! Resolver.isTopLevel(id)) { return null; } From 18ee25256a01aec6dd087d44dfb1086a9be6f354 Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Sun, 21 Jul 2019 10:39:37 -0400 Subject: [PATCH 188/327] Bump $BUNDLE_VERSION to 8.16.0.23 before rebuilding dev bundle. --- meteor | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meteor b/meteor index dfe0396fbd..cc8f497e07 100755 --- a/meteor +++ b/meteor @@ -1,6 +1,6 @@ #!/usr/bin/env bash -BUNDLE_VERSION=8.16.0.22 +BUNDLE_VERSION=8.16.0.23 # OS Check. Put here because here is where we download the precompiled # bundles that are arch specific. From 2ae2690f3a115004283d811f8a3d57cf3c8b3f63 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Paulo=20Mogoll=C3=B3n?= <32210050+pmogollons@users.noreply.github.com> Date: Sun, 21 Jul 2019 11:01:24 -0500 Subject: [PATCH 189/327] Convert tools/utils/archinfo.js to TypeScript. (#10624) * Updated code to use modern JS * Added types * Stopped using 2 underscore functions (1 remaining) --- tools/cli/commands.js | 4 +- tools/cli/main.js | 2 +- tools/cordova/builder.js | 2 +- tools/fs/safe-watcher.ts | 2 +- tools/isobuild/build-plugin.js | 2 +- tools/isobuild/bundler.js | 2 +- .../compiler-deprecated-compile-step.js | 2 +- tools/isobuild/compiler-plugin.js | 2 +- tools/isobuild/compiler.js | 2 +- tools/isobuild/import-scanner.ts | 2 +- tools/isobuild/isopack-cache.js | 2 +- tools/isobuild/isopack.js | 2 +- tools/isobuild/package-api.js | 2 +- tools/isobuild/package-source.js | 2 +- tools/isobuild/resolver.ts | 2 +- tools/isobuild/unibuild.js | 2 +- tools/packaging/catalog/catalog-remote.js | 2 +- tools/packaging/tropohouse.js | 2 +- tools/packaging/updater.js | 2 +- tools/project-context.js | 2 +- tools/tests/command-line.js | 2 +- tools/tests/compiler-plugins.js | 2 +- tools/tests/cordova-builds.js | 2 +- tools/tests/wipe-all-packages.js | 2 +- tools/tool-env/isopackets.js | 2 +- tools/tool-testing/sandbox.js | 2 +- tools/utils/{archinfo.js => archinfo.ts} | 87 ++++++++++--------- tools/utils/utils.js | 2 +- 28 files changed, 72 insertions(+), 71 deletions(-) rename tools/utils/{archinfo.js => archinfo.ts} (85%) diff --git a/tools/cli/commands.js b/tools/cli/commands.js index 7e4f0e7fe6..7648a2128c 100644 --- a/tools/cli/commands.js +++ b/tools/cli/commands.js @@ -9,7 +9,7 @@ var config = require('../meteor-services/config.js'); var runLog = require('../runners/run-log.js'); var utils = require('../utils/utils.js'); var httpHelpers = require('../utils/http-helpers.js'); -var archinfo = require('../utils/archinfo.js'); +var archinfo = require('../utils/archinfo'); var catalog = require('../packaging/catalog/catalog.js'); var stats = require('../meteor-services/stats.js'); var Console = require('../console/console.js').Console; @@ -961,7 +961,7 @@ var buildCommand = function (options) { // of the file, not a constant 'bundle' (a bit obnoxious for // machines, but worth it for humans) - // Error handling for options.architecture. See archinfo.js for more + // Error handling for options.architecture. See archinfo for more // information on what the architectures are, what they mean, et cetera. if (options.architecture && !_.has(archinfo.VALID_ARCHITECTURES, options.architecture)) { diff --git a/tools/cli/main.js b/tools/cli/main.js index 67227d6b91..6d813158e5 100644 --- a/tools/cli/main.js +++ b/tools/cli/main.js @@ -15,7 +15,7 @@ var projectContextModule = require('../project-context.js'); var catalog = require('../packaging/catalog/catalog.js'); var buildmessage = require('../utils/buildmessage.js'); var httpHelpers = require('../utils/http-helpers.js'); -const archinfo = require('../utils/archinfo.js'); +const archinfo = require('../utils/archinfo'); import { isEmacs } from "../utils/utils.js"; var main = exports; diff --git a/tools/cordova/builder.js b/tools/cordova/builder.js index 25fa6a149b..e32bb3e36b 100644 --- a/tools/cordova/builder.js +++ b/tools/cordova/builder.js @@ -6,7 +6,7 @@ import buildmessage from '../utils/buildmessage.js'; import files from '../fs/files'; import { optimisticReadJsonOrNull } from "../fs/optimistic"; import bundler from '../isobuild/bundler.js'; -import archinfo from '../utils/archinfo.js'; +import archinfo from '../utils/archinfo'; import release from '../packaging/release.js'; import { loadIsopackage } from '../tool-env/isopackets.js'; import utils from '../utils/utils.js'; diff --git a/tools/fs/safe-watcher.ts b/tools/fs/safe-watcher.ts index 9d6bf8830d..2b548341ce 100644 --- a/tools/fs/safe-watcher.ts +++ b/tools/fs/safe-watcher.ts @@ -357,7 +357,7 @@ let suggestedRaisingWatchLimit = false; // utils.execFileSync) will run in a Fiber. async function maybeSuggestRaisingWatchLimit(error: Error & { errno: number }) { var constants = require('constants'); - var archinfo = require('../utils/archinfo.js'); + var archinfo = require('../utils/archinfo'); if (! suggestedRaisingWatchLimit && // Note: the not-super-documented require('constants') maps from // strings to SYSTEM errno values. System errno values aren't the same diff --git a/tools/isobuild/build-plugin.js b/tools/isobuild/build-plugin.js index 7df77374a8..dd50a64eb2 100644 --- a/tools/isobuild/build-plugin.js +++ b/tools/isobuild/build-plugin.js @@ -1,4 +1,4 @@ -var archinfo = require('../utils/archinfo.js'); +var archinfo = require('../utils/archinfo'); var buildmessage = require('../utils/buildmessage.js'); var files = require('../fs/files'); var _ = require('underscore'); diff --git a/tools/isobuild/bundler.js b/tools/isobuild/bundler.js index 23f9d2c814..11a1eb6b5c 100644 --- a/tools/isobuild/bundler.js +++ b/tools/isobuild/bundler.js @@ -162,7 +162,7 @@ var meteorNpm = require('./meteor-npm.js'); import { addToTree } from "./linker.js"; var files = require('../fs/files'); -var archinfo = require('../utils/archinfo.js'); +var archinfo = require('../utils/archinfo'); var buildmessage = require('../utils/buildmessage.js'); var watch = require('../fs/watch'); var colonConverter = require('../utils/colon-converter.js'); diff --git a/tools/isobuild/compiler-deprecated-compile-step.js b/tools/isobuild/compiler-deprecated-compile-step.js index 1f406d0ee9..fe3b9c76c8 100644 --- a/tools/isobuild/compiler-deprecated-compile-step.js +++ b/tools/isobuild/compiler-deprecated-compile-step.js @@ -7,7 +7,7 @@ var _ = require('underscore'); -var archinfo = require('../utils/archinfo.js'); +var archinfo = require('../utils/archinfo'); var buildmessage = require('../utils/buildmessage.js'); var files = require('../fs/files'); var colonConverter = require('../utils/colon-converter.js'); diff --git a/tools/isobuild/compiler-plugin.js b/tools/isobuild/compiler-plugin.js index 28e42cd6ad..51578287b7 100644 --- a/tools/isobuild/compiler-plugin.js +++ b/tools/isobuild/compiler-plugin.js @@ -1,4 +1,4 @@ -var archinfo = require('../utils/archinfo.js'); +var archinfo = require('../utils/archinfo'); var buildmessage = require('../utils/buildmessage.js'); var buildPluginModule = require('./build-plugin.js'); var colonConverter = require('../utils/colon-converter.js'); diff --git a/tools/isobuild/compiler.js b/tools/isobuild/compiler.js index fab5f1bdfe..7f40e97800 100644 --- a/tools/isobuild/compiler.js +++ b/tools/isobuild/compiler.js @@ -1,6 +1,6 @@ var _ = require('underscore'); -var archinfo = require('../utils/archinfo.js'); +var archinfo = require('../utils/archinfo'); var buildmessage = require('../utils/buildmessage.js'); var bundler = require('./bundler.js'); var isopack = require('./isopack.js'); diff --git a/tools/isobuild/import-scanner.ts b/tools/isobuild/import-scanner.ts index 93e27dacc3..eee85adfb8 100644 --- a/tools/isobuild/import-scanner.ts +++ b/tools/isobuild/import-scanner.ts @@ -5,7 +5,7 @@ import { isString, isObject, isEmpty, has, keys, each, omit, } from "underscore"; import {sha1, WatchSet} from "../fs/watch"; -import {matches as archMatches} from "../utils/archinfo.js"; +import {matches as archMatches} from "../utils/archinfo"; import {findImportedModuleIdentifiers} from "./js-analyze.js"; import {cssToCommonJS} from "./css-modules"; import buildmessage from "../utils/buildmessage.js"; diff --git a/tools/isobuild/isopack-cache.js b/tools/isobuild/isopack-cache.js index 188d6822fd..06e27fd5de 100644 --- a/tools/isobuild/isopack-cache.js +++ b/tools/isobuild/isopack-cache.js @@ -7,7 +7,7 @@ var isopackModule = require('./isopack.js'); var watch = require('../fs/watch'); var colonConverter = require('../utils/colon-converter.js'); var Profile = require('../tool-env/profile').Profile; -var archinfo = require('../utils/archinfo.js'); +var archinfo = require('../utils/archinfo'); import { requestGarbageCollection } from "../utils/gc.js"; export class IsopackCache { diff --git a/tools/isobuild/isopack.js b/tools/isobuild/isopack.js index b6cba9088e..696ff87154 100644 --- a/tools/isobuild/isopack.js +++ b/tools/isobuild/isopack.js @@ -1,6 +1,6 @@ var assert = require('assert'); var compiler = require('./compiler.js'); -var archinfo = require('../utils/archinfo.js'); +var archinfo = require('../utils/archinfo'); var _ = require('underscore'); var linker = require('./linker.js'); var buildmessage = require('../utils/buildmessage.js'); diff --git a/tools/isobuild/package-api.js b/tools/isobuild/package-api.js index d5089e16b5..059c83cf6d 100644 --- a/tools/isobuild/package-api.js +++ b/tools/isobuild/package-api.js @@ -3,7 +3,7 @@ var _ = require("underscore"); var buildmessage = require('../utils/buildmessage.js'); var utils = require('../utils/utils.js'); var compiler = require('./compiler.js'); -var archinfo = require('../utils/archinfo.js'); +var archinfo = require('../utils/archinfo'); var catalog = require('../packaging/catalog/catalog.js'); // It's important that we import these functions individually instead of diff --git a/tools/isobuild/package-source.js b/tools/isobuild/package-source.js index c2c3c895d8..1f85e89c16 100644 --- a/tools/isobuild/package-source.js +++ b/tools/isobuild/package-source.js @@ -7,7 +7,7 @@ var watch = require('../fs/watch'); var buildmessage = require('../utils/buildmessage.js'); var meteorNpm = require('./meteor-npm.js'); import Builder from './builder.js'; -var archinfo = require('../utils/archinfo.js'); +var archinfo = require('../utils/archinfo'); var catalog = require('../packaging/catalog/catalog.js'); var packageVersionParser = require('../packaging/package-version-parser.js'); var compiler = require('./compiler.js'); diff --git a/tools/isobuild/resolver.ts b/tools/isobuild/resolver.ts index 8dd86a0871..98f146bb39 100644 --- a/tools/isobuild/resolver.ts +++ b/tools/isobuild/resolver.ts @@ -4,7 +4,7 @@ import { has, } from "underscore"; -import { matches as archMatches } from "../utils/archinfo.js"; +import { matches as archMatches } from "../utils/archinfo"; import { pathJoin, pathRelative, diff --git a/tools/isobuild/unibuild.js b/tools/isobuild/unibuild.js index c46c9587a4..fbe18faf11 100644 --- a/tools/isobuild/unibuild.js +++ b/tools/isobuild/unibuild.js @@ -4,7 +4,7 @@ import _ from "underscore"; import files from "../fs/files"; import { WatchSet, sha1 } from "../fs/watch"; import { NodeModulesDirectory } from "./bundler.js"; -import * as archinfo from "../utils/archinfo.js"; +import * as archinfo from "../utils/archinfo"; function rejectBadPath(p) { if (p.indexOf("..") >= 0) { diff --git a/tools/packaging/catalog/catalog-remote.js b/tools/packaging/catalog/catalog-remote.js index ab3e714d62..c6a242f9c3 100644 --- a/tools/packaging/catalog/catalog-remote.js +++ b/tools/packaging/catalog/catalog-remote.js @@ -5,7 +5,7 @@ var files = require('../../fs/files'); var utils = require('../../utils/utils.js'); var buildmessage = require('../../utils/buildmessage.js'); var config = require('../../meteor-services/config.js'); -var archinfo = require('../../utils/archinfo.js'); +var archinfo = require('../../utils/archinfo'); var Console = require('../../console/console.js').Console; var tropohouse = require('../tropohouse.js'); diff --git a/tools/packaging/tropohouse.js b/tools/packaging/tropohouse.js index a832d6d771..0bc685bdc5 100644 --- a/tools/packaging/tropohouse.js +++ b/tools/packaging/tropohouse.js @@ -2,7 +2,7 @@ var _ = require("underscore"); var files = require('../fs/files'); var utils = require('../utils/utils.js'); var httpHelpers = require('../utils/http-helpers.js'); -var archinfo = require('../utils/archinfo.js'); +var archinfo = require('../utils/archinfo'); var catalog = require('./catalog/catalog.js'); var Isopack = require('../isobuild/isopack.js').Isopack; var config = require('../meteor-services/config.js'); diff --git a/tools/packaging/updater.js b/tools/packaging/updater.js index 2786671640..35b96d6fb5 100644 --- a/tools/packaging/updater.js +++ b/tools/packaging/updater.js @@ -2,7 +2,7 @@ var _ = require('underscore'); var runLog = require('../runners/run-log.js'); var catalog = require('./catalog/catalog.js'); -var archinfo = require('../utils/archinfo.js'); +var archinfo = require('../utils/archinfo'); var isopack = require('../isobuild/isopack.js'); var buildmessage = require('../utils/buildmessage.js'); var Console = require('../console/console.js').Console; diff --git a/tools/project-context.js b/tools/project-context.js index 68bebf54b8..efc1d2d4f1 100644 --- a/tools/project-context.js +++ b/tools/project-context.js @@ -1,7 +1,7 @@ var assert = require("assert"); var _ = require('underscore'); -var archinfo = require('./utils/archinfo.js'); +var archinfo = require('./utils/archinfo'); var buildmessage = require('./utils/buildmessage.js'); var catalog = require('./packaging/catalog/catalog.js'); var catalogLocal = require('./packaging/catalog/catalog-local.js'); diff --git a/tools/tests/command-line.js b/tools/tests/command-line.js index 90d0a350dc..94cc8a1a18 100644 --- a/tools/tests/command-line.js +++ b/tools/tests/command-line.js @@ -1,6 +1,6 @@ var selftest = require('../tool-testing/selftest.js'); var Sandbox = selftest.Sandbox; -var archinfo = require('../utils/archinfo.js'); +var archinfo = require('../utils/archinfo'); var release = require('../packaging/release.js'); var _ = require('underscore'); var files = require('../fs/files'); diff --git a/tools/tests/compiler-plugins.js b/tools/tests/compiler-plugins.js index 417eb141c7..adaaa33876 100644 --- a/tools/tests/compiler-plugins.js +++ b/tools/tests/compiler-plugins.js @@ -3,7 +3,7 @@ var selftest = require('../tool-testing/selftest.js'); var files = require('../fs/files'); import { getUrl } from '../utils/http-helpers.js'; import { sleepMs } from '../utils/utils.js'; -import { host } from '../utils/archinfo.js'; +import { host } from '../utils/archinfo'; const osArch = host(); var Sandbox = selftest.Sandbox; diff --git a/tools/tests/cordova-builds.js b/tools/tests/cordova-builds.js index 17a4f38740..8c774abd70 100644 --- a/tools/tests/cordova-builds.js +++ b/tools/tests/cordova-builds.js @@ -2,7 +2,7 @@ var files = require('../fs/files'); var selftest = require('../tool-testing/selftest.js'); var testUtils = require('../tool-testing/test-utils.js'); var Sandbox = selftest.Sandbox; -import { host } from "../utils/archinfo.js"; +import { host } from "../utils/archinfo"; const relBuildDir = "../build"; const isOSX = host().split(".", 2).join(".") === "os.osx"; diff --git a/tools/tests/wipe-all-packages.js b/tools/tests/wipe-all-packages.js index 14dc8659ae..870d60a254 100644 --- a/tools/tests/wipe-all-packages.js +++ b/tools/tests/wipe-all-packages.js @@ -2,7 +2,7 @@ var selftest = require('../tool-testing/selftest.js'); var Sandbox = selftest.Sandbox; var files = require('../fs/files'); var utils = require('../utils/utils.js'); -var archinfo = require('../utils/archinfo.js'); +var archinfo = require('../utils/archinfo'); var _ = require('underscore'); selftest.define("wipe all packages", ['slow', 'custom-warehouse'], function () { diff --git a/tools/tool-env/isopackets.js b/tools/tool-env/isopackets.js index c28743fd77..8fdee84079 100644 --- a/tools/tool-env/isopackets.js +++ b/tools/tool-env/isopackets.js @@ -13,7 +13,7 @@ var watch = require('../fs/watch'); var Console = require('../console/console.js').Console; var fiberHelpers = require('../utils/fiber-helpers.js'); var packageMapModule = require('../packaging/package-map.js'); -var archinfo = require('../utils/archinfo.js'); +var archinfo = require('../utils/archinfo'); var Profile = require('./profile').Profile; // TL;DR: Isopacket is a set of isopacks. Isopackets are used only inside diff --git a/tools/tool-testing/sandbox.js b/tools/tool-testing/sandbox.js index 578b182d9c..d7b34ad820 100644 --- a/tools/tool-testing/sandbox.js +++ b/tools/tool-testing/sandbox.js @@ -48,7 +48,7 @@ import { getPackagesDirectoryName, getPackageStorage, } from '../meteor-services/config.js'; -import { host as archInfoHost } from '../utils/archinfo.js'; +import { host as archInfoHost } from '../utils/archinfo'; import { current as releaseCurrent } from '../packaging/release.js'; import { FinishedUpgraders } from '../project-context.js'; import { allUpgraders } from '../upgraders.js'; diff --git a/tools/utils/archinfo.js b/tools/utils/archinfo.ts similarity index 85% rename from tools/utils/archinfo.js rename to tools/utils/archinfo.ts index a6c634ec79..8923f74ffd 100644 --- a/tools/utils/archinfo.js +++ b/tools/utils/archinfo.ts @@ -1,7 +1,6 @@ -var _ = require('underscore'); -var os = require('os'); - -var utils = require('./utils.js'); +import { max } from 'underscore'; +import os from 'os'; +const utils = require('./utils'); /* Meteor's current architecture scheme defines the following virtual * machine types, which are defined by specifying what is promised by @@ -129,7 +128,7 @@ var utils = require('./utils.js'); */ // Valid architectures that Meteor officially supports. -export const VALID_ARCHITECTURES = { +export const VALID_ARCHITECTURES: Record = { "os.osx.x86_64": true, "os.linux.x86_64": true, "os.linux.x86_32": true, @@ -142,18 +141,21 @@ export const VALID_ARCHITECTURES = { // a fiber. Throws an error if it's not a supported architecture. // // If you change this, also change scripts/admin/launch-meteor -var _host = null; // memoize +let _host: string | null = null; // memoize + export function host() { - if (! _host) { - var run = function (...args) { - var result = utils.execFileSync(args[0], args.slice(1)).stdout; + if (!_host) { + const run = function (...args: Array) { + const result = utils.execFileSync(args[0], args.slice(1)).stdout; + if (! result) { - throw new Error("can't get arch with " + args.join(" ") + "?"); + throw new Error(`Can't get arch with ${args.join(" ")}?`); } + return result.replace(/\s*$/, ''); // trailing whitespace }; - var platform = os.platform(); + const platform = os.platform(); if (platform === "darwin") { // Can't just test uname -m = x86_64, because Snow Leopard can @@ -162,28 +164,26 @@ export function host() { run('sysctl', '-n', 'hw.cpu64bit_capable') !== "1") { throw new Error("Only 64-bit Intel processors are supported on OS X"); } - _host = "os.osx.x86_64"; - } - else if (platform === "linux") { - var machine = run('uname', '-m'); - if (_.contains(["i386", "i686", "x86"], machine)) { + _host = "os.osx.x86_64"; + } else if (platform === "linux") { + const machine = run('uname', '-m'); + + if (["i386", "i686", "x86"].includes(machine)) { _host = "os.linux.x86_32"; - } else if (_.contains(["x86_64", "amd64", "ia64"], machine)) { + } else if (["x86_64", "amd64", "ia64"].includes(machine)) { _host = "os.linux.x86_64"; } else { - throw new Error("Unsupported architecture: " + machine); + throw new Error(`Unsupported architecture: ${machine}`); } - } - - else if (platform === "win32") { + } else if (platform === "win32") { if (process.arch === "x64") { _host = "os.windows.x86_64"; } else { _host = "os.windows.x86_32"; } } else { - throw new Error("Unsupported operating system: " + platform); + throw new Error(`Unsupported operating system: ${platform}`); } } @@ -193,7 +193,7 @@ export function host() { // In order to springboard to earlier Meteor releases that did not have // 64-bit Windows builds, Windows installations must be allowed to // download 32-bit builds of meteor-tool. -exports.acceptableMeteorToolArches = function () { +export function acceptableMeteorToolArches(): string[] { if (os.platform() === "win32") { switch (utils.architecture()) { case "x86_32": @@ -207,12 +207,12 @@ exports.acceptableMeteorToolArches = function () { } return [host()]; -}; +} // 64-bit Windows machines that have been using a 32-bit version of Meteor // are eligible to switch to 64-bit beginning with Meteor 1.6, which is // the first version of Meteor that contains this code. -export function canSwitchTo64Bit() { +export function canSwitchTo64Bit(): boolean { // Automatically switching from 32-bit to 64-bit Windows builds is // disabled for the time being, since downloading additional builds of // meteor-tool isn't stable enough at the moment (on Windows, at least) @@ -230,7 +230,7 @@ export function canSwitchTo64Bit() { // necessarily have to be a fully qualified architecture name. This // function just checks to see if `program` describes a set of // environments that is a (non-strict) superset of `host`. -export function matches(host, program) { +export function matches(host: string, program: string): boolean { return host.substr(0, program.length) === program && (host.length === program.length || host.substr(program.length, 1) === "."); @@ -240,18 +240,19 @@ export function matches(host, program) { // architectures as its second argument. Returns the most specific // match, or null if none match. Throws an error if `programs` // contains exact duplicates. -export function mostSpecificMatch(host, programs) { - var seen = {}; - var best = null; +export function mostSpecificMatch(host: string, programs: string[]): string | null { + let best: string | null = null; + const seen: Record = {}; - _.each(programs, function (p) { - if (seen[p]) { - throw new Error("Duplicate architecture: " + p); + programs.forEach((program: string) => { + if (seen[program]) { + throw new Error(`Duplicate architecture: ${program}`); } - seen[p] = true; - if (matches(host, p) && - (! best || p.length > best.length)) { - best = p; + + seen[program] = true; + + if (matches(host, program) && (!best || program.length > best.length)) { + best = program; } }); @@ -267,31 +268,31 @@ export function mostSpecificMatch(host, programs) { // For example, for 'os' and 'os.osx', return 'os.osx'. For 'os' and // 'os.linux.x86_64', return 'os.linux.x86_64'. For 'os' and 'browser', throw an // exception. -export function leastSpecificDescription(programs) { +export function leastSpecificDescription(programs: string[]): string { if (programs.length === 0) { return ''; } // Find the longest string - var longest = _.max(programs, function (p) { return p.length; }); + const longest = max(programs, (p: string) => p.length); // If everything else in the list is compatible with the longest, // then it must be the most specific, and if everything is // compatible with the most specific then it must be the least // specific compatible description. - _.each(programs, function (p) { - if (! matches(longest, p)) { - throw new Error("Incompatible architectures: '" + p + "' and '" + - longest + "'"); + programs.forEach((program: string) => { + if (!matches(longest, program)) { + throw new Error(`Incompatible architectures: '${program}' and '${longest}'`); } }); return longest; } -export function withoutSpecificOs(arch) { +export function withoutSpecificOs(arch: string): string { if (arch.substr(0, 3) === 'os.') { return 'os'; } + return arch; } diff --git a/tools/utils/utils.js b/tools/utils/utils.js index 41c97dad72..b7b7cc6849 100644 --- a/tools/utils/utils.js +++ b/tools/utils/utils.js @@ -4,7 +4,7 @@ var os = require('os'); var url = require('url'); var fiberHelpers = require('./fiber-helpers.js'); -var archinfo = require('./archinfo.js'); +var archinfo = require('./archinfo'); var buildmessage = require('./buildmessage.js'); var files = require('../fs/files'); var packageVersionParser = require('../packaging/package-version-parser.js'); From f8ba7a96fe98b441a0f043f2ac5c7e98f56e7c3d Mon Sep 17 00:00:00 2001 From: Michael Newman Date: Sun, 21 Jul 2019 09:02:29 -0700 Subject: [PATCH 190/327] Convert tools/utils/mongo-exit-codes to TypeScript (#10625) --- .eslintignore | 2 +- tools/runners/run-mongo.js | 7 ++++--- tools/utils/{mongo-exit-codes.js => mongo-exit-codes.ts} | 9 ++------- 3 files changed, 7 insertions(+), 11 deletions(-) rename tools/utils/{mongo-exit-codes.js => mongo-exit-codes.ts} (94%) diff --git a/.eslintignore b/.eslintignore index c4d6cb792b..07c77000f3 100644 --- a/.eslintignore +++ b/.eslintignore @@ -31,7 +31,7 @@ tools/func-utils.js tools/http-helpers.js tools/inspector.js tools/index.js -tools/mongo-exit-codes.js +tools/mongo-exit-codes.ts tools/processes.js tools/progress.js tools/project-context.js diff --git a/tools/runners/run-mongo.js b/tools/runners/run-mongo.js index 18fad130e0..6e851599bb 100644 --- a/tools/runners/run-mongo.js +++ b/tools/runners/run-mongo.js @@ -1,6 +1,7 @@ +import { MongoExitCodes } from '../utils/mongo-exit-codes'; + var files = require('../fs/files'); var utils = require('../utils/utils.js'); -var mongoExitCodes = require('../utils/mongo-exit-codes.js'); var fiberHelpers = require('../utils/fiber-helpers.js'); var runLog = require('./run-log.js'); var child_process = require('child_process'); @@ -917,7 +918,7 @@ _.extend(MRp, { // Too many restarts, too quicky. It's dead. Print friendly // diagnostics and give up. - var explanation = mongoExitCodes.Codes[code]; + var explanation = MongoExitCodes[code]; var message = "Can't start Mongo server."; if (explanation && explanation.symbol === 'EXIT_UNCAUGHT' && @@ -928,7 +929,7 @@ _.extend(MRp, { message += "\n" + explanation.longText; } - if (explanation === mongoExitCodes.EXIT_NET_ERROR) { + if (explanation && explanation.symbol === 'EXIT_NET_ERROR') { message += "\n\n" + "Check for other processes listening on port " + self.port + "\n" + "or other Meteor instances running in the same project."; diff --git a/tools/utils/mongo-exit-codes.js b/tools/utils/mongo-exit-codes.ts similarity index 94% rename from tools/utils/mongo-exit-codes.js rename to tools/utils/mongo-exit-codes.ts index 749c67b1bb..343b2f3721 100644 --- a/tools/utils/mongo-exit-codes.js +++ b/tools/utils/mongo-exit-codes.ts @@ -4,10 +4,7 @@ // Explanations have been rewritten, not copied, for license reasons. - -var _ = require('underscore'); - -exports.Codes = { +export const MongoExitCodes = { 0 : { code: 0, symbol: "EXIT_CLEAN", longText: "MongoDB exited cleanly" @@ -68,6 +65,4 @@ exports.Codes = { } }; -_.each(exports.Codes, function (value) { - exports[value.symbol] = value; -}); +export type MongoExitCode = keyof typeof MongoExitCodes; \ No newline at end of file From e0eb210194d6ff68391b3c82f92afe4babdbc7c0 Mon Sep 17 00:00:00 2001 From: Michael Newman Date: Thu, 25 Jul 2019 14:34:13 -0700 Subject: [PATCH 191/327] Convert tools/utils/processes.js to tools/utils/processes.ts (#10627) --- .eslintignore | 2 +- tools/cordova/project.js | 2 +- tools/cordova/run-targets.js | 2 +- tools/isobuild/meteor-npm.js | 2 +- tools/tests/cordova-plugins.js | 2 +- .../clients/browserstack/index.js | 2 +- tools/tool-testing/run.js | 2 +- tools/utils/{processes.js => processes.ts} | 147 ++++++++++-------- 8 files changed, 92 insertions(+), 69 deletions(-) rename tools/utils/{processes.js => processes.ts} (51%) diff --git a/.eslintignore b/.eslintignore index 07c77000f3..da029b9cfe 100644 --- a/.eslintignore +++ b/.eslintignore @@ -32,7 +32,7 @@ tools/http-helpers.js tools/inspector.js tools/index.js tools/mongo-exit-codes.ts -tools/processes.js +tools/processes.ts tools/progress.js tools/project-context.js tools/runners/run-log.js diff --git a/tools/cordova/project.js b/tools/cordova/project.js index a3fabf37c0..ca00a23dcf 100644 --- a/tools/cordova/project.js +++ b/tools/cordova/project.js @@ -11,7 +11,7 @@ import { Profile } from '../tool-env/profile'; import buildmessage from '../utils/buildmessage.js'; import main from '../cli/main.js'; import httpHelpers from '../utils/http-helpers.js'; -import { execFileSync, execFileAsync } from '../utils/processes.js'; +import { execFileSync, execFileAsync } from '../utils/processes'; import './protect-string-proto.js'; // must always come before 'cordova-lib' import { cordova as cordova_lib, events as cordova_events, CordovaError } diff --git a/tools/cordova/run-targets.js b/tools/cordova/run-targets.js index 75c66c2eac..63f46b4649 100644 --- a/tools/cordova/run-targets.js +++ b/tools/cordova/run-targets.js @@ -6,7 +6,7 @@ import { loadIsopackage } from '../tool-env/isopackets.js'; import runLog from '../runners/run-log.js'; import { Console } from '../console/console.js'; import files from '../fs/files'; -import { execFileSync, execFileAsync } from '../utils/processes.js'; +import { execFileSync, execFileAsync } from '../utils/processes'; export class CordovaRunTarget { get title() { diff --git a/tools/isobuild/meteor-npm.js b/tools/isobuild/meteor-npm.js index 4736bb73a4..30e03cbc82 100644 --- a/tools/isobuild/meteor-npm.js +++ b/tools/isobuild/meteor-npm.js @@ -16,7 +16,7 @@ var runLog = require('../runners/run-log.js'); var Profile = require('../tool-env/profile').Profile; import { parse } from "semver"; import { version as npmVersion } from 'npm'; -import { execFileAsync } from "../utils/processes.js"; +import { execFileAsync } from "../utils/processes"; import { get as getRebuildArgs } from "../static-assets/server/npm-rebuild-args.js"; diff --git a/tools/tests/cordova-plugins.js b/tools/tests/cordova-plugins.js index c78982cc38..021d306906 100644 --- a/tools/tests/cordova-plugins.js +++ b/tools/tests/cordova-plugins.js @@ -1,7 +1,7 @@ var selftest = require('../tool-testing/selftest.js'); var Sandbox = selftest.Sandbox; var files = require('../fs/files'); -import { execFileSync } from '../utils/processes.js'; +import { execFileSync } from '../utils/processes'; var _ = require('underscore'); // Copy the contents of one file to another. In these series of tests, we often diff --git a/tools/tool-testing/clients/browserstack/index.js b/tools/tool-testing/clients/browserstack/index.js index a63e16cb6e..52637e075f 100644 --- a/tools/tool-testing/clients/browserstack/index.js +++ b/tools/tool-testing/clients/browserstack/index.js @@ -3,7 +3,7 @@ import Client from '../../client.js'; import configuredClients from "./clients.js"; import { enterJob } from '../../../utils/buildmessage.js'; import { getUrlWithResuming } from '../../../utils/http-helpers.js'; -import { execFileSync } from '../../../utils/processes.js'; +import { execFileSync } from '../../../utils/processes'; import { ensureDependencies } from '../../../cli/dev-bundle-helpers.js'; import { mkdtemp, diff --git a/tools/tool-testing/run.js b/tools/tool-testing/run.js index 9554ee0a2f..d457ffbd03 100644 --- a/tools/tool-testing/run.js +++ b/tools/tool-testing/run.js @@ -22,7 +22,7 @@ import Matcher from './matcher.js'; import OutputLog from './output-log.js'; import { randomPort, timeoutScaleFactor, sleepMs } from '../utils/utils.js'; import TestFailure from './test-failure.js'; -import { execFileSync } from '../utils/processes.js'; +import { execFileSync } from '../utils/processes'; let runningTest = null; diff --git a/tools/utils/processes.js b/tools/utils/processes.ts similarity index 51% rename from tools/utils/processes.js rename to tools/utils/processes.ts index ec3c9375af..3bc2032f6d 100644 --- a/tools/utils/processes.js +++ b/tools/utils/processes.ts @@ -1,6 +1,6 @@ -import _ from 'underscore'; import child_process from 'child_process'; -import files from '../static-assets/server/mini-files'; +import { Writable } from 'stream'; +import { convertToOSPath } from '../static-assets/server/mini-files'; // The execFileSync function is meant to resemble the similarly-named Node 0.12 // synchronous process creation API, but instead of being fully blocking it @@ -11,58 +11,81 @@ import files from '../static-assets/server/mini-files'; // Eventually, these versions should replace the ones in tools/utils/utils.js // and tools/tool-testing/selftest.js. -/** - * @summary Executes a command synchronously, returning either the captured - * stdout output or throwing an error containing the stderr output as part of - * the message. In addition, the error will contain fields pid, stderr, stdout, - * status and signal. - * @param {String} command The command to run - * @param {Array} [args] List of string arguments - * @param {Object} [options] - * @param {Object} [options.cwd] Current working directory of the child process - * @param {Object} [options.env] Environment key-value pairs - * @param {Array|String} [options.stdio] Child's stdio configuration. - * (Default: 'pipe') Specifying anything else than 'pipe' will disallow - * capture. - * @param {Writable} [options.destination] If specified, instead of capturing - * the output, the child process stdout will be piped to the destination stream. - * @param {String} [options.waitForClose] Whether to wait for the child process - * streams to close or to resolve the promise when the child process exits. - * @returns {String} The stdout from the command - */ -export function execFileSync(command, args, options) { - return Promise.await(execFileAsync(command, args, options)); +type ExecFileOptions = { + /** + * Current working directory of the child process + */ + cwd?: string, + + /** + * Environment key-value pairs + */ + env?: NodeJS.ProcessEnv, + + /** + * Child's stdio configuration. + * (Default: 'pipe') Specifying anything but 'pipe' will disallow capture. + */ + stdio?: 'pipe' | Array, + + /** + * If specified, instead of capturing the output, the child process stdout + * will be piped to the destination stream. + */ + destination?: Writable, + + /** + * Whether to wait for the child process streams to close or to resolve + * the promise when the child process exits. + */ + waitForClose?: boolean, } -/** - * @summary Executes a command asynchronously, returning a promise that will - * either be resolved to the captured stdout output or be rejected with an - * error containing the stderr output as part of the message. In addition, - * the error will contain fields pid, stderr, stdout, status and signal. - * @param {String} command The command to run - * @param {Array} [args] List of string arguments - * @param {Object} [options] - * @param {Object} [options.cwd] Current working directory of the child process - * @param {Object} [options.env] Environment key-value pairs - * @param {Array|String} [options.stdio] Child's stdio configuration. - * (Default: 'pipe') Specifying anything else than 'pipe' will disallow - * capture. - * @param {Writable} [options.destination] If specified, instead of capturing - * the output, the child process stdout will be piped to the destination stream. - * @param {String} [options.waitForClose] Whether to wait for the child process - * streams to close or to resolve the promise when the child process exits. - * @returns {Promise} - */ -export function execFileAsync(command, args, - options = { waitForClose: true }) { + /** + * @summary Executes a command synchronously, returning either the captured + * stdout output or throwing an error containing the stderr output as part of + * the message. In addition, the error will contain fields pid, stderr, stdout, + * status and signal. + * @param command The command to run + * @param args List of string arguments + * @param options + * @returns The stdout from the command + */ +export function execFileSync( + command: string, + args?: ReadonlyArray | ExecFileOptions, + options?: ExecFileOptions +) { + const meteorPromise: any = Promise; // TypeScript doesn't recognize "Promise.await" + return meteorPromise.await(execFileAsync(command, args, options)); +} + + /** + * @summary Executes a command asynchronously, returning a promise that will + * either be resolved to the captured stdout output or be rejected with an + * error containing the stderr output as part of the message. In addition, + * the error will contain fields pid, stderr, stdout, status and signal. + * @param command The command to run + * @param args List of string arguments + * @param options + */ +export function execFileAsync( + command: string, + args?: ReadonlyArray | ExecFileOptions, + options: ExecFileOptions = { waitForClose: true } +) { // args is optional, so if it's not an array we interpret it as options if (!Array.isArray(args)) { - options = _.extend(options, args); - args = []; + options = { + ...options, + ...args, + } } + if (options.cwd) { - options.cwd = files.convertToOSPath(options.cwd); + options.cwd = convertToOSPath(options.cwd); } + // The child process close event is emitted when the stdio streams // have all terminated. If those streams are shared with other // processes, that means we won't receive a 'close' until all processes @@ -73,18 +96,18 @@ export function execFileAsync(command, args, const exitEvent = options.waitForClose ? 'close' : 'exit'; return new Promise((resolve, reject) => { - var child; + let child: ReturnType; + const spawnArgs: ReadonlyArray = Array.isArray(args) ? args : []; + const { cwd, env, stdio } = options; if (process.platform !== 'win32') { - child = child_process.spawn(command, args, - { cwd, env, stdio } = options); + child = child_process.spawn(command, spawnArgs, { cwd, env, stdio }); } else { // https://github.com/nodejs/node-v0.x-archive/issues/2318 - args.forEach(arg => { + spawnArgs.forEach(arg => { command += ' ' + arg; }); - child = child_process.exec(command, - { cwd, env, stdio } = options); + child = child_process.exec(command, { cwd, env }); } let capturedStdout = ''; @@ -93,7 +116,7 @@ export function execFileAsync(command, args, child.stdout.pipe(options.destination); } else { child.stdout.setEncoding('utf8'); - child.stdout.on('data', (data) => { + child.stdout.on('data', (data: string) => { capturedStdout += data; }); } @@ -102,12 +125,12 @@ export function execFileAsync(command, args, let capturedStderr = ''; if (child.stderr) { child.stderr.setEncoding('utf8'); - child.stderr.on('data', (data) => { + child.stderr.on('data', (data: string) => { capturedStderr += data; }); } - const errorCallback = (error) => { + const errorCallback = (error: NodeJS.ErrnoException) => { // Make sure we only receive one type of callback child.removeListener(exitEvent, exitCallback); @@ -115,7 +138,7 @@ export function execFileAsync(command, args, capturedStdout = capturedStdout.trim(); capturedStderr = capturedStderr.trim(); - _.extend(error, { + Object.assign(error, { pid: child.pid, stdout: capturedStdout, stderr: capturedStderr, @@ -131,7 +154,7 @@ export function execFileAsync(command, args, }; child.on('error', errorCallback); - const exitCallback = (code, signal) => { + const exitCallback = (code: number, signal: string) => { // Make sure we only receive one type of callback child.removeListener('error', errorCallback); @@ -143,20 +166,20 @@ export function execFileAsync(command, args, resolve(capturedStdout); } else { let errorMessage = `Command failed: ${command}`; - if (args) { - errorMessage += ` ${args.join(' ')}`; + if (spawnArgs) { + errorMessage += ` ${spawnArgs.join(' ')}`; } errorMessage += `\n${capturedStderr}`; const error = new Error(errorMessage); - _.extend(error, { + Object.assign(error, { pid: child.pid, stdout: capturedStdout, stderr: capturedStderr, status: code, signal: signal - }); + }) reject(error); } From a6d454b7609ebb7b9e5f1b983ad9724c84ba81ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Chiciuc=20Nicu=C8=99or?= Date: Fri, 26 Jul 2019 16:21:23 +0300 Subject: [PATCH 192/327] Convert `func-utils.js` to TypeScript (#10631) --- .eslintignore | 1 - tools/fs/watch.ts | 4 +-- tools/index.d.ts | 5 ++++ tools/utils/{func-utils.js => func-utils.ts} | 28 +++++++++++++------- 4 files changed, 26 insertions(+), 12 deletions(-) rename tools/utils/{func-utils.js => func-utils.ts} (71%) diff --git a/.eslintignore b/.eslintignore index da029b9cfe..35d7c3491b 100644 --- a/.eslintignore +++ b/.eslintignore @@ -27,7 +27,6 @@ tools/deploy.js tools/fiber-helpers.js tools/fs/files.js tools/fs/mini-files.js -tools/func-utils.js tools/http-helpers.js tools/inspector.js tools/index.js diff --git a/tools/fs/watch.ts b/tools/fs/watch.ts index 34b479f585..6bba6af0e7 100644 --- a/tools/fs/watch.ts +++ b/tools/fs/watch.ts @@ -2,7 +2,7 @@ import { Stats, FSWatcher } from "fs"; import * as files from "./files"; import * as safeWatcher from "./safe-watcher"; import { createHash } from "crypto"; -import { coalesce } from "../utils/func-utils.js"; +import { coalesce } from "../utils/func-utils"; import { Profile } from "../tool-env/profile"; import { optimisticHashOrNull, @@ -520,7 +520,7 @@ export class Watcher { // additional calls if they happen within that window of time, so that // a rapid succession of calls will tend to trigger only one inspection // of the file system. - return coalesce(WATCH_COALESCE_MS, () => { + return coalesce(WATCH_COALESCE_MS, () => { if (this.stopped) { return; } diff --git a/tools/index.d.ts b/tools/index.d.ts index 0d4e8e99f0..62c834e501 100644 --- a/tools/index.d.ts +++ b/tools/index.d.ts @@ -12,4 +12,9 @@ declare global { // moved into that package. await: () => T; } + + interface Function { + // func-utils.ts makes usage of this feature + displayName?: string; + } } diff --git a/tools/utils/func-utils.js b/tools/utils/func-utils.ts similarity index 71% rename from tools/utils/func-utils.js rename to tools/utils/func-utils.ts index 4509f06c8d..9e62961587 100644 --- a/tools/utils/func-utils.js +++ b/tools/utils/func-utils.ts @@ -1,14 +1,21 @@ +type EmptyFunction = () => void; +type AnyFunction = (...args: any[]) => any; + // Return a function that coalesceses calls to fn that occur within delay // milliseconds of each other, and prevents overlapping invocations of fn // by postponing the next invocation until after fn's fiber finishes. -exports.coalesce = function(delayMs, callback, context) { - var pending = false; - var inProgress = 0; +export function coalesce( + delayMs: number, + callback: EmptyFunction, + context?: TContext, +): EmptyFunction { + let pending = false; + let inProgress = 0; - delayMs = delayMs || 100; + const actualDelayMs = delayMs || 100; - function coalescingWrapper() { - var self = context || this; + function coalescingWrapper(this: TContext) { + const self = context || this; if (inProgress) { // Indicate that coalescingWrapper should be called again after the @@ -23,7 +30,7 @@ exports.coalesce = function(delayMs, callback, context) { } new Promise( - resolve => setTimeout(resolve, delayMs) + resolve => setTimeout(resolve, actualDelayMs) ).then(function thenCallback() { // Now that the timeout has fired, set inProgress to 1 so that // (until the callback is complete and we set inProgress to 0 again) @@ -48,13 +55,16 @@ exports.coalesce = function(delayMs, callback, context) { return wrap(coalescingWrapper, callback); }; -function wrap(wrapper, wrapped) { +function wrap< + TWrapper extends AnyFunction, + TWrapped extends AnyFunction, +>(wrapper: TWrapper, wrapped: TWrapped): TWrapper { // Allow the wrapper to be used as a constructor function, just in case // the wrapped function was meant to be used as a constructor. wrapper.prototype = wrapped.prototype; // https://medium.com/@cramforce/on-the-awesomeness-of-fn-displayname-9511933a714a - var name = wrapped.displayName || wrapped.name; + const name = wrapped.displayName || wrapped.name; if (name) { wrapper.displayName = name; } From 26c0d5cf16255ab11011989903b2c040505a6f0e Mon Sep 17 00:00:00 2001 From: Michael Newman Date: Fri, 26 Jul 2019 06:22:19 -0700 Subject: [PATCH 193/327] Convert tools/console/progress.js to TypeScript (#10650) --- .eslintignore | 2 +- tools/console/README.md | 2 +- tools/console/progress.js | 231 ------------------------------------ tools/console/progress.ts | 227 +++++++++++++++++++++++++++++++++++ tools/utils/buildmessage.js | 4 +- 5 files changed, 231 insertions(+), 235 deletions(-) delete mode 100644 tools/console/progress.js create mode 100644 tools/console/progress.ts diff --git a/.eslintignore b/.eslintignore index 35d7c3491b..50cced0770 100644 --- a/.eslintignore +++ b/.eslintignore @@ -32,7 +32,7 @@ tools/inspector.js tools/index.js tools/mongo-exit-codes.ts tools/processes.ts -tools/progress.js +tools/progress.ts tools/project-context.js tools/runners/run-log.js tools/fs/safe-pathwatcher.js diff --git a/tools/console/README.md b/tools/console/README.md index 2dbcf52e7e..343bdee73f 100644 --- a/tools/console/README.md +++ b/tools/console/README.md @@ -1,6 +1,6 @@ This folder contains libs for printing output in response to CLI commands. -`progress.js` defines the lib for printing a progress-bar, so the long +`progress.ts` defines the lib for printing a progress-bar, so the long operations don't look like hanging. `console.js` exposes the `Console` singleton that should be used through-out the diff --git a/tools/console/progress.js b/tools/console/progress.js deleted file mode 100644 index 0ce5c1c780..0000000000 --- a/tools/console/progress.js +++ /dev/null @@ -1,231 +0,0 @@ -/// -/// utility functions for computing progress of complex tasks -/// -/// State callback here is an object with these keys: -/// done: bool, true if done -/// current: number, the current progress value -/// end: number, optional, the value of current where we expect to be done -/// -/// If end is not set, we'll display a spinner instead of a progress bar -/// - -var _ = require('underscore'); - -var Progress = function (options) { - var self = this; - - options = options || {}; - - self._lastState = null; - self._parent = options.parent; - self._watchers = options.watchers || []; - - self._title = options.title; - if (self._title) { - // Capitalize job titles when displayed in the progress bar. - self._title = self._title[0].toUpperCase() + self._title.slice(1); - } - - // XXX: Should we have a strict/mdg mode that enables this test? - //if (!self._title && self._parent) { - // throw new Error("No title passed"); - //} - - self._forkJoin = options.forkJoin; - - self._allTasks = []; - - self._selfState = { current: 0, done: false }; - self._state = _.clone(self._selfState); - - self._isDone = false; - - self.startTime = +(new Date); -}; - -_.extend(Progress.prototype, { - toString: function() { - var self = this; - return "Progress [state=" + JSON.stringify(self._state) + "]"; - }, - - reportProgressDone: function () { - var self = this; - - var state = _.clone(self._selfState); - state.done = true; - if (state.end !== undefined) { - if (state.current > state.end) { - state.end = state.current; - } - state.current = state.end; - } - self.reportProgress(state); - }, - - // Tries to determine which is the 'current' job in the tree - // This is very heuristical... we use some hints, like: - // don't descend into fork-join jobs; we know these execute concurrently, - // so we assume the top-level task has the title - // i.e. "Downloading packages", not "downloading supercool-1.0" - getCurrentProgress: function () { - var self = this; - - var isRoot = !self._parent; - - if (self._isDone) { - // A done task cannot be the active task - return null; - } - - if (!self._state.done && (self._state.current != 0) && self._state.end && - !isRoot) { - // We are not done and we have interesting state to report - return self; - } - - if (self._forkJoin) { - // Don't descend into fork-join tasks (by choice) - return self; - } - - if (self._allTasks.length) { - var candidates = _.map(self._allTasks, function (task) { - return task.getCurrentProgress(); - }); - var active = _.filter(candidates, function (s) { - return !!s; - }); - if (active.length) { - // pick one to display, somewhat arbitrarily - return active[active.length - 1]; - } - // No single active task, return self - return self; - } - - return self; - }, - - // Creates a subtask that must be completed as part of this (bigger) task - addChildTask: function (options) { - var self = this; - options = _.extend({ parent: self }, options || {}); - var child = new Progress(options); - self._allTasks.push(child); - self._reportChildState(child, child._state); - return child; - }, - - // Dumps the tree, for debug - dump: function (stream, options, prefix) { - var self = this; - - options = options || {}; - if (options.skipDone && self._isDone) { - return; - } - - if (prefix) { - stream.write(prefix); - } - var end = self._state.end; - if (!end) { - end = '?'; - } - stream.write("Task [" + self._title + "] " + self._state.current + "/" + end - + (self._isDone ? " done" : "") +"\n"); - if (self._allTasks.length) { - _.each(self._allTasks, function (child) { - child.dump(stream, options, (prefix || '') + ' '); - }); - } - }, - - // Receives a state report indicating progress of self - reportProgress: function (state) { - var self = this; - - self._selfState = state; - - self._updateTotalState(); - - // Nudge the spinner/progress bar, but don't yield (might not be safe to yield) - require('./console.js').Console.nudge(false); - - self._notifyState(); - }, - - // Subscribes a watcher to changes - addWatcher: function (watcher) { - var self = this; - - self._watchers.push(watcher); - }, - - // Notifies watchers & parents - _notifyState: function () { - var self = this; - - if (self._parent) { - self._parent._reportChildState(self, self._state); - } - - if (self._watchers.length) { - _.each(self._watchers, function (watcher) { - watcher(self._state); - }); - } - }, - - // Recomputes state, incorporating children's states - _updateTotalState: function () { - var self = this; - - var allChildrenDone = true; - var state = _.clone(self._selfState); - _.each(self._allTasks, function (child) { - var childState = child._state; - - if (!child._isDone) { - allChildrenDone = false; - } - - state.current += childState.current; - if (state.end !== undefined) { - if (childState.done) { - state.end += childState.current; - } else if (childState.end !== undefined) { - state.end += childState.end; - } else { - state.end = undefined; - } - } - }); - self._isDone = allChildrenDone && !!self._selfState.done; - if (!allChildrenDone) { - state.done = false; - } - - if (!state.done && self._state.done) { - // This shouldn't happen - throw new Error("Progress transition from done => !done"); - } - - self._state = state; - }, - - // Called by a child when its state changes - _reportChildState: function (child, state) { - var self = this; - - self._updateTotalState(); - self._notifyState(); - }, - - getState: function() { - return this._state; - } -}); - -exports.Progress = Progress; diff --git a/tools/console/progress.ts b/tools/console/progress.ts new file mode 100644 index 0000000000..58e1f64d76 --- /dev/null +++ b/tools/console/progress.ts @@ -0,0 +1,227 @@ +type ProgressWatcher = (state: ProgressState) => void; + +type ProgressOptions = { + parent?: Progress; + watchers?: ProgressWatcher[]; + title?: string; + forkJoin?: boolean; +}; + +type ProgressState = { + done: boolean; // true if job is done + current: number; // the current progress value + end?: number; // the value of current where we expect to be done +}; + +/** + * Utility class for computing the progress of complex tasks. + * + * Watchers are invoked with a ProgressState object. + */ +export class Progress { + private title: string | null | void; + private isDone: boolean; + private forkJoin?: boolean; + + private parent?: Progress; + private watchers: ProgressWatcher[]; + + private selfState: ProgressState; + private state: ProgressState; + + private allTasks: Progress[]; + + constructor(options: ProgressOptions = {}) { + this.parent = options.parent; + this.watchers = options.watchers || []; + + this.title = options.title; + if (this.title) { + // Capitalize job titles when displayed in the progress bar. + this.title = this.title[0].toUpperCase() + this.title.slice(1); + } + + // XXX: Should we have a strict/mdg mode that enables this test? + //if (!this.title && this.parent) { + // throw new Error("No title passed"); + //} + + this.forkJoin = options.forkJoin; + + this.allTasks = []; + + this.selfState = { current: 0, done: false }; + this.state = {...this.selfState}; + + this.isDone = false; + } + + toString() { + return "Progress [state=" + JSON.stringify(this.state) + "]"; + } + + reportProgressDone() { + const state = { + ...this.selfState, + done: true, + }; + + if (typeof state.end !== 'undefined') { + if (state.current > state.end) { + state.end = state.current; + } + state.current = state.end; + } + + this.reportProgress(state); + } + + // Tries to determine which is the 'current' job in the tree + // This is very heuristical... we use some hints, like: + // don't descend into fork-join jobs; we know these execute concurrently, + // so we assume the top-level task has the title + // i.e. "Downloading packages", not "downloading supercool-1.0" + getCurrentProgress(): Progress | null { + const isRoot = !this.parent; + + if (this.isDone) { + // A done task cannot be the active task + return null; + } + + if (!this.state.done && (this.state.current !== 0) && this.state.end && + !isRoot) { + // We are not done and we have interesting state to report + return this; + } + + if (this.forkJoin) { + // Don't descend into fork-join tasks (by choice) + return this; + } + + if (this.allTasks.length) { + const active = this.allTasks + .map(task => task.getCurrentProgress()) + .filter(Boolean); + + if (active.length) { + // pick one to display, somewhat arbitrarily + return active[active.length - 1]; + } + + // No single active task, return self + return this; + } + + return this; + } + + // Creates a subtask that must be completed as part of this (bigger) task + addChildTask(options: ProgressOptions = {}) { + options = { + parent: this, + ...options, + }; + + const child = new Progress(options); + this.allTasks.push(child); + this.reportChildState(child, child.state); + + return child; + } + + // Dumps the tree, for debug + dump( + stream: NodeJS.WriteStream, + options: { skipDone?: boolean } = {}, + prefix: string, + ) { + if (options.skipDone && this.isDone) { + return; + } + + if (prefix) { + stream.write(prefix); + } + + const end = this.state.end; + stream.write("Task [" + this.title + "] " + this.state.current + "/" + (end || '?') + + (this.isDone ? " done" : "") +"\n"); + + this.allTasks.forEach(child => child.dump(stream, options, (prefix || '') + ' ')); + } + + // Receives a state report indicating progress of self + reportProgress(state: ProgressState) { + this.selfState = state; + + this.updateTotalState(); + + // Nudge the spinner/progress bar, but don't yield (might not be safe to yield) + require('./console.js').Console.nudge(false); + + this.notifyState(); + } + + // Subscribes a watcher to changes + addWatcher(watcher: (state: ProgressState) => void) { + this.watchers.push(watcher); + } + + // Notifies watchers & parents + private notifyState() { + if (this.parent) { + this.parent.reportChildState(this, this.state); + } + + this.watchers.forEach(watcher => watcher(this.state)); + } + + // Recomputes state, incorporating children's states + private updateTotalState() { + let allChildrenDone = true; + const state = {...this.selfState}; + + this.allTasks.forEach(child => { + const childState = child.state; + + if (!child.isDone) { + allChildrenDone = false; + } + + state.current += childState.current; + if (state.end !== undefined) { + if (childState.done) { + state.end += childState.current; + } else if (childState.end !== undefined) { + state.end += childState.end; + } else { + state.end = undefined; + } + } + }); + + this.isDone = allChildrenDone && !!this.selfState.done; + if (!allChildrenDone) { + state.done = false; + } + + if (!state.done && this.state.done) { + // This shouldn't happen + throw new Error("Progress transition from done => !done"); + } + + this.state = state; + } + + // Called by a child when its state changes + private reportChildState(_child: Progress, _state: ProgressState) { + this.updateTotalState(); + this.notifyState(); + } + + getState() { + return this.state; + } +} diff --git a/tools/utils/buildmessage.js b/tools/utils/buildmessage.js index 86cd6ca355..a591e9aa3c 100644 --- a/tools/utils/buildmessage.js +++ b/tools/utils/buildmessage.js @@ -2,7 +2,7 @@ var _ = require('underscore'); var files = require('../fs/files'); var parseStack = require('./parse-stack.js'); var fiberHelpers = require('./fiber-helpers.js'); -var Progress = require('../console/progress.js').Progress; +var Progress = require('../console/progress').Progress; var debugBuild = !!process.env.METEOR_DEBUG_BUILD; @@ -13,7 +13,7 @@ var debugBuild = !!process.env.METEOR_DEBUG_BUILD; // relative to that path. // // Jobs are used both for error handling (via buildmessage.capture) and to set -// the progress bar title (via progress.js). +// the progress bar title (via progress.ts). // // Job titles should begin with a lower-case letter (unless they begin with a // proper noun), so that they look correct in error messages which say "While From 40f0161574ea0892645abfc8132bd65c9d099cb6 Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Tue, 30 Jul 2019 13:21:51 -0400 Subject: [PATCH 194/327] Update npm to version 6.10.2, and pacote to 9.5.4. --- History.md | 6 +++--- scripts/build-dev-bundle-common.sh | 2 +- scripts/dev-bundle-tool-package.js | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/History.md b/History.md index 754101ea37..ddef5faee5 100644 --- a/History.md +++ b/History.md @@ -24,9 +24,9 @@ N/A * Node has been updated to version [8.16.0](https://nodejs.org/en/blog/release/v8.16.0/). -* The `npm` npm package has been updated to version 6.10.0, and our - [fork](https://github.com/meteor/pacote/tree/v9.5.1-meteor) of its - `pacote` dependency has been updated to version 9.5.1. +* The `npm` npm package has been updated to version 6.10.2, and our + [fork](https://github.com/meteor/pacote/tree/v9.5.4-meteor) of its + `pacote` dependency has been updated to version 9.5.4. * When bundling client code, the Meteor module system now prefers the `"module"` field in `package.json`, if defined. diff --git a/scripts/build-dev-bundle-common.sh b/scripts/build-dev-bundle-common.sh index 032977f695..29aaf2b45f 100644 --- a/scripts/build-dev-bundle-common.sh +++ b/scripts/build-dev-bundle-common.sh @@ -8,7 +8,7 @@ ARCH=$(uname -m) NODE_VERSION=8.16.0 MONGO_VERSION_64BIT=4.0.6 MONGO_VERSION_32BIT=3.2.22 -NPM_VERSION=6.10.0 +NPM_VERSION=6.10.2 # If we built Node from source on Jenkins, this is the build number. NODE_BUILD_NUMBER= diff --git a/scripts/dev-bundle-tool-package.js b/scripts/dev-bundle-tool-package.js index 10bf19ed68..a0bf0993e1 100644 --- a/scripts/dev-bundle-tool-package.js +++ b/scripts/dev-bundle-tool-package.js @@ -10,8 +10,8 @@ var packageJson = { dependencies: { // Explicit dependency because we are replacing it with a bundled version // and we want to make sure there are no dependencies on a higher version - npm: "6.10.0", - pacote: "https://github.com/meteor/pacote/tarball/74fafef8d16c3c5bdf4d3aca5123d49db63680e9", + npm: "6.10.2", + pacote: "https://github.com/meteor/pacote/tarball/bdd1a189f71142c9eb87c4298784e2f17746a5d7", "node-gyp": "5.0.1", "node-pre-gyp": "0.13.0", typescript: "3.5.3", From e4970854741136e61d1e93dc179ed4963e1cda83 Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Tue, 30 Jul 2019 13:36:57 -0400 Subject: [PATCH 195/327] Update meteor-babel and @babel/{runtime,parser} to latest versions. Among other benefits, this should address #10622. --- History.md | 4 +- .../.npm/package/npm-shrinkwrap.json | 162 +++++++++--------- packages/babel-compiler/package.js | 2 +- scripts/dev-bundle-server-package.js | 2 +- scripts/dev-bundle-tool-package.js | 4 +- 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 +- tools/static-assets/skel/package.json | 2 +- 10 files changed, 92 insertions(+), 92 deletions(-) diff --git a/History.md b/History.md index ddef5faee5..c27b28ca2b 100644 --- a/History.md +++ b/History.md @@ -8,7 +8,7 @@ N/A ### Migration Steps * Be sure to update the `@babel/runtime` npm package to its latest version - (currently 7.5.1): + (currently 7.5.5): ```sh meteor npm install @babel/runtime@latest ``` @@ -47,7 +47,7 @@ N/A * The `mongodb` npm package used by the `npm-mongo` Meteor package has been updated to version 3.2.7. -* The `meteor-babel` npm package has been updated to version 7.5.5, +* The `meteor-babel` npm package has been updated to version 7.5.7, enabling compilation of the `meteor/tools` codebase with TypeScript (specifically, version 3.5.3 of the `typescript` npm package). diff --git a/packages/babel-compiler/.npm/package/npm-shrinkwrap.json b/packages/babel-compiler/.npm/package/npm-shrinkwrap.json index 6f0777d1d1..3e0716f8de 100644 --- a/packages/babel-compiler/.npm/package/npm-shrinkwrap.json +++ b/packages/babel-compiler/.npm/package/npm-shrinkwrap.json @@ -2,14 +2,14 @@ "lockfileVersion": 1, "dependencies": { "@babel/code-frame": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.0.0.tgz", - "integrity": "sha512-OfC2uemaknXr87bdLUkWog7nYuliM9Ij5HUcajsVcMCpQrcLmtxRbVFTIqmcSkSeYRBFBRxs2FiUqFJDLdiebA==" + "version": "7.5.5", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.5.5.tgz", + "integrity": "sha512-27d4lZoomVyo51VegxI20xZPuSHusqbQag/ztrBC7wegWoQ1nLREPVSKSW8byhTlzTKyNE4ifaTA6lCp7JjpFw==" }, "@babel/core": { - "version": "7.5.0", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.5.0.tgz", - "integrity": "sha512-6Isr4X98pwXqHvtigw71CKgmhL1etZjPs5A67jL/w0TkLM9eqmFR40YrnJvEc1WnMZFsskjsmid8bHZyxKEAnw==", + "version": "7.5.5", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.5.5.tgz", + "integrity": "sha512-i4qoSr2KTtce0DmkuuQBV4AuQgGPUcPXMr9L5MyYAtk06z068lQ10a4O009fe5OB/DfNV+h+qqT7ddNV8UnRjg==", "dependencies": { "json5": { "version": "2.1.0", @@ -19,9 +19,9 @@ } }, "@babel/generator": { - "version": "7.5.0", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.5.0.tgz", - "integrity": "sha512-1TTVrt7J9rcG5PMjvO7VEG3FrEoEJNHxumRq66GemPmzboLWtIjjcJgk8rokuAS7IiRSpgVSu5Vb9lc99iJkOA==" + "version": "7.5.5", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.5.5.tgz", + "integrity": "sha512-ETI/4vyTSxTzGnU2c49XHv2zhExkv9JHLTwDAFz85kmcwuShvYG2H08FwgIguQf4JC75CBnXAUM5PqeF4fj0nQ==" }, "@babel/helper-annotate-as-pure": { "version": "7.0.0", @@ -44,14 +44,14 @@ "integrity": "sha512-l79boDFJ8S1c5hvQvG+rc+wHw6IuH7YldmRKsYtpbawsxURu/paVy57FZMomGK22/JckepaikOkY0MoAmdyOlQ==" }, "@babel/helper-create-class-features-plugin": { - "version": "7.5.0", - "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.5.0.tgz", - "integrity": "sha512-EAoMc3hE5vE5LNhMqDOwB1usHvmRjCDAnH8CD4PVkX9/Yr3W/tcz8xE8QvdZxfsFBDICwZnF2UTHIqslRpvxmA==" + "version": "7.5.5", + "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.5.5.tgz", + "integrity": "sha512-ZsxkyYiRA7Bg+ZTRpPvB6AbOFKTFFK4LrvTet8lInm0V468MWCaSYJE+I7v2z2r8KNLtYiV+K5kTCnR7dvyZjg==" }, "@babel/helper-define-map": { - "version": "7.4.4", - "resolved": "https://registry.npmjs.org/@babel/helper-define-map/-/helper-define-map-7.4.4.tgz", - "integrity": "sha512-IX3Ln8gLhZpSuqHJSnTNBWGDE9kdkTEWl21A/K7PQ00tseBwbqCHTvNLHSBd9M0R5rER4h5Rsvj9vw0R5SieBg==" + "version": "7.5.5", + "resolved": "https://registry.npmjs.org/@babel/helper-define-map/-/helper-define-map-7.5.5.tgz", + "integrity": "sha512-fTfxx7i0B5NJqvUOBBGREnrqbTxRh7zinBANpZXAVDlsZxYdclDp467G1sQ8VZYMnAURY3RpBUAgOYT9GfzHBg==" }, "@babel/helper-explode-assignable-expression": { "version": "7.1.0", @@ -74,9 +74,9 @@ "integrity": "sha512-VYk2/H/BnYbZDDg39hr3t2kKyifAm1W6zHRfhx8jGjIHpQEBv9dry7oQ2f3+J703TLu69nYdxsovl0XYfcnK4w==" }, "@babel/helper-member-expression-to-functions": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.0.0.tgz", - "integrity": "sha512-avo+lm/QmZlv27Zsi0xEor2fKcqWG56D5ae9dzklpIaY7cQMK5N8VSpaNVPPagiqmy7LrEjK1IWdGMOqPu5csg==" + "version": "7.5.5", + "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.5.5.tgz", + "integrity": "sha512-5qZ3D1uMclSNqYcXqiHoA0meVdv+xUEex9em2fqMnrk/scphGlGgg66zjMrPJESPwrFJ6sbfFQYUSa0Mz7FabA==" }, "@babel/helper-module-imports": { "version": "7.0.0", @@ -84,9 +84,9 @@ "integrity": "sha512-aP/hlLq01DWNEiDg4Jn23i+CXxW/owM4WpDLFUbpjxe4NS3BhLVZQ5i7E0ZrxuQ/vwekIeciyamgB1UIYxxM6A==" }, "@babel/helper-module-transforms": { - "version": "7.4.4", - "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.4.4.tgz", - "integrity": "sha512-3Z1yp8TVQf+B4ynN7WoHPKS8EkdTbgAEy0nU0rs/1Kw4pDgmvYH3rz3aI11KgxKCba2cn7N+tqzV1mY2HMN96w==" + "version": "7.5.5", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.5.5.tgz", + "integrity": "sha512-jBeCvETKuJqeiaCdyaheF40aXnnU1+wkSiUs/IQg3tB85up1LyL8x77ClY8qJpuRJUcXQo+ZtdNESmZl4j56Pw==" }, "@babel/helper-optimise-call-expression": { "version": "7.0.0", @@ -99,9 +99,9 @@ "integrity": "sha512-CYAOUCARwExnEixLdB6sDm2dIJ/YgEAKDM1MOeMeZu9Ld/bDgVo8aiWrXwcY7OBh+1Ea2uUcVRcxKk0GJvW7QA==" }, "@babel/helper-regex": { - "version": "7.4.4", - "resolved": "https://registry.npmjs.org/@babel/helper-regex/-/helper-regex-7.4.4.tgz", - "integrity": "sha512-Y5nuB/kESmR3tKjU8Nkn1wMGEx1tjJX076HBMeL3XLQCu6vA/YRzuTW0bbb+qRnXvQGn+d6Rx953yffl8vEy7Q==" + "version": "7.5.5", + "resolved": "https://registry.npmjs.org/@babel/helper-regex/-/helper-regex-7.5.5.tgz", + "integrity": "sha512-CkCYQLkfkiugbRDO8eZn6lRuR8kzZoGXCg3149iTk5se7g6qykSpy3+hELSwquhu+TgHn8nkLiBwHvNX8Hofcw==" }, "@babel/helper-remap-async-to-generator": { "version": "7.1.0", @@ -109,9 +109,9 @@ "integrity": "sha512-3fOK0L+Fdlg8S5al8u/hWE6vhufGSn0bN09xm2LXMy//REAF8kDCrYoOBKYmA8m5Nom+sV9LyLCwrFynA8/slg==" }, "@babel/helper-replace-supers": { - "version": "7.4.4", - "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.4.4.tgz", - "integrity": "sha512-04xGEnd+s01nY1l15EuMS1rfKktNF+1CkKmHoErDppjAAZL+IUBZpzT748x262HF7fibaQPhbvWUl5HeSt1EXg==" + "version": "7.5.5", + "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.5.5.tgz", + "integrity": "sha512-XvRFWrNnlsow2u7jXDuH4jDDctkxbS7gXssrP4q2nUD606ukXHRvydj346wmNg+zAgpFx4MWf4+usfC93bElJg==" }, "@babel/helper-simple-access": { "version": "7.1.0", @@ -129,9 +129,9 @@ "integrity": "sha512-o9fP1BZLLSrYlxYEYyl2aS+Flun5gtjTIG8iln+XuEzQTs0PLagAGSXUcqruJwD5fM48jzIEggCKpIfWTcR7pQ==" }, "@babel/helpers": { - "version": "7.5.1", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.5.1.tgz", - "integrity": "sha512-rVOTDv8sH8kNI72Unenusxw6u+1vEepZgLxeV+jHkhsQlYhzVhzL1EpfoWT7Ub3zpWSv2WV03V853dqsnyoQzA==" + "version": "7.5.5", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.5.5.tgz", + "integrity": "sha512-nRq2BUhxZFnfEn/ciJuhklHvFOqjJUD5wpx+1bxUF2axL9C+v4DE/dmp5sT2dKnpOs4orZWzpAZqlCy8QqE/7g==" }, "@babel/highlight": { "version": "7.5.0", @@ -139,9 +139,9 @@ "integrity": "sha512-7dV4eu9gBxoM0dAnj/BCFDW9LFU0zvTrkq0ugM7pnHEgguOEeOz1so2ZghEdzviYzQEED0r4EAgpsBChKy1TRQ==" }, "@babel/parser": { - "version": "7.5.0", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.5.0.tgz", - "integrity": "sha512-I5nW8AhGpOXGCCNYGc+p7ExQIBxRFnS2fd/d862bNOKvmoEPjYPcfIjsfdy0ujagYOIYPczKgD9l3FsgTkAzKA==" + "version": "7.5.5", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.5.5.tgz", + "integrity": "sha512-E5BN68cqR7dhKan1SfqgPGhQ178bkVKpXTPEXnFJBrEt8/DKRZlybmy+IgYLTeN7tp1R5Ccmbm2rBk17sHYU3g==" }, "@babel/plugin-proposal-async-generator-functions": { "version": "7.2.0", @@ -149,14 +149,14 @@ "integrity": "sha512-+Dfo/SCQqrwx48ptLVGLdE39YtWRuKc/Y9I5Fy0P1DDBB9lsAHpjcEJQt+4IifuSOSTLBKJObJqMvaO1pIE8LQ==" }, "@babel/plugin-proposal-class-properties": { - "version": "7.5.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.5.0.tgz", - "integrity": "sha512-9L/JfPCT+kShiiTTzcnBJ8cOwdKVmlC1RcCf9F0F9tERVrM4iWtWnXtjWCRqNm2la2BxO1MPArWNsU9zsSJWSQ==" + "version": "7.5.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.5.5.tgz", + "integrity": "sha512-AF79FsnWFxjlaosgdi421vmYG6/jg79bVD0dpD44QdgobzHKuLZ6S3vl8la9qIeSwGi8i1fS0O1mfuDAAdo1/A==" }, "@babel/plugin-proposal-object-rest-spread": { - "version": "7.5.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.5.1.tgz", - "integrity": "sha512-PVGXx5LYHcT7L4MdoE+rM5uq68IKlvU9lljVQ4OXY6aUEnGvezcGbM4VNY57Ug+3R2Zg/nYHlEdiWoIBoRA0mw==" + "version": "7.5.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.5.5.tgz", + "integrity": "sha512-F2DxJJSQ7f64FyTVl5cw/9MWn6naXGdk3Q3UhDbFEEHv+EilCPoeRD3Zh/Utx1CJz4uyKlQ4uH+bJPbEhMV7Zw==" }, "@babel/plugin-syntax-async-generators": { "version": "7.2.0", @@ -204,14 +204,14 @@ "integrity": "sha512-ntQPR6q1/NKuphly49+QiQiTN0O63uOwjdD6dhIjSWBI5xlrbUFh720TIpzBhpnrLfv2tNH/BXvLIab1+BAI0w==" }, "@babel/plugin-transform-block-scoping": { - "version": "7.4.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.4.4.tgz", - "integrity": "sha512-jkTUyWZcTrwxu5DD4rWz6rDB5Cjdmgz6z7M7RLXOJyCUkFBawssDGcGh8M/0FTSB87avyJI1HsTwUXp9nKA1PA==" + "version": "7.5.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.5.5.tgz", + "integrity": "sha512-82A3CLRRdYubkG85lKwhZB0WZoHxLGsJdux/cOVaJCJpvYFl1LVzAIFyRsa7CvXqW8rBM4Zf3Bfn8PHt5DP0Sg==" }, "@babel/plugin-transform-classes": { - "version": "7.4.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.4.4.tgz", - "integrity": "sha512-/e44eFLImEGIpL9qPxSRat13I5QNRgBLu2hOQJCF7VLy/otSM/sypV1+XaIw5+502RX/+6YaSAPmldk+nhHDPw==" + "version": "7.5.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.5.5.tgz", + "integrity": "sha512-U2htCNK/6e9K7jGyJ++1p5XRU+LJjrwtoiVn9SzRlDT2KubcZ11OOwy3s24TjHxPgxNwonCYP7U2K51uVYCMDg==" }, "@babel/plugin-transform-computed-properties": { "version": "7.2.0", @@ -249,9 +249,9 @@ "integrity": "sha512-xmHq0B+ytyrWJvQTc5OWAC4ii6Dhr0s22STOoydokG51JjWhyYo5mRPXoi+ZmtHQhZZwuXNN+GG5jy5UZZJxIQ==" }, "@babel/plugin-transform-object-super": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.2.0.tgz", - "integrity": "sha512-VMyhPYZISFZAqAPVkiYb7dUe2AsVi2/wCT5+wZdsNO31FojQJa9ns40hzZ6U9f50Jlq4w6qwzdBB2uwqZ00ebg==" + "version": "7.5.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.5.5.tgz", + "integrity": "sha512-un1zJQAhSosGFBduPgN/YFNvWVpRuHKU7IHBglLoLZsGmruJPOo6pbInneflUdmq7YvSVqhpPs5zdBvLnteltQ==" }, "@babel/plugin-transform-parameters": { "version": "7.4.4", @@ -289,9 +289,9 @@ "integrity": "sha512-gBKRh5qAaCWntnd09S8QC7r3auLCqq5DI6O0DlfoyDjslSBVqBibrMdsqO+Uhmx3+BlOmE/Kw1HFxmGbv0N9dA==" }, "@babel/plugin-transform-runtime": { - "version": "7.5.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-runtime/-/plugin-transform-runtime-7.5.0.tgz", - "integrity": "sha512-LmPIZOAgTLl+86gR9KjLXex6P/lRz1fWEjTz6V6QZMmKie51ja3tvzdwORqhHc4RWR8TcZ5pClpRWs0mlaA2ng==" + "version": "7.5.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-runtime/-/plugin-transform-runtime-7.5.5.tgz", + "integrity": "sha512-6Xmeidsun5rkwnGfMOp6/z9nSzWpHFNVr2Jx7kwoq4mVatQfQx5S56drBgEHF+XQbKOdIaOiMIINvp/kAwMN+w==" }, "@babel/plugin-transform-shorthand-properties": { "version": "7.2.0", @@ -329,9 +329,9 @@ "integrity": "sha512-oayxyPS4Zj+hF6Et11BwuBkmpgT/zMxyuZgFrMeZID6Hdh3dGlk4sHCAhdBCpuCKW2ppBfl2uCCetlrUIJRY3w==" }, "@babel/runtime": { - "version": "7.5.1", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.5.1.tgz", - "integrity": "sha512-g+hmPKs16iewFSmW57NkH9xpPkuYD1RV3UE2BCkXx9j+nhhRb9hsiSxPmEa67j35IecTQdn4iyMtHMbt5VoREg==" + "version": "7.5.5", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.5.5.tgz", + "integrity": "sha512-28QvEGyQyNkB0/m2B4FU7IEZGK2NUrcMtT6BZEFALTguLk+AUT6ofsHtPk5QyjAdUkpMJ+/Em+quwz4HOt30AQ==" }, "@babel/template": { "version": "7.4.4", @@ -339,19 +339,19 @@ "integrity": "sha512-CiGzLN9KgAvgZsnivND7rkA+AeJ9JB0ciPOD4U59GKbQP2iQl+olF1l76kJOupqidozfZ32ghwBEJDhnk9MEcw==" }, "@babel/traverse": { - "version": "7.5.0", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.5.0.tgz", - "integrity": "sha512-SnA9aLbyOCcnnbQEGwdfBggnc142h/rbqqsXcaATj2hZcegCl903pUD/lfpsNBlBSuWow/YDfRyJuWi2EPR5cg==" + "version": "7.5.5", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.5.5.tgz", + "integrity": "sha512-MqB0782whsfffYfSjH4TM+LMjrJnhCNEDMDIjeTpl+ASaUvxcjoiVCo/sM1GhS1pHOXYfWVCYneLjMckuUxDaQ==" }, "@babel/types": { - "version": "7.5.0", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.5.0.tgz", - "integrity": "sha512-UFpDVqRABKsW01bvw7/wSUe56uy6RXM5+VJibVVAybDGxEW25jdwiFJEf7ASvSaC7sN7rbE/l3cLp2izav+CtQ==" + "version": "7.5.5", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.5.5.tgz", + "integrity": "sha512-s63F9nJioLqOlW3UkyMd+BYhXt44YuaFm/VV0VwuteqjYwRrObkU7ra9pY4wAJR3oXi8hJrMcrcJdO/HH33vtw==" }, "acorn": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.2.0.tgz", - "integrity": "sha512-8oe72N3WPMjA+2zVG71Ia0nXZ8DpQH+QyyHO+p06jT8eg8FGG3FbcUIi8KziHlAfheJQZeoqbvq1mQSQHXKYLw==" + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.2.1.tgz", + "integrity": "sha512-JD0xT5FCRDNyjDda3Lrg/IxFscp9q4tiYtxE1/nOzlKCk7hIRuYjhq1kCNkbPjMRMZuFq20HNQn1I9k8Oj0E+Q==" }, "acorn-dynamic-import": { "version": "4.0.0", @@ -514,9 +514,9 @@ "integrity": "sha1-viQcqBQEAwZ4t0hxcyK4nQyP4oA=" }, "babel-preset-meteor": { - "version": "7.5.2", - "resolved": "https://registry.npmjs.org/babel-preset-meteor/-/babel-preset-meteor-7.5.2.tgz", - "integrity": "sha512-MB0UiWzyDZ/KhU8htSB3K7Yn43lG2dXKGOJBscnrJy42BA8XWTA2hoB91uQuewJPdC7bu9ztL4GAP6W/lyAHsA==" + "version": "7.5.5", + "resolved": "https://registry.npmjs.org/babel-preset-meteor/-/babel-preset-meteor-7.5.5.tgz", + "integrity": "sha512-Qdx8miwYtbadW9RiZ2WKqW9mD8A4FNbYsINFLmj4A4iq7ed9oTAqD5WbZHU8/mWYhZfn5aR4yBVb6GOt+FM/zA==" }, "babel-preset-minify": { "version": "0.5.0", @@ -599,9 +599,9 @@ "integrity": "sha512-8Mh9h6xViijj36g7Dxi+Y4S6hNGV96vcJZr/SrlHh1LR/pEn/8j/+qIBbs44YKl69Lrfctp4QD+AdWLTMqEZAQ==" }, "lodash": { - "version": "4.17.11", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.11.tgz", - "integrity": "sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg==" + "version": "4.17.15", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz", + "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==" }, "lodash.isplainobject": { "version": "4.0.6", @@ -619,9 +619,9 @@ "integrity": "sha512-6QK0OpF/phMz0Q2AxILkX2mFhi7m+WMwTRg0LQKq/WBB0cDP4rYH3Wp4/d3OTXlrPLVJT/RFqj8tFeAR4nk8AA==" }, "meteor-babel": { - "version": "7.5.5", - "resolved": "https://registry.npmjs.org/meteor-babel/-/meteor-babel-7.5.5.tgz", - "integrity": "sha512-3WUfWPoSL4MLVqi99JZrEb/mamWKRkEihLAqzr6IdCtznqc/fbSyOeeLuABZwgfHU/HkDLjhMymmDooEwV7v8g==" + "version": "7.5.7", + "resolved": "https://registry.npmjs.org/meteor-babel/-/meteor-babel-7.5.7.tgz", + "integrity": "sha512-eOmpvG/hhzbpbBnzM4RkW6zQD0D2oNaTtKH1a7WFWTscQuHh1kq5Pc/hstOyWpiBecDH6cdrxRgEsYdNwk4igg==" }, "meteor-babel-helpers": { "version": "0.0.3", @@ -669,14 +669,14 @@ "integrity": "sha512-LGZzkgtLY79GeXLm8Dp0BVLdQlWICzBnJz/ipWUgo59qBaZ+BHtq51P2q1uVZlppMuUAT37SDk39qUbjTWB7bA==" }, "regenerator-runtime": { - "version": "0.13.2", - "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.2.tgz", - "integrity": "sha512-S/TQAZJO+D3m9xeN1WTI8dLKBBiRgXBlTJvbWjCThHWZj9EvHK70Ff50/tYj2J/fvBY6JtFVwRuazHN2E7M9BA==" + "version": "0.13.3", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.3.tgz", + "integrity": "sha512-naKIZz2GQ8JWh///G7L3X6LaQUAMp2lvb1rvwwsURe/VXwD6VMfr+/1NuNw3ag8v2kY1aQ/go5SNn79O9JU7yw==" }, "regenerator-transform": { - "version": "0.14.0", - "resolved": "https://registry.npmjs.org/regenerator-transform/-/regenerator-transform-0.14.0.tgz", - "integrity": "sha512-rtOelq4Cawlbmq9xuMR5gdFmv7ku/sFoB7sRiywx7aq53bc52b4j6zvH7Te1Vt/X2YveDKnCGUbioieU7FEL3w==" + "version": "0.14.1", + "resolved": "https://registry.npmjs.org/regenerator-transform/-/regenerator-transform-0.14.1.tgz", + "integrity": "sha512-flVuee02C3FKRISbxhXl9mGzdbWUVHubl1SMaknjxkFB1/iqpJhArQUvRxOOPEc/9tAiX0BaQ28FJH10E4isSQ==" }, "regexpu-core": { "version": "4.5.4", @@ -746,9 +746,9 @@ "integrity": "sha1-yy4SAwZ+DI3h9hQJS5/kVwTqYAM=" }, "typescript": { - "version": "3.5.2", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.5.2.tgz", - "integrity": "sha512-7KxJovlYhTX5RaRbUdkAXN1KUZ8PwWlTzQdHV6xNqvuFOs7+WBo10TQUqT19Q/Jz2hk5v9TQDIhyLhhJY4p5AA==" + "version": "3.5.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.5.3.tgz", + "integrity": "sha512-ACzBtm/PhXBDId6a6sDJfroT2pOWt/oOnk4/dElG5G33ZL776N3Y6/6bKZJBFpd+b05F3Ct9qDjMeJmRWtE2/g==" }, "unicode-canonical-property-names-ecmascript": { "version": "1.0.4", diff --git a/packages/babel-compiler/package.js b/packages/babel-compiler/package.js index 0fbfa4669e..1ef4c16b9f 100644 --- a/packages/babel-compiler/package.js +++ b/packages/babel-compiler/package.js @@ -10,7 +10,7 @@ Package.describe({ }); Npm.depends({ - 'meteor-babel': '7.5.5', + 'meteor-babel': '7.5.7', 'json5': '2.1.0' }); diff --git a/scripts/dev-bundle-server-package.js b/scripts/dev-bundle-server-package.js index 394a87d5b9..8ecedcc886 100644 --- a/scripts/dev-bundle-server-package.js +++ b/scripts/dev-bundle-server-package.js @@ -14,7 +14,7 @@ var packageJson = { "meteor-promise": "0.8.7", promise: "8.0.2", reify: "0.20.12", - "@babel/parser": "7.5.0", + "@babel/parser": "7.5.5", "@types/underscore": "1.9.2", underscore: "1.9.1", "source-map-support": "https://github.com/meteor/node-source-map-support/tarball/1912478769d76e5df4c365e147f25896aee6375e", diff --git a/scripts/dev-bundle-tool-package.js b/scripts/dev-bundle-tool-package.js index a0bf0993e1..06b471059a 100644 --- a/scripts/dev-bundle-tool-package.js +++ b/scripts/dev-bundle-tool-package.js @@ -15,14 +15,14 @@ var packageJson = { "node-gyp": "5.0.1", "node-pre-gyp": "0.13.0", typescript: "3.5.3", - "meteor-babel": "7.5.5", + "meteor-babel": "7.5.7", // Keep the versions of these packages consistent with the versions // found in dev-bundle-server-package.js. "meteor-promise": "0.8.7", reify: "0.20.12", fibers: "3.1.1", // So that Babel can emit require("@babel/runtime/helpers/...") calls. - "@babel/runtime": "7.5.1", + "@babel/runtime": "7.5.5", // For backwards compatibility with isopackets that still depend on // babel-runtime rather than @babel/runtime. "babel-runtime": "7.0.0-beta.3", diff --git a/tools/static-assets/skel-bare/package.json b/tools/static-assets/skel-bare/package.json index 295e69100e..b200eb7385 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.5.0", + "@babel/runtime": "^7.5.5", "meteor-node-stubs": "^1.0.0" } } diff --git a/tools/static-assets/skel-full/package.json b/tools/static-assets/skel-full/package.json index 651b93cd76..0a702aaeb8 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.5.0", + "@babel/runtime": "^7.5.5", "meteor-node-stubs": "^1.0.0" }, "devDependencies": { diff --git a/tools/static-assets/skel-minimal/package.json b/tools/static-assets/skel-minimal/package.json index 0c8dd4b28f..271d68b460 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.5.0", + "@babel/runtime": "^7.5.5", "meteor-node-stubs": "^1.0.0" }, "meteor": { diff --git a/tools/static-assets/skel-react/package.json b/tools/static-assets/skel-react/package.json index 6b7df223f3..05274018a8 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.5.0", + "@babel/runtime": "^7.5.5", "meteor-node-stubs": "^1.0.0", "react": "^16.5.0", "react-dom": "^16.5.0" diff --git a/tools/static-assets/skel/package.json b/tools/static-assets/skel/package.json index 0c8dd4b28f..271d68b460 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.5.0", + "@babel/runtime": "^7.5.5", "meteor-node-stubs": "^1.0.0" }, "meteor": { From b68f057dc932498e78d74a4e754dc153eaa46f11 Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Tue, 30 Jul 2019 13:39:41 -0400 Subject: [PATCH 196/327] Bump $BUNDLE_VERSION to 8.16.0.24 before rebuilding dev bundle. --- meteor | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meteor b/meteor index cc8f497e07..798c9db903 100755 --- a/meteor +++ b/meteor @@ -1,6 +1,6 @@ #!/usr/bin/env bash -BUNDLE_VERSION=8.16.0.23 +BUNDLE_VERSION=8.16.0.24 # OS Check. Put here because here is where we download the precompiled # bundles that are arch specific. From d276ef7c30138b0362a271e14613cf0cbba88ede Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Tue, 30 Jul 2019 13:16:26 -0400 Subject: [PATCH 197/327] Bump package versions for 1.8.2-beta.16 release. --- packages/babel-compiler/package.js | 2 +- packages/babel-runtime/package.js | 2 +- packages/context/package.js | 2 +- packages/ecmascript-runtime-client/package.js | 2 +- packages/ecmascript-runtime-server/package.js | 2 +- packages/ecmascript/package.js | 2 +- packages/meteor-tool/package.js | 2 +- packages/modules-runtime/package.js | 2 +- packages/modules/package.js | 2 +- packages/mongo/package.js | 2 +- packages/npm-mongo/package.js | 2 +- packages/typescript/package.js | 2 +- scripts/admin/meteor-release-experimental.json | 2 +- 13 files changed, 13 insertions(+), 13 deletions(-) diff --git a/packages/babel-compiler/package.js b/packages/babel-compiler/package.js index 1ef4c16b9f..53d2539dfd 100644 --- a/packages/babel-compiler/package.js +++ b/packages/babel-compiler/package.js @@ -6,7 +6,7 @@ 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.4.0-beta182.16' + version: '7.4.0-beta182.17' }); Npm.depends({ diff --git a/packages/babel-runtime/package.js b/packages/babel-runtime/package.js index f851acd3b5..df480ad1f0 100644 --- a/packages/babel-runtime/package.js +++ b/packages/babel-runtime/package.js @@ -1,7 +1,7 @@ Package.describe({ name: "babel-runtime", summary: "Runtime support for output of Babel transpiler", - version: '1.4.0-beta182.16', + version: '1.4.0-beta182.17', documentation: 'README.md' }); diff --git a/packages/context/package.js b/packages/context/package.js index ae7b5d472b..39b2c88ca8 100644 --- a/packages/context/package.js +++ b/packages/context/package.js @@ -1,6 +1,6 @@ Package.describe({ name: "context", - version: "0.4.0-beta182.16", + version: "0.4.0-beta182.17", summary: "Manage contextual information without passing objects around", documentation: "README.md" }); diff --git a/packages/ecmascript-runtime-client/package.js b/packages/ecmascript-runtime-client/package.js index f6cee1be83..19a13bfa5a 100644 --- a/packages/ecmascript-runtime-client/package.js +++ b/packages/ecmascript-runtime-client/package.js @@ -1,6 +1,6 @@ Package.describe({ name: "ecmascript-runtime-client", - version: "0.9.0-beta182.16", + version: "0.9.0-beta182.17", summary: "Polyfills for new ECMAScript 2015 APIs like Map and Set", git: "https://github.com/meteor/meteor/tree/devel/packages/ecmascript-runtime-client", documentation: "README.md" diff --git a/packages/ecmascript-runtime-server/package.js b/packages/ecmascript-runtime-server/package.js index 1488309542..b89949b83e 100644 --- a/packages/ecmascript-runtime-server/package.js +++ b/packages/ecmascript-runtime-server/package.js @@ -1,6 +1,6 @@ Package.describe({ name: "ecmascript-runtime-server", - version: "0.8.0-beta182.16", + version: "0.8.0-beta182.17", summary: "Polyfills for new ECMAScript 2015 APIs like Map and Set", git: "https://github.com/meteor/meteor/tree/devel/packages/ecmascript-runtime-client", documentation: "README.md" diff --git a/packages/ecmascript/package.js b/packages/ecmascript/package.js index 724d984c0a..e1778d8050 100644 --- a/packages/ecmascript/package.js +++ b/packages/ecmascript/package.js @@ -1,6 +1,6 @@ Package.describe({ name: 'ecmascript', - version: '0.13.0-beta182.16', + version: '0.13.0-beta182.17', summary: 'Compiler plugin that supports ES2015+ in all .js files', documentation: 'README.md' }); diff --git a/packages/meteor-tool/package.js b/packages/meteor-tool/package.js index cda8e0a4c1..e62580a5a4 100644 --- a/packages/meteor-tool/package.js +++ b/packages/meteor-tool/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "The Meteor command-line tool", - version: '1.8.2-beta.16' + version: '1.8.2-beta.17' }); Package.includeTool(); diff --git a/packages/modules-runtime/package.js b/packages/modules-runtime/package.js index 0968f33741..d0841da3d7 100644 --- a/packages/modules-runtime/package.js +++ b/packages/modules-runtime/package.js @@ -1,6 +1,6 @@ Package.describe({ name: "modules-runtime", - version: "0.11.0-beta182.16", + version: "0.11.0-beta182.17", summary: "CommonJS module system", git: "https://github.com/benjamn/install", documentation: "README.md" diff --git a/packages/modules/package.js b/packages/modules/package.js index f21dd85a2d..c3900e976f 100644 --- a/packages/modules/package.js +++ b/packages/modules/package.js @@ -1,6 +1,6 @@ Package.describe({ name: "modules", - version: "0.14.0-beta182.16", + version: "0.14.0-beta182.17", summary: "CommonJS module system", documentation: "README.md" }); diff --git a/packages/mongo/package.js b/packages/mongo/package.js index 76e4cb51da..843bb6b3be 100644 --- a/packages/mongo/package.js +++ b/packages/mongo/package.js @@ -9,7 +9,7 @@ Package.describe({ summary: "Adaptor for using MongoDB and Minimongo over DDP", - version: '1.7.0-beta182.16' + version: '1.7.0-beta182.17' }); Npm.depends({ diff --git a/packages/npm-mongo/package.js b/packages/npm-mongo/package.js index d94297f6c5..bf864cb468 100644 --- a/packages/npm-mongo/package.js +++ b/packages/npm-mongo/package.js @@ -3,7 +3,7 @@ Package.describe({ summary: "Wrapper around the mongo npm package", - version: "3.2.0-beta182.16", + version: "3.2.0-beta182.17", documentation: null }); diff --git a/packages/typescript/package.js b/packages/typescript/package.js index 264726fbcc..7b8c5694c2 100644 --- a/packages/typescript/package.js +++ b/packages/typescript/package.js @@ -1,6 +1,6 @@ Package.describe({ name: "typescript", - version: "3.5.2-beta182.16", + version: "3.5.2-beta182.17", summary: "Compiler plugin that compiles TypeScript and ECMAScript in .ts and .tsx files", documentation: "README.md" }); diff --git a/scripts/admin/meteor-release-experimental.json b/scripts/admin/meteor-release-experimental.json index d7af115612..9cb09b643a 100644 --- a/scripts/admin/meteor-release-experimental.json +++ b/scripts/admin/meteor-release-experimental.json @@ -1,6 +1,6 @@ { "track": "METEOR", - "version": "1.8.2-beta.16", + "version": "1.8.2-beta.17", "recommended": false, "official": false, "description": "Meteor" From 177c68f68ce3c8cd20c1344b978901da6c982aae Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Thu, 5 Sep 2019 13:18:07 -0400 Subject: [PATCH 198/327] Update Node.js to version 8.16.1. https://nodejs.org/en/blog/release/v8.16.1/ https://github.com/nodejs/node/blob/master/doc/changelogs/CHANGELOG_V8.md#8.16.1 --- History.md | 2 +- scripts/build-dev-bundle-common.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/History.md b/History.md index c27b28ca2b..199f327bc0 100644 --- a/History.md +++ b/History.md @@ -22,7 +22,7 @@ N/A ### Changes * Node has been updated to version - [8.16.0](https://nodejs.org/en/blog/release/v8.16.0/). + [8.16.1](https://nodejs.org/en/blog/release/v8.16.1/). * The `npm` npm package has been updated to version 6.10.2, and our [fork](https://github.com/meteor/pacote/tree/v9.5.4-meteor) of its diff --git a/scripts/build-dev-bundle-common.sh b/scripts/build-dev-bundle-common.sh index 29aaf2b45f..9eb483d197 100644 --- a/scripts/build-dev-bundle-common.sh +++ b/scripts/build-dev-bundle-common.sh @@ -5,7 +5,7 @@ set -u UNAME=$(uname) ARCH=$(uname -m) -NODE_VERSION=8.16.0 +NODE_VERSION=8.16.1 MONGO_VERSION_64BIT=4.0.6 MONGO_VERSION_32BIT=3.2.22 NPM_VERSION=6.10.2 From 152afe6bdf0fa7884e8a8613f1369735181bf7e7 Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Thu, 5 Sep 2019 13:22:31 -0400 Subject: [PATCH 199/327] Update npm to v6.11.3 and pacote to v9.5.8. --- History.md | 6 +++--- scripts/build-dev-bundle-common.sh | 2 +- scripts/dev-bundle-tool-package.js | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/History.md b/History.md index 199f327bc0..7741ed080d 100644 --- a/History.md +++ b/History.md @@ -24,9 +24,9 @@ N/A * Node has been updated to version [8.16.1](https://nodejs.org/en/blog/release/v8.16.1/). -* The `npm` npm package has been updated to version 6.10.2, and our - [fork](https://github.com/meteor/pacote/tree/v9.5.4-meteor) of its - `pacote` dependency has been updated to version 9.5.4. +* The `npm` npm package has been updated to version 6.11.3, and our + [fork](https://github.com/meteor/pacote/tree/v9.5.8-meteor) of its + `pacote` dependency has been updated to version 9.5.8. * When bundling client code, the Meteor module system now prefers the `"module"` field in `package.json`, if defined. diff --git a/scripts/build-dev-bundle-common.sh b/scripts/build-dev-bundle-common.sh index 9eb483d197..c1810b44a8 100644 --- a/scripts/build-dev-bundle-common.sh +++ b/scripts/build-dev-bundle-common.sh @@ -8,7 +8,7 @@ ARCH=$(uname -m) NODE_VERSION=8.16.1 MONGO_VERSION_64BIT=4.0.6 MONGO_VERSION_32BIT=3.2.22 -NPM_VERSION=6.10.2 +NPM_VERSION=6.11.3 # If we built Node from source on Jenkins, this is the build number. NODE_BUILD_NUMBER= diff --git a/scripts/dev-bundle-tool-package.js b/scripts/dev-bundle-tool-package.js index 06b471059a..014d312817 100644 --- a/scripts/dev-bundle-tool-package.js +++ b/scripts/dev-bundle-tool-package.js @@ -10,8 +10,8 @@ var packageJson = { dependencies: { // Explicit dependency because we are replacing it with a bundled version // and we want to make sure there are no dependencies on a higher version - npm: "6.10.2", - pacote: "https://github.com/meteor/pacote/tarball/bdd1a189f71142c9eb87c4298784e2f17746a5d7", + npm: "6.11.3", + pacote: "https://github.com/meteor/pacote/tarball/00b3b094e6074e45fc221d5bd96419d07ea34c6a", "node-gyp": "5.0.1", "node-pre-gyp": "0.13.0", typescript: "3.5.3", From d58fffdd0a4b5ddd464425808463379f07532909 Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Thu, 5 Sep 2019 13:23:47 -0400 Subject: [PATCH 200/327] Bump $BUNDLE_VERSION to 8.16.1.0 before rebuilding dev bundle. --- meteor | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meteor b/meteor index 798c9db903..6121059425 100755 --- a/meteor +++ b/meteor @@ -1,6 +1,6 @@ #!/usr/bin/env bash -BUNDLE_VERSION=8.16.0.24 +BUNDLE_VERSION=8.16.1.0 # OS Check. Put here because here is where we download the precompiled # bundles that are arch specific. From 5957e046fb4228feef34c4a518af8e634b666412 Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Thu, 5 Sep 2019 15:18:52 -0400 Subject: [PATCH 201/327] Prevent cordova-lib from using its own copy of graceful-fs. --- scripts/dev-bundle-tool-package.js | 1 + tools/cordova/index.js | 27 +++++++++++++++++++++++++++ 2 files changed, 28 insertions(+) diff --git a/scripts/dev-bundle-tool-package.js b/scripts/dev-bundle-tool-package.js index 014d312817..88b0fdc4c5 100644 --- a/scripts/dev-bundle-tool-package.js +++ b/scripts/dev-bundle-tool-package.js @@ -33,6 +33,7 @@ var packageJson = { semver: "5.4.1", request: "2.88.0", uuid: "3.3.2", + "graceful-fs": "4.2.2", fstream: "https://github.com/meteor/fstream/tarball/cf4ea6c175355cec7bee38311e170d08c4078a5d", tar: "2.2.1", kexec: "3.0.0", diff --git a/tools/cordova/index.js b/tools/cordova/index.js index 3038af4caf..7e7d76219a 100644 --- a/tools/cordova/index.js +++ b/tools/cordova/index.js @@ -2,6 +2,12 @@ import _ from 'underscore'; import assert from 'assert'; import utils from '../utils/utils.js'; import buildmessage from '../utils/buildmessage.js'; +import { + pathJoin, + statOrNull, + getDevBundle, + rm_recursive, +} from '../fs/files'; export const CORDOVA_ARCH = "web.cordova"; @@ -31,6 +37,27 @@ export function ensureDevBundleDependencies() { () => { require("../cli/dev-bundle-helpers.js") .ensureDependencies(CORDOVA_DEV_BUNDLE_VERSIONS); + + const cordovaNodeModulesDir = pathJoin( + getDevBundle(), + "lib", + "node_modules", + "cordova-lib", + "node_modules", + ); + + [ + // Remove these bundled packages in preference to + // dev_bundle/lib/node_modules/: + "graceful-fs", + pathJoin("npm", "node_modules", "graceful-fs"), + ].forEach(pkg => { + const path = pathJoin(cordovaNodeModulesDir, pkg); + const stat = statOrNull(path); + if (stat && stat.isDirectory()) { + rm_recursive(path); + } + }); } ); } From 4084848d2f324623b8ea771e4b81ada931bdfb85 Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Thu, 5 Sep 2019 16:18:55 -0400 Subject: [PATCH 202/327] Add files to unibuild.watchSet only if needed by unibuild.arch. Most importantly, this change means that changes to files not used by the server bundle will not trigger a server restart. Fixes #10449 by implementing the strategy I described in this comment: https://github.com/meteor/meteor/pull/10414#issuecomment-481293530 --- tools/isobuild/compiler-plugin.js | 21 +++++++++++++++++++-- tools/isobuild/compiler.js | 6 +++++- tools/isobuild/import-scanner.ts | 25 +------------------------ 3 files changed, 25 insertions(+), 27 deletions(-) diff --git a/tools/isobuild/compiler-plugin.js b/tools/isobuild/compiler-plugin.js index 51578287b7..5a674d7d6c 100644 --- a/tools/isobuild/compiler-plugin.js +++ b/tools/isobuild/compiler-plugin.js @@ -19,6 +19,8 @@ import Resolver from "./resolver"; import { optimisticStatOrNull, optimisticReadJsonOrNull, + optimisticHashOrNull, + shouldWatch, } from "../fs/optimistic"; import { isTestFilePath } from './test-files.js'; @@ -1267,7 +1269,7 @@ export class PackageSourceBatch { // In the unlikely event that no package is using the modules // package, then the map is already complete, and we don't need to // do any import scanning. - return map; + return this._watchOutputFiles(map); } // Append install() calls to the install-packages.js file in the @@ -1482,7 +1484,22 @@ export class PackageSourceBatch { } }); - return map; + return this._watchOutputFiles(map); + } + + static _watchOutputFiles(jsOutputFilesMap) { + // Watch all output files produced by computeJsOutputFilesMap. + jsOutputFilesMap.forEach(entry => { + entry.files.forEach(file => { + const absPath = file.absPath || + files.pathJoin(entry.batch.sourceRoot, file.sourcePath); + if (shouldWatch(absPath)) { + const hash = optimisticHashOrNull(absPath); + entry.batch.unibuild.watchSet.addFile(absPath, hash); + } + }); + }); + return jsOutputFilesMap; } static _warnAboutMissingModules(missingModules) { diff --git a/tools/isobuild/compiler.js b/tools/isobuild/compiler.js index 7f40e97800..2d3e9867e2 100644 --- a/tools/isobuild/compiler.js +++ b/tools/isobuild/compiler.js @@ -557,7 +557,11 @@ api.addAssets('${relPath}', 'client').`); const contents = optimisticReadFile(absPath); const hash = optimisticHashOrNull(absPath); const file = { contents, hash }; - watchSet.addFile(absPath, hash); + + // Watch only eager (non-lazy) files. + if (fileOptions && ! fileOptions.lazy) { + watchSet.addFile(absPath, hash); + } Console.nudge(true); diff --git a/tools/isobuild/import-scanner.ts b/tools/isobuild/import-scanner.ts index eee85adfb8..7e35f52b0d 100644 --- a/tools/isobuild/import-scanner.ts +++ b/tools/isobuild/import-scanner.ts @@ -4,7 +4,7 @@ import {Script} from "vm"; import { isString, isObject, isEmpty, has, keys, each, omit, } from "underscore"; -import {sha1, WatchSet} from "../fs/watch"; +import {sha1} from "../fs/watch"; import {matches as archMatches} from "../utils/archinfo"; import {findImportedModuleIdentifiers} from "./js-analyze.js"; import {cssToCommonJS} from "./css-modules"; @@ -36,7 +36,6 @@ import { optimisticStatOrNull, optimisticLStatOrNull, optimisticHashOrNull, - shouldWatch, } from "../fs/optimistic"; import { wrap } from "optimism"; @@ -275,7 +274,6 @@ export type ImportScannerOptions = { extensions: string[]; sourceRoot: string; nodeModulesPaths: string[]; - watchSet: WatchSet; cacheDir: string; } @@ -330,7 +328,6 @@ export default class ImportScanner { private bundleArch: string; private sourceRoot: string; private nodeModulesPaths: string[]; - private watchSet: WatchSet; private defaultHandlers: DefaultHandlers; private resolver: Resolver; @@ -346,14 +343,12 @@ export default class ImportScanner { extensions, sourceRoot, nodeModulesPaths = [], - watchSet, cacheDir, }: ImportScannerOptions) { this.name = name; this.bundleArch = bundleArch; this.sourceRoot = sourceRoot; this.nodeModulesPaths = nodeModulesPaths; - this.watchSet = watchSet; this.defaultHandlers = new DefaultHandlers({ cacheDir, @@ -1145,8 +1140,6 @@ export default class ImportScanner { hash: optimisticHashOrNull(absPath)!, }; - this.watchSet.addFile(absPath, info.hash); - // Same logic/comment as stripBOM in node/lib/module.js: // Remove byte order marker. This catches EF BB BF (the UTF-8 BOM) // because the buffer-to-string conversion in `fs.readFileSync()` @@ -1263,17 +1256,6 @@ export default class ImportScanner { absPath, }; - // If optimistic functions care about this file, e.g. because it - // resides in a linked npm package, then we should allow it to - // be watched even though we are replacing it with a stub that - // merely calls module.useNode(). - if (shouldWatch(absPath)) { - this.watchSet.addFile( - absPath, - optimisticHashOrNull(absPath), - ); - } - } else { rawFile = absModuleId.endsWith("/package.json") ? this.readPackageJson(absPath) @@ -1560,11 +1542,6 @@ export default class ImportScanner { this.addFile(pkgJsonPath, pkgFile); - const hash = optimisticHashOrNull(pkgJsonPath); - if (hash) { - this.watchSet.addFile(pkgJsonPath, hash); - } - this.resolvePkgJsonBrowserAliases(pkgFile); return pkgFile; From b3d88944ae5213bc33bc38d8cb20f57821624980 Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Fri, 6 Sep 2019 14:32:19 -0400 Subject: [PATCH 203/327] Explicitly track potentially unused WatchSet files. The previous implementation simply avoided calling watchSet.addFile for potentially unused files, trusting that addFile would be called later if the file was eventually used. However, this strategy left the contents of watchSet.files incomplete for tasks such as IsopackCache._checkUpToDate, which require full information about all files, even the ones that might not be used by the bundle. The new strategy maintains metadata about potentially unused files in a separate data structure, which will be merged/cloned/serialized/deserialized along with other WatchSet data. --- tools/fs/watch.ts | 79 +++++++++++++++++++++++++++++-- tools/isobuild/compiler-plugin.js | 17 +++++-- tools/isobuild/compiler.js | 6 ++- tools/runners/run-app.js | 11 ++++- 4 files changed, 103 insertions(+), 10 deletions(-) diff --git a/tools/fs/watch.ts b/tools/fs/watch.ts index 6bba6af0e7..70ae2f6bc6 100644 --- a/tools/fs/watch.ts +++ b/tools/fs/watch.ts @@ -105,10 +105,17 @@ export class WatchSet { public readonly directories: DirectoryEntry[] = []; public addFile(filePath: string, hash: string | null) { + // Calling addFile directly instead of addPotentiallyUnusedFile implies + // that the file will be used, so we can mark it as such here. Note that + // addPotentiallyUnusedFile overrides this value based on the alreadyUsed + // variable after calling this.addFile. + this.potentiallyUnusedFiles.delete(filePath); + // No need to update if this is in always-fire mode already. if (this.alwaysFire) { return; } + if (_.has(this.files, filePath)) { // Redundant? if (this.files[filePath] === hash) { @@ -118,9 +125,39 @@ export class WatchSet { this.alwaysFire = true; return; } + this.files[filePath] = hash; } + public hasFile(filePath: string): boolean { + return _.has(this.files, filePath); + } + + // Files added via addPotentiallyUnusedFile will be included in this Set + // until addFile is called at a later time, which removes them from the + // potentiallyUnusedFiles Set and prevents them from being considered as + // potentially unused in the future. Either way, this.files will have + // the same contents as if addFile was called instead, which is + // important for checks such as IsopackCache._checkUpToDate, which need + // to take everything (even potentially unused files) into account. + private potentiallyUnusedFiles = new Set(); + + public isDefinitelyUsed(filePath: string): boolean { + return this.hasFile(filePath) && ! this.isPotentiallyUnused(filePath); + } + + public isPotentiallyUnused(filePath: string): boolean { + return this.potentiallyUnusedFiles.has(filePath); + } + + public addPotentiallyUnusedFile(filePath: string, hash: string | null) { + const alreadyUsed = this.isDefinitelyUsed(filePath); + this.addFile(filePath, hash); + if (! alreadyUsed) { + this.potentiallyUnusedFiles.add(filePath); + } + } + public addDirectory({ absPath, include, @@ -151,7 +188,11 @@ export class WatchSet { } Object.keys(that.files).forEach(name => { - this.addFile(name, that.files[name]); + if (that.isPotentiallyUnused(name)) { + this.addPotentiallyUnusedFile(name, that.files[name]); + } else { + this.addFile(name, that.files[name]); + } }); that.directories.forEach(dir => { @@ -170,6 +211,10 @@ export class WatchSet { ret.files[name] = this.files[name]; }); + this.potentiallyUnusedFiles.forEach(name => { + ret.potentiallyUnusedFiles.add(name); + }); + // XXX doesn't bother to deep-clone the directory info // #WatchSetShallowClone this.directories.forEach(entry => { @@ -204,8 +249,14 @@ export class WatchSet { return r.source; } + const potentiallyUnusedFiles: string[] = []; + this.potentiallyUnusedFiles.forEach(name => { + potentiallyUnusedFiles.push(name); + }); + return { files: this.files, + potentiallyUnusedFiles, directories: this.directories.map(d => ({ absPath: d.absPath, include: d.include.map(reToJSON), @@ -232,6 +283,12 @@ export class WatchSet { watchSet.files[name] = json.files[name]; }); + if (Array.isArray(json.potentiallyUnusedFiles)) { + json.potentiallyUnusedFiles.forEach((name: string) => { + watchSet.potentiallyUnusedFiles.add(name); + }); + } + function reFromJSON(j: any) { if (j.$regex) { return new RegExp(j.$regex, j.$options); @@ -358,6 +415,7 @@ export class Watcher { private stopped = false; private justCheckOnce = false; private async = false; + private includePotentiallyUnusedFiles = true; private watches: Record any; async?: boolean; justCheckOnce?: boolean; + includePotentiallyUnusedFiles?: boolean; }) { this.async = !! options.async; this.watchSet = options.watchSet; this.onChange = options.onChange; this.justCheckOnce = !! options.justCheckOnce; + if (options.includePotentiallyUnusedFiles === false) { + this.includePotentiallyUnusedFiles = false; + } // Were we given an inconsistent WatchSet? Fire now and be done with it. if (this.watchSet.alwaysFire) { @@ -393,6 +455,13 @@ export class Watcher { return true; } + if ( + ! this.includePotentiallyUnusedFiles && + this.watchSet.isPotentiallyUnused(absPath) + ) { + return false; + } + const oldHash = this.watchSet.files[absPath]; if (typeof oldHash === "undefined") { throw new Error("Checking unknown file " + absPath); @@ -731,7 +800,10 @@ export class Watcher { // Given a WatchSet, returns true if it currently describes the state of the // disk. -export function isUpToDate(watchSet: WatchSet) { +export function isUpToDate( + watchSet: WatchSet, + includePotentiallyUnusedFiles = true +) { return Profile.time('watch.isUpToDate', () => { let upToDate = true; const watcher = new Watcher({ @@ -741,7 +813,8 @@ export function isUpToDate(watchSet: WatchSet) { }, // internal flag which prevents us from starting watches and timers that // we're about to cancel anyway - justCheckOnce: true + justCheckOnce: true, + includePotentiallyUnusedFiles, }); watcher.stop(); return upToDate; diff --git a/tools/isobuild/compiler-plugin.js b/tools/isobuild/compiler-plugin.js index 5a674d7d6c..66b26da0a2 100644 --- a/tools/isobuild/compiler-plugin.js +++ b/tools/isobuild/compiler-plugin.js @@ -20,7 +20,6 @@ import { optimisticStatOrNull, optimisticReadJsonOrNull, optimisticHashOrNull, - shouldWatch, } from "../fs/optimistic"; import { isTestFilePath } from './test-files.js'; @@ -1493,9 +1492,19 @@ export class PackageSourceBatch { entry.files.forEach(file => { const absPath = file.absPath || files.pathJoin(entry.batch.sourceRoot, file.sourcePath); - if (shouldWatch(absPath)) { - const hash = optimisticHashOrNull(absPath); - entry.batch.unibuild.watchSet.addFile(absPath, hash); + const watchSet = entry.batch.unibuild.watchSet; + if ( + // Blindly calling watchSet.addFile would be logically correct here, + // but we can save the cost of calling optimisticHashOrNull(absPath) + // if the watchSet already knows about the file and it was not marked + // as potentially unused. + ! watchSet.isDefinitelyUsed(absPath) + ) { + // If this file was previously added to the unibuild.watchSet using + // the addPotentiallyUnusedFile method (see compileUnibuild), calling + // addFile here will update its usage status to reflect that the + // ImportScanner did, in fact, end up "using" the file. + watchSet.addFile(absPath, optimisticHashOrNull(absPath)); } }); }); diff --git a/tools/isobuild/compiler.js b/tools/isobuild/compiler.js index 2d3e9867e2..c155efa8d8 100644 --- a/tools/isobuild/compiler.js +++ b/tools/isobuild/compiler.js @@ -558,9 +558,13 @@ api.addAssets('${relPath}', 'client').`); const hash = optimisticHashOrNull(absPath); const file = { contents, hash }; - // Watch only eager (non-lazy) files. if (fileOptions && ! fileOptions.lazy) { watchSet.addFile(absPath, hash); + } else { + // Lazy files might not ultimately be used by the current unibuild/bundle, + // so we add them to the watchSet using a provisional status that may be + // updated later, at the end of PackageSourceBatch.computeJsOutputFilesMap. + watchSet.addPotentiallyUnusedFile(absPath, hash); } Console.nudge(true); diff --git a/tools/runners/run-app.js b/tools/runners/run-app.js index 9c72e526ce..54b32cbf04 100644 --- a/tools/runners/run-app.js +++ b/tools/runners/run-app.js @@ -775,7 +775,8 @@ _.extend(AppRunner.prototype, { outcome: 'changed' }); }, - async: true + includePotentiallyUnusedFiles: false, + async: true, }); } @@ -784,7 +785,13 @@ _.extend(AppRunner.prototype, { clientWatcher = new watch.Watcher({ watchSet: bundleResult.clientWatchSet, onChange: function () { - var outcome = watch.isUpToDate(serverWatchSet) + // Pass false for the includePotentiallyUnusedFiles parameter (which + // defaults to true) to avoid restarting the server due to changes in + // files that were not used by the server bundle. This assumes we have + // already called PackageSourceBatch.computeJsOutputFilesMap and + // _watchOutputFiles to finalize the usage statuses of potentially + // unused files in serverWatchSet, which is a safe assumption here. + var outcome = watch.isUpToDate(serverWatchSet, false) ? 'changed-refreshable' // only a client asset has changed : 'changed'; // both a client and server asset changed self._resolvePromise('run', { outcome: outcome }); From 7155feaaa153abc8fb0307a80a77b27a892833ee Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Thu, 5 Sep 2019 18:55:57 -0400 Subject: [PATCH 204/327] Test dependency-tree-based client refresh detection. Part of #10686. --- tools/tests/apps/client-refresh/.gitignore | 1 + .../.meteor/.finished-upgraders | 18 +++ .../apps/client-refresh/.meteor/.gitignore | 1 + tools/tests/apps/client-refresh/.meteor/.id | 7 + .../apps/client-refresh/.meteor/packages | 18 +++ .../apps/client-refresh/.meteor/platforms | 2 + .../tests/apps/client-refresh/.meteor/release | 1 + .../apps/client-refresh/.meteor/versions | 54 ++++++++ .../tests/apps/client-refresh/client/main.css | 4 + .../apps/client-refresh/client/main.html | 21 +++ .../tests/apps/client-refresh/client/main.js | 2 + .../tests/apps/client-refresh/imports/both.js | 1 + tools/tests/apps/client-refresh/package.json | 20 +++ .../packages/test-package/README.md | 2 + .../packages/test-package/both.js | 1 + .../packages/test-package/client.js | 2 + .../packages/test-package/package.js | 12 ++ .../packages/test-package/server.js | 2 + .../tests/apps/client-refresh/server/main.js | 2 + tools/tests/client-refresh.js | 129 ++++++++++++++++++ 20 files changed, 300 insertions(+) create mode 100644 tools/tests/apps/client-refresh/.gitignore create mode 100644 tools/tests/apps/client-refresh/.meteor/.finished-upgraders create mode 100644 tools/tests/apps/client-refresh/.meteor/.gitignore create mode 100644 tools/tests/apps/client-refresh/.meteor/.id create mode 100644 tools/tests/apps/client-refresh/.meteor/packages create mode 100644 tools/tests/apps/client-refresh/.meteor/platforms create mode 100644 tools/tests/apps/client-refresh/.meteor/release create mode 100644 tools/tests/apps/client-refresh/.meteor/versions create mode 100644 tools/tests/apps/client-refresh/client/main.css create mode 100644 tools/tests/apps/client-refresh/client/main.html create mode 100644 tools/tests/apps/client-refresh/client/main.js create mode 100644 tools/tests/apps/client-refresh/imports/both.js create mode 100644 tools/tests/apps/client-refresh/package.json create mode 100644 tools/tests/apps/client-refresh/packages/test-package/README.md create mode 100644 tools/tests/apps/client-refresh/packages/test-package/both.js create mode 100644 tools/tests/apps/client-refresh/packages/test-package/client.js create mode 100644 tools/tests/apps/client-refresh/packages/test-package/package.js create mode 100644 tools/tests/apps/client-refresh/packages/test-package/server.js create mode 100644 tools/tests/apps/client-refresh/server/main.js create mode 100644 tools/tests/client-refresh.js diff --git a/tools/tests/apps/client-refresh/.gitignore b/tools/tests/apps/client-refresh/.gitignore new file mode 100644 index 0000000000..40b878db5b --- /dev/null +++ b/tools/tests/apps/client-refresh/.gitignore @@ -0,0 +1 @@ +node_modules/ \ No newline at end of file diff --git a/tools/tests/apps/client-refresh/.meteor/.finished-upgraders b/tools/tests/apps/client-refresh/.meteor/.finished-upgraders new file mode 100644 index 0000000000..4538749ab8 --- /dev/null +++ b/tools/tests/apps/client-refresh/.meteor/.finished-upgraders @@ -0,0 +1,18 @@ +# This file contains information which helps Meteor properly upgrade your +# app when you run 'meteor update'. You should check it into version control +# with your project. + +notices-for-0.9.0 +notices-for-0.9.1 +0.9.4-platform-file +notices-for-facebook-graph-api-2 +1.2.0-standard-minifiers-package +1.2.0-meteor-platform-split +1.2.0-cordova-changes +1.2.0-breaking-changes +1.3.0-split-minifiers-package +1.4.0-remove-old-dev-bundle-link +1.4.1-add-shell-server-package +1.4.3-split-account-service-packages +1.5-add-dynamic-import-package +1.7-split-underscore-from-meteor-base diff --git a/tools/tests/apps/client-refresh/.meteor/.gitignore b/tools/tests/apps/client-refresh/.meteor/.gitignore new file mode 100644 index 0000000000..4083037423 --- /dev/null +++ b/tools/tests/apps/client-refresh/.meteor/.gitignore @@ -0,0 +1 @@ +local diff --git a/tools/tests/apps/client-refresh/.meteor/.id b/tools/tests/apps/client-refresh/.meteor/.id new file mode 100644 index 0000000000..bb9b430463 --- /dev/null +++ b/tools/tests/apps/client-refresh/.meteor/.id @@ -0,0 +1,7 @@ +# This file contains a token that is unique to your project. +# Check it into your repository along with the rest of this directory. +# It can be used for purposes such as: +# - ensuring you don't accidentally deploy one app on top of another +# - providing package authors with aggregated statistics + +hc942wajsktj.cez67ut1n9qo diff --git a/tools/tests/apps/client-refresh/.meteor/packages b/tools/tests/apps/client-refresh/.meteor/packages new file mode 100644 index 0000000000..3e7e57d3b9 --- /dev/null +++ b/tools/tests/apps/client-refresh/.meteor/packages @@ -0,0 +1,18 @@ +# Meteor packages used by this project, one per line. +# Check this file (and the other files in this directory) into your repository. +# +# 'meteor add' and 'meteor remove' will edit this file for you, +# but you can also edit it by hand. + +meteor # Shared foundation for all Meteor packages +static-html # Define static page content in .html files +standard-minifier-css # CSS minifier run for production mode +standard-minifier-js # JS minifier run for production mode +es5-shim # ECMAScript 5 compatibility for older browsers +ecmascript # Enable ECMAScript2015+ syntax in app code +typescript # Enable TypeScript syntax in .ts and .tsx modules +shell-server # Server-side component of the `meteor shell` command +webapp # Serves a Meteor app over HTTP +server-render # Support for server-side rendering +test-package +autoupdate diff --git a/tools/tests/apps/client-refresh/.meteor/platforms b/tools/tests/apps/client-refresh/.meteor/platforms new file mode 100644 index 0000000000..efeba1b50c --- /dev/null +++ b/tools/tests/apps/client-refresh/.meteor/platforms @@ -0,0 +1,2 @@ +server +browser diff --git a/tools/tests/apps/client-refresh/.meteor/release b/tools/tests/apps/client-refresh/.meteor/release new file mode 100644 index 0000000000..621e94f0ec --- /dev/null +++ b/tools/tests/apps/client-refresh/.meteor/release @@ -0,0 +1 @@ +none diff --git a/tools/tests/apps/client-refresh/.meteor/versions b/tools/tests/apps/client-refresh/.meteor/versions new file mode 100644 index 0000000000..087c94fa51 --- /dev/null +++ b/tools/tests/apps/client-refresh/.meteor/versions @@ -0,0 +1,54 @@ +autoupdate@1.6.0 +babel-compiler@7.4.0-beta182.17 +babel-runtime@1.4.0-beta182.17 +base64@1.0.12 +blaze-tools@1.0.10 +boilerplate-generator@1.6.0 +caching-compiler@1.2.1 +caching-html-compiler@1.1.3 +callback-hook@1.1.0 +check@1.3.1 +ddp@1.4.0 +ddp-client@2.3.3 +ddp-common@1.4.0 +ddp-server@2.3.0 +diff-sequence@1.1.1 +dynamic-import@0.5.1 +ecmascript@0.13.0-beta182.17 +ecmascript-runtime@0.7.0 +ecmascript-runtime-client@0.9.0-beta182.17 +ecmascript-runtime-server@0.8.0-beta182.17 +ejson@1.1.0 +es5-shim@4.8.0 +fetch@0.1.1 +html-tools@1.0.11 +htmljs@1.0.11 +id-map@1.1.0 +inter-process-messaging@0.1.0 +logging@1.1.20 +meteor@1.9.3 +minifier-css@1.4.2 +minifier-js@2.4.1 +modern-browsers@0.1.4 +modules@0.14.0-beta182.17 +modules-runtime@0.11.0-beta182.17 +mongo-id@1.0.7 +promise@0.11.2 +random@1.1.0 +reload@1.3.0 +retry@1.1.0 +routepolicy@1.1.0 +server-render@0.3.1 +shell-server@0.4.0 +socket-stream-client@0.2.2 +spacebars-compiler@1.1.3 +standard-minifier-css@1.5.3 +standard-minifier-js@2.4.1 +static-html@1.2.2 +templating-tools@1.1.2 +test-package@0.0.1 +tracker@1.2.0 +typescript@3.5.2-beta182.17 +underscore@1.0.10 +webapp@1.7.4 +webapp-hashing@1.0.9 diff --git a/tools/tests/apps/client-refresh/client/main.css b/tools/tests/apps/client-refresh/client/main.css new file mode 100644 index 0000000000..7f354f0fa7 --- /dev/null +++ b/tools/tests/apps/client-refresh/client/main.css @@ -0,0 +1,4 @@ +body { + padding: 10px; + font-family: sans-serif; +} diff --git a/tools/tests/apps/client-refresh/client/main.html b/tools/tests/apps/client-refresh/client/main.html new file mode 100644 index 0000000000..19789db4de --- /dev/null +++ b/tools/tests/apps/client-refresh/client/main.html @@ -0,0 +1,21 @@ + + Minimal Meteor app + + + +

Minimal Meteor app

+

+ This Meteor app uses as few Meteor packages as possible, to keep the + client JavaScript bundle as small as possible. +

+ + + +

Learn Meteor!

+ + diff --git a/tools/tests/apps/client-refresh/client/main.js b/tools/tests/apps/client-refresh/client/main.js new file mode 100644 index 0000000000..4d7e4c693d --- /dev/null +++ b/tools/tests/apps/client-refresh/client/main.js @@ -0,0 +1,2 @@ +import "../imports/both"; +console.log(module.id, 0); diff --git a/tools/tests/apps/client-refresh/imports/both.js b/tools/tests/apps/client-refresh/imports/both.js new file mode 100644 index 0000000000..652a4168ea --- /dev/null +++ b/tools/tests/apps/client-refresh/imports/both.js @@ -0,0 +1 @@ +console.log(module.id, 0); diff --git a/tools/tests/apps/client-refresh/package.json b/tools/tests/apps/client-refresh/package.json new file mode 100644 index 0000000000..480a02abdf --- /dev/null +++ b/tools/tests/apps/client-refresh/package.json @@ -0,0 +1,20 @@ +{ + "name": "client-refresh", + "private": true, + "scripts": { + "start": "meteor run", + "test": "meteor test --once --driver-package meteortesting:mocha", + "test-app": "TEST_WATCH=1 meteor test --full-app --driver-package meteortesting:mocha", + "visualize": "meteor --production --extra-packages bundle-visualizer" + }, + "dependencies": { + "@babel/runtime": "^7.5.5", + "meteor-node-stubs": "^1.0.0" + }, + "meteor": { + "mainModule": { + "client": "client/main.js", + "server": "server/main.js" + } + } +} diff --git a/tools/tests/apps/client-refresh/packages/test-package/README.md b/tools/tests/apps/client-refresh/packages/test-package/README.md new file mode 100644 index 0000000000..8bb51bc3bf --- /dev/null +++ b/tools/tests/apps/client-refresh/packages/test-package/README.md @@ -0,0 +1,2 @@ +Helper package for testing that changes to files that are not used by the +server bundle do not trigger a server restart. diff --git a/tools/tests/apps/client-refresh/packages/test-package/both.js b/tools/tests/apps/client-refresh/packages/test-package/both.js new file mode 100644 index 0000000000..652a4168ea --- /dev/null +++ b/tools/tests/apps/client-refresh/packages/test-package/both.js @@ -0,0 +1 @@ +console.log(module.id, 0); diff --git a/tools/tests/apps/client-refresh/packages/test-package/client.js b/tools/tests/apps/client-refresh/packages/test-package/client.js new file mode 100644 index 0000000000..8e148648bb --- /dev/null +++ b/tools/tests/apps/client-refresh/packages/test-package/client.js @@ -0,0 +1,2 @@ +import "./both"; +console.log(module.id, 0); diff --git a/tools/tests/apps/client-refresh/packages/test-package/package.js b/tools/tests/apps/client-refresh/packages/test-package/package.js new file mode 100644 index 0000000000..d001a1fb7b --- /dev/null +++ b/tools/tests/apps/client-refresh/packages/test-package/package.js @@ -0,0 +1,12 @@ +Package.describe({ + name: 'test-package', + version: '0.0.1', + summary: '', + documentation: 'README.md' +}); + +Package.onUse(function(api) { + api.use('ecmascript'); + api.mainModule('client.js', 'client'); + api.mainModule('server.js', 'server'); +}); diff --git a/tools/tests/apps/client-refresh/packages/test-package/server.js b/tools/tests/apps/client-refresh/packages/test-package/server.js new file mode 100644 index 0000000000..8e148648bb --- /dev/null +++ b/tools/tests/apps/client-refresh/packages/test-package/server.js @@ -0,0 +1,2 @@ +import "./both"; +console.log(module.id, 0); diff --git a/tools/tests/apps/client-refresh/server/main.js b/tools/tests/apps/client-refresh/server/main.js new file mode 100644 index 0000000000..4d7e4c693d --- /dev/null +++ b/tools/tests/apps/client-refresh/server/main.js @@ -0,0 +1,2 @@ +import "../imports/both"; +console.log(module.id, 0); diff --git a/tools/tests/client-refresh.js b/tools/tests/client-refresh.js new file mode 100644 index 0000000000..e9958141a6 --- /dev/null +++ b/tools/tests/client-refresh.js @@ -0,0 +1,129 @@ +import * as selftest from '../tool-testing/selftest.js'; + +selftest.define("client refresh for package code", () => testHelper({ + client: { + path: "packages/test-package/client.js", + id: "/node_modules/meteor/test-package/client.js", + }, + server: { + path: "packages/test-package/server.js", + id: "/node_modules/meteor/test-package/server.js", + }, + both: { + path: "packages/test-package/both.js", + id: "/node_modules/meteor/test-package/both.js", + }, +})); + +selftest.define("client refresh for application code", () => testHelper({ + client: { + path: "client/main.js", + id: "/client/main.js", + }, + server: { + path: "server/main.js", + id: "/server/main.js", + }, + both: { + path: "imports/both.js", + id: "/imports/both.js", + }, +})); + +function testHelper(pathsAndIds) { + const s = new selftest.Sandbox(); + s.createApp("myapp", "client-refresh"); + s.cd("myapp"); + + let run = s.run(); + run.match("Started proxy"); + run.waitSecs(15); + + run.match(pathsAndIds.both.id + " 0"); + run.match(pathsAndIds.server.id + " 0"); + + function checkClientRefresh() { + run.match("Client modified -- refreshing"); + } + + function checkServerRestart(counts) { + run.match("Server modified -- restarting"); + if (typeof counts.both === "number") { + run.match(pathsAndIds.both.id + " " + counts.both); + } + if (typeof counts.server === "number") { + run.match(pathsAndIds.server.id + " " + counts.server); + } + run.match("Meteor server restarted"); + } + + increment(s, pathsAndIds.client.path); + checkClientRefresh(); + + increment(s, pathsAndIds.server.path); + checkServerRestart({ + both: 0, + server: 1, + }); + + increment(s, pathsAndIds.both.path); + checkServerRestart({ + both: 1, + server: 1, + }); + + increment(s, pathsAndIds.client.path); + checkClientRefresh(); + + s.write( + pathsAndIds.server.path, + // Comment out the import of ./both in the server file: + s.read(pathsAndIds.server.path).replace(/\bimport\b/, '//import'), + ); + checkServerRestart({ + server: 1, + }); + + increment(s, pathsAndIds.server.path); + checkServerRestart({ + server: 2, + }); + + increment(s, pathsAndIds.both.path); + checkClientRefresh(); + + increment(s, pathsAndIds.client.path); + checkClientRefresh(); + + s.write( + pathsAndIds.server.path, + // Uncomment the import of ./both in the server file: + s.read(pathsAndIds.server.path).replace(/\/\/import\b/, 'import'), + ); + checkServerRestart({ + both: 2, + server: 2, + }); + + increment(s, pathsAndIds.both.path); + checkServerRestart({ + both: 3, + server: 2, + }); + + increment(s, pathsAndIds.server.path); + checkServerRestart({ + both: 3, + server: 3, + }); + + increment(s, pathsAndIds.client.path); + checkClientRefresh(); +} + +function increment(s, path) { + s.write(path, s.read(path).replace( + /module.id, (\d+)/, + (match, n) => `module.id, ${ ++n }`, + )); +} From 72724fe745249bc0fc2cafb6f828f00b39d7caef Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Fri, 6 Sep 2019 17:41:23 -0400 Subject: [PATCH 205/327] Mention PR #10686 in History.md. --- History.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/History.md b/History.md index 7741ed080d..0d3bf10c0f 100644 --- a/History.md +++ b/History.md @@ -44,6 +44,14 @@ N/A See [PR #10603](https://github.com/meteor/meteor/pull/10603) for further explanation. +* The Meteor build process is now able to detect whether files changed in + development were actually used by the server bundle, so that a full + server restart can be avoided when no files used by the server bundle + have changed. Client-only refreshes are typically much faster than + server restarts. + [Issue #10449](https://github.com/meteor/meteor/issues/10449) + [PR #10686](https://github.com/meteor/meteor/pull/10686) + * The `mongodb` npm package used by the `npm-mongo` Meteor package has been updated to version 3.2.7. From 5a765e9b47506dc0733feb92fce30e256e78fc6d Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Fri, 6 Sep 2019 18:01:19 -0400 Subject: [PATCH 206/327] Update npm dependencies of minifier-css package. --- .../.npm/package/npm-shrinkwrap.json | 151 ++++++++++-------- packages/minifier-css/package.js | 6 +- .../plugin/minifyStdCSS/npm-shrinkwrap.json | 35 ++-- packages/standard-minifier-css/package.js | 8 +- 4 files changed, 106 insertions(+), 94 deletions(-) diff --git a/packages/minifier-css/.npm/package/npm-shrinkwrap.json b/packages/minifier-css/.npm/package/npm-shrinkwrap.json index 5d03701221..53b50ac44e 100644 --- a/packages/minifier-css/.npm/package/npm-shrinkwrap.json +++ b/packages/minifier-css/.npm/package/npm-shrinkwrap.json @@ -2,9 +2,9 @@ "lockfileVersion": 1, "dependencies": { "@types/q": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/@types/q/-/q-1.5.1.tgz", - "integrity": "sha512-eqz8c/0kwNi/OEHQfvIuJVLTst3in0e7uTKeuY+WL/zfKn0xVujOTp42bS/vUUokhK5P2BppLd9JXMOMHcgbjA==" + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/@types/q/-/q-1.5.2.tgz", + "integrity": "sha512-ce5d3q03Ex0sy4R14722Rmt6MT07Ua+k4FwDfdcToYJcMKNtRVQvJ6JCAPdAmAnbRb6CsX6aYb9m96NGod9uTw==" }, "alphanum-sort": { "version": "1.0.2", @@ -27,9 +27,9 @@ "integrity": "sha1-aN/1++YMUes3cl6p4+0xDcwed24=" }, "browserslist": { - "version": "4.4.2", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.4.2.tgz", - "integrity": "sha512-ISS/AIAiHERJ3d45Fz0AVYKkgcy+F/eJHzKEvv1j0wwKGKD9T3BrwKr/5g45L+Y4XIK5PlTqefHciRFcfE1Jxg==" + "version": "4.7.0", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.7.0.tgz", + "integrity": "sha512-9rGNDtnj+HaahxiVV38Gn8n8Lr8REKsel68v1sPFfIGEK6uSXTY3h9acgiT1dZVtOOUtifo/Dn8daDQ5dUgVsA==" }, "caller-callsite": { "version": "2.0.0", @@ -52,9 +52,9 @@ "integrity": "sha512-bsTwuIg/BZZK/vreVTYYbSWoe2F+71P7K5QGEX+pT250DZbfU1MQ5prOKpPR+LL6uWKK3KMwMCAS74QB3Um1uw==" }, "caniuse-lite": { - "version": "1.0.30000939", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30000939.tgz", - "integrity": "sha512-oXB23ImDJOgQpGjRv1tCtzAvJr4/OvrHi5SO2vUgB0g0xpdZZoA/BxfImiWfdwoYdUTtQrPsXsvYU/dmCSM8gg==" + "version": "1.0.30000989", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30000989.tgz", + "integrity": "sha512-vrMcvSuMz16YY6GSVZ0dWDTJP8jqk3iFQ/Aq5iqblPwxSVVZI+zxDyTX0VPqtQsDnfdrBDcsmhgTEOh5R8Lbpw==" }, "chalk": { "version": "2.4.2", @@ -74,9 +74,9 @@ "integrity": "sha512-q5/jG+YQnSy4nRTV4F7lPepBJZ8qBNJJDBuJdoejDyLXgmL7IEo+Le2JDZudFTFt7mrCqIRaSjws4ygRCTCAXA==" }, "color": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/color/-/color-3.1.0.tgz", - "integrity": "sha512-CwyopLkuRYO5ei2EpzpIh6LqJMt6Mt+jZhO5VI5f/wJLZriXQE32/SSqzmrh+QB+AZT81Cj8yv+7zwToW8ahZg==" + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/color/-/color-3.1.2.tgz", + "integrity": "sha512-vXTJhHebByxZn3lDvDJYw4lR5+uB3vuoHsuYA5AKuxRVn5wzzIfQKGLBmgdVRHKTJYeK5rvJcHnrd0Li49CFpg==" }, "color-convert": { "version": "1.9.3", @@ -94,9 +94,9 @@ "integrity": "sha512-dC2C5qeWoYkxki5UAXapdjqO672AM4vZuPGRQfO8b5HKuKGBbKWpITyDYN7TOFKvRW7kOgAn3746clDBMDJyQw==" }, "cosmiconfig": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-5.1.0.tgz", - "integrity": "sha512-kCNPvthka8gvLtzAxQXvWo4FxqRB+ftRZyPZNuab5ngvM9Y7yw7hbEysglptLgpkGX9nAOKTBVkHUAe8xtYR6Q==" + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-5.2.1.tgz", + "integrity": "sha512-H65gsXo1SKjf8zmrJ67eJk8aIRKV5ff2D4uKZIBZShbhGSpEmsQOPW/SKMKYhSTrqR7ufy6RP69rPogdaPh/kA==" }, "css-color-names": { "version": "0.0.4", @@ -119,9 +119,9 @@ "integrity": "sha512-jQVeeRG70QI08vSTwf1jHxp74JoZsr2XSgETae8/xC8ovSnL2WF87GTLO86Sbwdt2lK4Umg4HnnwMO4YF3Ce7w==" }, "css-tree": { - "version": "1.0.0-alpha.28", - "resolved": "https://registry.npmjs.org/css-tree/-/css-tree-1.0.0-alpha.28.tgz", - "integrity": "sha512-joNNW1gCp3qFFzj4St6zk+Wh/NBv0vM5YbEreZk0SD4S23S+1xBKb6cLDg2uj4P4k/GUMlIm6cKIDqIG+vdt0w==", + "version": "1.0.0-alpha.33", + "resolved": "https://registry.npmjs.org/css-tree/-/css-tree-1.0.0-alpha.33.tgz", + "integrity": "sha512-SPt57bh5nQnpsTBsx/IXbO14sRc9xXu5MtMAVuo0BaQQmyf0NupNPPSoMaqiAF5tDFafYsTkfeH4Q/HCKXkg4w==", "dependencies": { "source-map": { "version": "0.5.7", @@ -135,11 +135,6 @@ "resolved": "https://registry.npmjs.org/css-unit-converter/-/css-unit-converter-1.1.1.tgz", "integrity": "sha1-2bkoGtz9jO2TW9urqDeGiX9k6ZY=" }, - "css-url-regex": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/css-url-regex/-/css-url-regex-1.1.0.tgz", - "integrity": "sha1-g4NCMMyfdMRX3lnuvRVD/uuDt+w=" - }, "css-what": { "version": "2.1.3", "resolved": "https://registry.npmjs.org/css-what/-/css-what-2.1.3.tgz", @@ -151,9 +146,9 @@ "integrity": "sha512-MsCAG1z9lPdoO/IUMLSBWBSVxVtJ1395VGIQ+Fc2gNdkQ1hNDnQdw3YhA71WJCBW1vdwA0cAnk/DnW6bqoEUYg==" }, "cssnano": { - "version": "4.1.9", - "resolved": "https://registry.npmjs.org/cssnano/-/cssnano-4.1.9.tgz", - "integrity": "sha512-osEbYy4kzaNY3nkd92Uf3hy5Jqb5Aztuv+Ze3Z6DjRhyntZDlb3YljiYDdJ05k167U86CZpSR+rbuJYN7N3oBQ==" + "version": "4.1.10", + "resolved": "https://registry.npmjs.org/cssnano/-/cssnano-4.1.10.tgz", + "integrity": "sha512-5wny+F6H4/8RgNlaqab4ktc3e0/blKutmq8yNlBFXA//nSFFAqAngjNVRzUvCgYROULmZZUoosL/KSoZo5aUaQ==" }, "cssnano-preset-default": { "version": "4.0.7", @@ -190,6 +185,11 @@ "resolved": "https://registry.npmjs.org/css-tree/-/css-tree-1.0.0-alpha.29.tgz", "integrity": "sha512-sRNb1XydwkW9IOci6iB2xmy8IGCj6r/fr+JWitvJ2JxQRPzN3T4AGGVWCMlVmVwM1gtgALJRmGIlWv5ppnGGkg==" }, + "mdn-data": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-1.1.4.tgz", + "integrity": "sha512-FSYbp3lyKjyj3E7fMl6rYvUdX0FBXaluGqlFoYESWQlyUTq8R+wp0rkFxoYFqZlHCvsUXGjyJmLQSnXToYhOSA==" + }, "source-map": { "version": "0.5.7", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", @@ -203,9 +203,16 @@ "integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==" }, "dom-serializer": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-0.1.1.tgz", - "integrity": "sha512-l0IU0pPzLWSHBcieZbpOKgkIn3ts3vAh7ZuFyXNwJxJXk/c4Gwj9xaTJwIDVQCXawWD0qb3IzMGH5rglQaO0XA==" + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-0.2.1.tgz", + "integrity": "sha512-sK3ujri04WyjwQXVoK4PU3y8ula1stq10GJZpqHIUgoGZdsGzAGu65BnU3d08aTVSvO7mGPZUc0wTEDL+qGE0Q==", + "dependencies": { + "domelementtype": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.0.1.tgz", + "integrity": "sha512-5HOHUDsYZWV8FGWN0Njbr/Rn7f/eWSQi1v7+HsUVwXgn8nWWlL64zKDkS0n8ZmQ3mlWOMuXOnR+7Nx/5tMO5AQ==" + } + } }, "domelementtype": { "version": "1.3.1", @@ -223,14 +230,14 @@ "integrity": "sha512-tUMXrxlExSW6U2EXiiKGSBVdYgtV8qlHL+C10TsW4PURY/ic+eaysnSkwB4kA/mBlCyy/IKDJ+Lc3wbWeaXtuQ==" }, "electron-to-chromium": { - "version": "1.3.113", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.113.tgz", - "integrity": "sha512-De+lPAxEcpxvqPTyZAXELNpRZXABRxf+uL/rSykstQhzj/B0l1150G/ExIIxKc16lI89Hgz81J0BHAcbTqK49g==" + "version": "1.3.252", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.252.tgz", + "integrity": "sha512-NWJ5TztDnjExFISZHFwpoJjMbLUifsNBnx7u2JI0gCw6SbKyQYYWWtBHasO/jPtHym69F4EZuTpRNGN11MT/jg==" }, "entities": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/entities/-/entities-1.1.2.tgz", - "integrity": "sha512-f2LZMYl1Fzu7YSBKg+RoROelpOaNrcGmE9AZubeDfrCEia483oW4MI4VyFd5VNHIgQ/7qm1I0wUHK1eJnn2y2w==" + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/entities/-/entities-2.0.0.tgz", + "integrity": "sha512-D9f7V0JSRwIxlRI2mjMqufDrRDnx8p+eEOz7aUM9SuvF8gsBzra0/6tbjl1m8eQHrZlYj6PxqE00hZ1SAIKPLw==" }, "error-ex": { "version": "1.3.2", @@ -238,9 +245,9 @@ "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==" }, "es-abstract": { - "version": "1.13.0", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.13.0.tgz", - "integrity": "sha512-vDZfg/ykNxQVwup/8E1BZhVzFfBxs9NqMzGcvIJrqg5k2/5Za2bWo40dK2J1pgLngZ7c+Shh8lwYtLGyrwPutg==" + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.14.1.tgz", + "integrity": "sha512-cp/Tb1oA/rh2X7vqeSOvM+TSo3UkJLX70eNihgVEvnzwAgikjkTFr/QVgRCaxjm0knCNQzNoxxxcw2zO2LJdZA==" }, "es-to-primitive": { "version": "1.2.0", @@ -363,20 +370,15 @@ "integrity": "sha512-HS8bZ9ox60yCJLH9snBpIwv9pYUAkcuLhSA1oero1UB5y9aiQpRA8y2ex945AOtCZL1lJDeIk3G5LthswI46Lw==" }, "js-yaml": { - "version": "3.12.2", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.12.2.tgz", - "integrity": "sha512-QHn/Lh/7HhZ/Twc7vJYQTkjuCa0kaCcDcjK5Zlk2rvnUpy7DxMJ23+Jc2dcyvltwQVg1nygAVlB2oRDFHoRS5Q==" + "version": "3.13.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.1.tgz", + "integrity": "sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw==" }, "json-parse-better-errors": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz", "integrity": "sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==" }, - "lodash.get": { - "version": "4.4.2", - "resolved": "https://registry.npmjs.org/lodash.get/-/lodash.get-4.4.2.tgz", - "integrity": "sha1-LRd/ZS+jHpObRDjVNBSZ36OCXpk=" - }, "lodash.memoize": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-4.1.2.tgz", @@ -388,9 +390,9 @@ "integrity": "sha1-0CJTc662Uq3BvILklFM5qEJ1R3M=" }, "mdn-data": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-1.1.4.tgz", - "integrity": "sha512-FSYbp3lyKjyj3E7fMl6rYvUdX0FBXaluGqlFoYESWQlyUTq8R+wp0rkFxoYFqZlHCvsUXGjyJmLQSnXToYhOSA==" + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.0.4.tgz", + "integrity": "sha512-iV3XNKw06j5Q7mi6h+9vbx23Tv7JkjEVgKHW4pimwyDGWm0OIQntJJ+u1C6mg6mK1EaTv42XQ7w76yuzH7M2cA==" }, "minimist": { "version": "0.0.8", @@ -403,9 +405,9 @@ "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=" }, "node-releases": { - "version": "1.1.8", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.8.tgz", - "integrity": "sha512-gQm+K9mGCiT/NXHy+V/ZZS1N/LOaGGqRAAJJs3X9Ah1g+CIbRcBgNyoNYQ+SEtcyAtB9KqDruu+fF7nWjsqRaA==" + "version": "1.1.29", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.29.tgz", + "integrity": "sha512-R5bDhzh6I+tpi/9i2hrrvGJ3yKPYzlVOORDkXhnZuwi5D3q1I5w4vYy24PJXTcLk9Q0kws9TO77T75bcK8/ysQ==" }, "normalize-url": { "version": "3.3.0", @@ -417,10 +419,15 @@ "resolved": "https://registry.npmjs.org/nth-check/-/nth-check-1.0.2.tgz", "integrity": "sha512-WeBOdju8SnzPN5vTUJYxYUxLeXpCaVP5i5e0LF8fg7WORF2Wd7wFX/pk0tYZk7s8T+J7VLy0Da6J1+wCT0AtHg==" }, + "object-inspect": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.6.0.tgz", + "integrity": "sha512-GJzfBZ6DgDAmnuaM3104jR4s1Myxr3Y3zfIyN4z3UdqN69oSRacNK8UhnobDdC+7J2AHCjGwxQubNJfE70SXXQ==" + }, "object-keys": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.0.tgz", - "integrity": "sha512-6OO5X1+2tYkNyNEx6TsCxEqFfRWaqx6EtMiSbGrw8Ob8v9Ne+Hl8rBAgLBZn5wjEz3s/s6U1WXFUFOcxxAwUpg==" + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", + "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==" }, "object.getownpropertydescriptors": { "version": "2.0.3", @@ -438,9 +445,9 @@ "integrity": "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=" }, "postcss": { - "version": "7.0.14", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.14.tgz", - "integrity": "sha512-NsbD6XUUMZvBxtQAJuWDJeeC4QFsmWsfozWxCJPWf3M55K9iu2iMDaKqyoOdTJ1R4usBXuxlVFAIo8rZPQD4Bg==" + "version": "7.0.18", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.18.tgz", + "integrity": "sha512-/7g1QXXgegpF+9GJj4iN7ChGF40sYuGYJ8WZu8DZWnmhQ/G36hfdk3q9LBJmoK+lZ+yzZ5KYpOoxq7LF1BxE8g==" }, "postcss-calc": { "version": "7.0.1", @@ -627,9 +634,9 @@ "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==" }, "semver": { - "version": "5.6.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.6.0.tgz", - "integrity": "sha512-RS9R6R35NYgQn++fkDWaOmqGoj4Ek9gGs+DPxNUZKuwE183xjJroKvyo1IzVFeXvUrvmALy6FWD5xrdJT25gMg==" + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==" }, "simple-swizzle": { "version": "0.2.2", @@ -658,6 +665,16 @@ "resolved": "https://registry.npmjs.org/stable/-/stable-0.1.8.tgz", "integrity": "sha512-ji9qxRnOVfcuLDySj9qzhGSEFVobyt1kIOSkj1qZzYLzq7Tos/oUUWvotUPQLlrsidqsK6tBH89Bc9kL5zHA6w==" }, + "string.prototype.trimleft": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/string.prototype.trimleft/-/string.prototype.trimleft-2.0.0.tgz", + "integrity": "sha1-aLaqjhYsaoDnbjqKDC50cYbicf8=" + }, + "string.prototype.trimright": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/string.prototype.trimright/-/string.prototype.trimright-2.0.0.tgz", + "integrity": "sha1-q0pW2AKgH75yk+EehPJNyBZGYd0=" + }, "stylehacks": { "version": "4.0.3", "resolved": "https://registry.npmjs.org/stylehacks/-/stylehacks-4.0.3.tgz", @@ -676,9 +693,9 @@ "integrity": "sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ==" }, "svgo": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/svgo/-/svgo-1.2.0.tgz", - "integrity": "sha512-xBfxJxfk4UeVN8asec9jNxHiv3UAMv/ujwBWGYvQhhMb2u3YTGKkiybPcLFDLq7GLLWE9wa73e0/m8L5nTzQbw==" + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/svgo/-/svgo-1.3.0.tgz", + "integrity": "sha512-MLfUA6O+qauLDbym+mMZgtXCGRfIxyQoeH6IKVcFslyODEe/ElJNwr0FohQ3xG4C6HK6bk3KYPPXwHVJk3V5NQ==" }, "timsort": { "version": "0.3.0", @@ -706,9 +723,9 @@ "integrity": "sha512-i+6qA2MPhvoKLuxnJNpXAGhg7HphQOSUq2LKMZD0m15EiskXUkMvKdF4Uui0WYeCUGea+o2cw/ZuwehtfsrNkA==" }, "vendors": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/vendors/-/vendors-1.0.2.tgz", - "integrity": "sha512-w/hry/368nO21AN9QljsaIhb9ZiZtZARoVH5f3CsFbawdLdayCgKRPup7CggujvySMxx0I91NOyxdVENohprLQ==" + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/vendors/-/vendors-1.0.3.tgz", + "integrity": "sha512-fOi47nsJP5Wqefa43kyWSg80qF+Q3XA6MUkgi7Hp1HQaKDQW4cQrK2D0P7mmbFtsV1N89am55Yru/nyEwRubcw==" } } } diff --git a/packages/minifier-css/package.js b/packages/minifier-css/package.js index 1bfcbb840a..0542dc191d 100644 --- a/packages/minifier-css/package.js +++ b/packages/minifier-css/package.js @@ -1,11 +1,11 @@ Package.describe({ summary: 'CSS minifier', - version: '1.4.2' + version: '1.4.3' }); Npm.depends({ - postcss: '7.0.14', - cssnano: '4.1.9' + postcss: '7.0.18', + cssnano: '4.1.10' }); Package.onUse(function (api) { 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 22d680ad73..303fc30167 100644 --- a/packages/standard-minifier-css/.npm/plugin/minifyStdCSS/npm-shrinkwrap.json +++ b/packages/standard-minifier-css/.npm/plugin/minifyStdCSS/npm-shrinkwrap.json @@ -2,34 +2,29 @@ "lockfileVersion": 1, "dependencies": { "@babel/runtime": { - "version": "7.1.2", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.1.2.tgz", - "integrity": "sha512-Y3SCjmhSupzFB6wcv1KmmFucH6gDVnI30WjOcicV10ju0cZjak3Jcs67YLIXBrmZYw1xCrVeJPbycFwrqNyxpg==" + "version": "7.6.0", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.6.0.tgz", + "integrity": "sha512-89eSBLJsxNxOERC0Op4vd+0Bqm6wRMqMbFtV3i0/fbaWw/mJ8Q3eBvgX0G4SyrOOLCtbu98HspF8o09MRT+KzQ==" }, "lru-cache": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.3.tgz", - "integrity": "sha512-fFEhvcgzuIoJVUF8fYr5KR0YqxD238zgObTps31YdADwPPAp82a4M8TrckkWyx7ekNlf9aBcVn81cFwwXngrJA==" - }, - "pseudomap": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", - "integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM=" + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", + "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==" }, "regenerator-runtime": { - "version": "0.12.1", - "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.12.1.tgz", - "integrity": "sha512-odxIc1/vDlo4iZcfXqRYFj0vpXFNoGdKMAUieAlFYO6m/nl5e9KR/beGf41z4a1FI+aQgtjhuaSlDxQ0hmkrHg==" + "version": "0.13.3", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.3.tgz", + "integrity": "sha512-naKIZz2GQ8JWh///G7L3X6LaQUAMp2lvb1rvwwsURe/VXwD6VMfr+/1NuNw3ag8v2kY1aQ/go5SNn79O9JU7yw==" }, "source-map": { - "version": "0.5.6", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.6.tgz", - "integrity": "sha1-dc449SvwczxafwwRjYEzSiu19BI=" + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" }, "yallist": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz", - "integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=" + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.0.3.tgz", + "integrity": "sha512-S+Zk8DEWE6oKpV+vI3qWkaK+jSbIK86pCwe2IF/xwIpQ8jEuxpw9NyaGjmp9+BoJv5FV2piqCDcoCtStppiq2A==" } } } diff --git a/packages/standard-minifier-css/package.js b/packages/standard-minifier-css/package.js index 76871c97f9..1ae8621ddf 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.5.3', + version: '1.5.4', summary: 'Standard css minifier used with Meteor apps by default.', documentation: 'README.md' }); @@ -11,9 +11,9 @@ Package.registerBuildPlugin({ 'minifier-css' ], npmDependencies: { - "@babel/runtime": "7.1.2", - "source-map": "0.5.6", - "lru-cache": "4.1.3" + "@babel/runtime": "7.6.0", + "source-map": "0.6.1", + "lru-cache": "5.1.1" }, sources: [ 'plugin/minify-css.js' From e4101e1f0a6ac91b5ea39e50f9c77c6472193004 Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Fri, 6 Sep 2019 18:27:05 -0400 Subject: [PATCH 207/327] Go back to using LRU cache for findImportedModuleIdentifiers. Should fix #10674. May help with #10608. cc @houshuang @klaussner --- tools/isobuild/import-scanner.ts | 45 +++++++++++++++++++++++--------- 1 file changed, 32 insertions(+), 13 deletions(-) diff --git a/tools/isobuild/import-scanner.ts b/tools/isobuild/import-scanner.ts index 7e35f52b0d..64a8398cf0 100644 --- a/tools/isobuild/import-scanner.ts +++ b/tools/isobuild/import-scanner.ts @@ -251,6 +251,23 @@ function setImportedStatus(file: File, status: string | boolean) { } } +// Map from SHA (which is already calculated, so free for us) +// to the results of calling findImportedModuleIdentifiers. +// Each entry is an array of strings, and this is a case where +// the computation is expensive but the output is very small. +// The cache can be global because findImportedModuleIdentifiers +// is a pure function, and that way it applies across instances +// of ImportScanner (which do not persist across builds). +const LRU = require("lru-cache"); +const IMPORT_SCANNER_CACHE = new LRU({ + max: 1024*1024, + length(ids: Record) { + let total = 40; // size of key + each(ids, (_info, id) => { total += id.length; }); + return total; + } +}); + // Stub used for entry point modules within node_modules directories on // the server. These stub modules delegate to native Node evaluation by // calling module.useNode() immediately, but it's important that we have @@ -355,18 +372,6 @@ export default class ImportScanner { bundleArch, }); - const { - findImportedModuleIdentifiers, - } = this; - - this.findImportedModuleIdentifiers = wrap(file => { - return findImportedModuleIdentifiers.call(this, file); - }, { - makeCacheKey(file) { - return file.hash; - } - }); - this.resolver = Resolver.getOrCreate({ caller: "ImportScanner#constructor", sourceRoot, @@ -932,7 +937,21 @@ export default class ImportScanner { private findImportedModuleIdentifiers( file: File, ): Record { - return findImportedModuleIdentifiers(this.getDataString(file), file.hash); + if (IMPORT_SCANNER_CACHE.has(file.hash)) { + return IMPORT_SCANNER_CACHE.get(file.hash); + } + + const result = findImportedModuleIdentifiers( + this.getDataString(file), + file.hash, + ); + + // there should always be file.hash, but better safe than sorry + if (file.hash) { + IMPORT_SCANNER_CACHE.set(file.hash, result); + } + + return result; } private resolve( From cf5db3626ed8756966ccf716546cbfdca4e2b5b4 Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Fri, 6 Sep 2019 18:40:08 -0400 Subject: [PATCH 208/327] Update meteor-babel to version 7.6.0. --- History.md | 4 +- .../.npm/package/npm-shrinkwrap.json | 173 +++++++++--------- packages/babel-compiler/package.js | 2 +- scripts/dev-bundle-server-package.js | 2 +- scripts/dev-bundle-tool-package.js | 4 +- 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 +- tools/static-assets/skel/package.json | 2 +- 10 files changed, 102 insertions(+), 93 deletions(-) diff --git a/History.md b/History.md index 0d3bf10c0f..5594cdca5e 100644 --- a/History.md +++ b/History.md @@ -8,7 +8,7 @@ N/A ### Migration Steps * Be sure to update the `@babel/runtime` npm package to its latest version - (currently 7.5.5): + (currently 7.6.0): ```sh meteor npm install @babel/runtime@latest ``` @@ -55,7 +55,7 @@ N/A * The `mongodb` npm package used by the `npm-mongo` Meteor package has been updated to version 3.2.7. -* The `meteor-babel` npm package has been updated to version 7.5.7, +* The `meteor-babel` npm package has been updated to version 7.6.0, enabling compilation of the `meteor/tools` codebase with TypeScript (specifically, version 3.5.3 of the `typescript` npm package). diff --git a/packages/babel-compiler/.npm/package/npm-shrinkwrap.json b/packages/babel-compiler/.npm/package/npm-shrinkwrap.json index 3e0716f8de..9b2cff8a65 100644 --- a/packages/babel-compiler/.npm/package/npm-shrinkwrap.json +++ b/packages/babel-compiler/.npm/package/npm-shrinkwrap.json @@ -7,10 +7,15 @@ "integrity": "sha512-27d4lZoomVyo51VegxI20xZPuSHusqbQag/ztrBC7wegWoQ1nLREPVSKSW8byhTlzTKyNE4ifaTA6lCp7JjpFw==" }, "@babel/core": { - "version": "7.5.5", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.5.5.tgz", - "integrity": "sha512-i4qoSr2KTtce0DmkuuQBV4AuQgGPUcPXMr9L5MyYAtk06z068lQ10a4O009fe5OB/DfNV+h+qqT7ddNV8UnRjg==", + "version": "7.6.0", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.6.0.tgz", + "integrity": "sha512-FuRhDRtsd6IptKpHXAa+4WPZYY2ZzgowkbLBecEDDSje1X/apG7jQM33or3NdOmjXBKWGOg4JmSiRfUfuTtHXw==", "dependencies": { + "@babel/parser": { + "version": "7.6.0", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.6.0.tgz", + "integrity": "sha512-+o2q111WEx4srBs7L9eJmcwi655eD8sXniLqMB93TBK9GrNzGrxDWSjiqz2hLU0Ha8MTXFIP0yd9fNdP+m43ZQ==" + }, "json5": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/json5/-/json5-2.1.0.tgz", @@ -19,9 +24,9 @@ } }, "@babel/generator": { - "version": "7.5.5", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.5.5.tgz", - "integrity": "sha512-ETI/4vyTSxTzGnU2c49XHv2zhExkv9JHLTwDAFz85kmcwuShvYG2H08FwgIguQf4JC75CBnXAUM5PqeF4fj0nQ==" + "version": "7.6.0", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.6.0.tgz", + "integrity": "sha512-Ms8Mo7YBdMMn1BYuNtKuP/z0TgEIhbcyB8HVR6PPNYp4P61lMsABiS4A3VG1qznjXVCf3r+fVHhm4efTYVsySA==" }, "@babel/helper-annotate-as-pure": { "version": "7.0.0", @@ -44,9 +49,9 @@ "integrity": "sha512-l79boDFJ8S1c5hvQvG+rc+wHw6IuH7YldmRKsYtpbawsxURu/paVy57FZMomGK22/JckepaikOkY0MoAmdyOlQ==" }, "@babel/helper-create-class-features-plugin": { - "version": "7.5.5", - "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.5.5.tgz", - "integrity": "sha512-ZsxkyYiRA7Bg+ZTRpPvB6AbOFKTFFK4LrvTet8lInm0V468MWCaSYJE+I7v2z2r8KNLtYiV+K5kTCnR7dvyZjg==" + "version": "7.6.0", + "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.6.0.tgz", + "integrity": "sha512-O1QWBko4fzGju6VoVvrZg0RROCVifcLxiApnGP3OWfWzvxRZFCoBD81K5ur5e3bVY2Vf/5rIJm8cqPKn8HUJng==" }, "@babel/helper-define-map": { "version": "7.5.5", @@ -129,9 +134,9 @@ "integrity": "sha512-o9fP1BZLLSrYlxYEYyl2aS+Flun5gtjTIG8iln+XuEzQTs0PLagAGSXUcqruJwD5fM48jzIEggCKpIfWTcR7pQ==" }, "@babel/helpers": { - "version": "7.5.5", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.5.5.tgz", - "integrity": "sha512-nRq2BUhxZFnfEn/ciJuhklHvFOqjJUD5wpx+1bxUF2axL9C+v4DE/dmp5sT2dKnpOs4orZWzpAZqlCy8QqE/7g==" + "version": "7.6.0", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.6.0.tgz", + "integrity": "sha512-W9kao7OBleOjfXtFGgArGRX6eCP0UEcA2ZWEWNkJdRZnHhW4eEbeswbG3EwaRsnQUAEGWYgMq1HsIXuNNNy2eQ==" }, "@babel/highlight": { "version": "7.5.0", @@ -204,9 +209,9 @@ "integrity": "sha512-ntQPR6q1/NKuphly49+QiQiTN0O63uOwjdD6dhIjSWBI5xlrbUFh720TIpzBhpnrLfv2tNH/BXvLIab1+BAI0w==" }, "@babel/plugin-transform-block-scoping": { - "version": "7.5.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.5.5.tgz", - "integrity": "sha512-82A3CLRRdYubkG85lKwhZB0WZoHxLGsJdux/cOVaJCJpvYFl1LVzAIFyRsa7CvXqW8rBM4Zf3Bfn8PHt5DP0Sg==" + "version": "7.6.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.6.0.tgz", + "integrity": "sha512-tIt4E23+kw6TgL/edACZwP1OUKrjOTyMrFMLoT5IOFrfMRabCgekjqFd5o6PaAMildBu46oFkekIdMuGkkPEpA==" }, "@babel/plugin-transform-classes": { "version": "7.5.5", @@ -219,9 +224,9 @@ "integrity": "sha512-kP/drqTxY6Xt3NNpKiMomfgkNn4o7+vKxK2DDKcBG9sHj51vHqMBGy8wbDS/J4lMxnqs153/T3+DmCEAkC5cpA==" }, "@babel/plugin-transform-destructuring": { - "version": "7.5.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.5.0.tgz", - "integrity": "sha512-YbYgbd3TryYYLGyC7ZR+Tq8H/+bCmwoaxHfJHupom5ECstzbRLTch6gOQbhEY9Z4hiCNHEURgq06ykFv9JZ/QQ==" + "version": "7.6.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.6.0.tgz", + "integrity": "sha512-2bGIS5P1v4+sWTCnKNDZDxbGvEqi0ijeqM/YqHtVGrvG2y0ySgnEEhXErvE9dA0bnIzY9bIzdFK0jFA46ASIIQ==" }, "@babel/plugin-transform-exponentiation-operator": { "version": "7.2.0", @@ -244,9 +249,9 @@ "integrity": "sha512-2ThDhm4lI4oV7fVQ6pNNK+sx+c/GM5/SaML0w/r4ZB7sAneD/piDJtwdKlNckXeyGK7wlwg2E2w33C/Hh+VFCg==" }, "@babel/plugin-transform-modules-commonjs": { - "version": "7.5.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.5.0.tgz", - "integrity": "sha512-xmHq0B+ytyrWJvQTc5OWAC4ii6Dhr0s22STOoydokG51JjWhyYo5mRPXoi+ZmtHQhZZwuXNN+GG5jy5UZZJxIQ==" + "version": "7.6.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.6.0.tgz", + "integrity": "sha512-Ma93Ix95PNSEngqomy5LSBMAQvYKVe3dy+JlVJSHEXZR5ASL9lQBedMiCyVtmTLraIDVRE3ZjTZvmXXD2Ozw3g==" }, "@babel/plugin-transform-object-super": { "version": "7.5.5", @@ -289,9 +294,9 @@ "integrity": "sha512-gBKRh5qAaCWntnd09S8QC7r3auLCqq5DI6O0DlfoyDjslSBVqBibrMdsqO+Uhmx3+BlOmE/Kw1HFxmGbv0N9dA==" }, "@babel/plugin-transform-runtime": { - "version": "7.5.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-runtime/-/plugin-transform-runtime-7.5.5.tgz", - "integrity": "sha512-6Xmeidsun5rkwnGfMOp6/z9nSzWpHFNVr2Jx7kwoq4mVatQfQx5S56drBgEHF+XQbKOdIaOiMIINvp/kAwMN+w==" + "version": "7.6.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-runtime/-/plugin-transform-runtime-7.6.0.tgz", + "integrity": "sha512-Da8tMf7uClzwUm/pnJ1S93m/aRXmoYNDD7TkHua8xBDdaAs54uZpTWvEt6NGwmoVMb9mZbntfTqmG2oSzN/7Vg==" }, "@babel/plugin-transform-shorthand-properties": { "version": "7.2.0", @@ -329,29 +334,43 @@ "integrity": "sha512-oayxyPS4Zj+hF6Et11BwuBkmpgT/zMxyuZgFrMeZID6Hdh3dGlk4sHCAhdBCpuCKW2ppBfl2uCCetlrUIJRY3w==" }, "@babel/runtime": { - "version": "7.5.5", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.5.5.tgz", - "integrity": "sha512-28QvEGyQyNkB0/m2B4FU7IEZGK2NUrcMtT6BZEFALTguLk+AUT6ofsHtPk5QyjAdUkpMJ+/Em+quwz4HOt30AQ==" + "version": "7.6.0", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.6.0.tgz", + "integrity": "sha512-89eSBLJsxNxOERC0Op4vd+0Bqm6wRMqMbFtV3i0/fbaWw/mJ8Q3eBvgX0G4SyrOOLCtbu98HspF8o09MRT+KzQ==" }, "@babel/template": { - "version": "7.4.4", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.4.4.tgz", - "integrity": "sha512-CiGzLN9KgAvgZsnivND7rkA+AeJ9JB0ciPOD4U59GKbQP2iQl+olF1l76kJOupqidozfZ32ghwBEJDhnk9MEcw==" + "version": "7.6.0", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.6.0.tgz", + "integrity": "sha512-5AEH2EXD8euCk446b7edmgFdub/qfH1SN6Nii3+fyXP807QRx9Q73A2N5hNwRRslC2H9sNzaFhsPubkS4L8oNQ==", + "dependencies": { + "@babel/parser": { + "version": "7.6.0", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.6.0.tgz", + "integrity": "sha512-+o2q111WEx4srBs7L9eJmcwi655eD8sXniLqMB93TBK9GrNzGrxDWSjiqz2hLU0Ha8MTXFIP0yd9fNdP+m43ZQ==" + } + } }, "@babel/traverse": { - "version": "7.5.5", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.5.5.tgz", - "integrity": "sha512-MqB0782whsfffYfSjH4TM+LMjrJnhCNEDMDIjeTpl+ASaUvxcjoiVCo/sM1GhS1pHOXYfWVCYneLjMckuUxDaQ==" + "version": "7.6.0", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.6.0.tgz", + "integrity": "sha512-93t52SaOBgml/xY74lsmt7xOR4ufYvhb5c5qiM6lu4J/dWGMAfAh6eKw4PjLes6DI6nQgearoxnFJk60YchpvQ==", + "dependencies": { + "@babel/parser": { + "version": "7.6.0", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.6.0.tgz", + "integrity": "sha512-+o2q111WEx4srBs7L9eJmcwi655eD8sXniLqMB93TBK9GrNzGrxDWSjiqz2hLU0Ha8MTXFIP0yd9fNdP+m43ZQ==" + } + } }, "@babel/types": { - "version": "7.5.5", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.5.5.tgz", - "integrity": "sha512-s63F9nJioLqOlW3UkyMd+BYhXt44YuaFm/VV0VwuteqjYwRrObkU7ra9pY4wAJR3oXi8hJrMcrcJdO/HH33vtw==" + "version": "7.6.1", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.6.1.tgz", + "integrity": "sha512-X7gdiuaCmA0uRjCmRtYJNAVCc/q+5xSgsfKJHqMN4iNLILX39677fJE1O40arPMh0TTtS9ItH67yre6c7k6t0g==" }, "acorn": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.2.1.tgz", - "integrity": "sha512-JD0xT5FCRDNyjDda3Lrg/IxFscp9q4tiYtxE1/nOzlKCk7hIRuYjhq1kCNkbPjMRMZuFq20HNQn1I9k8Oj0E+Q==" + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.3.0.tgz", + "integrity": "sha512-/czfa8BwS88b9gWQVhc8eknunSA2DoJpJyTQkhheIf5E48u1N0R4q/YxxsAeqRrmK9TQ/uYfgLDfZo91UlANIA==" }, "acorn-dynamic-import": { "version": "4.0.0", @@ -414,9 +433,9 @@ "integrity": "sha512-Vj97CTn/lE9hR1D+jKUeHfNy+m1baNiJ1wJvoGyOBUx7F7kJqDZxr9nCHjO/Ad+irbR3HzR6jABpSSA29QsrXQ==" }, "babel-plugin-minify-dead-code-elimination": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/babel-plugin-minify-dead-code-elimination/-/babel-plugin-minify-dead-code-elimination-0.5.0.tgz", - "integrity": "sha512-XQteBGXlgEoAKc/BhO6oafUdT4LBa7ARi55mxoyhLHNuA+RlzRmeMAfc31pb/UqU01wBzRc36YqHQzopnkd/6Q==" + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/babel-plugin-minify-dead-code-elimination/-/babel-plugin-minify-dead-code-elimination-0.5.1.tgz", + "integrity": "sha512-x8OJOZIrRmQBcSqxBcLbMIK8uPmTvNWPXH2bh5MDCW1latEqYiRMuUkPImKcfpo59pTUB2FT7HfcgtG8ZlR5Qg==" }, "babel-plugin-minify-flip-comparisons": { "version": "0.4.3", @@ -424,9 +443,9 @@ "integrity": "sha1-AMqHDLjxO0XAOLPB68DyJyk8llo=" }, "babel-plugin-minify-guarded-expressions": { - "version": "0.4.3", - "resolved": "https://registry.npmjs.org/babel-plugin-minify-guarded-expressions/-/babel-plugin-minify-guarded-expressions-0.4.3.tgz", - "integrity": "sha1-zHCbRFP9IbHzAod0RMifiEJ845c=" + "version": "0.4.4", + "resolved": "https://registry.npmjs.org/babel-plugin-minify-guarded-expressions/-/babel-plugin-minify-guarded-expressions-0.4.4.tgz", + "integrity": "sha512-RMv0tM72YuPPfLT9QLr3ix9nwUIq+sHT6z8Iu3sLbqldzC1Dls8DPCywzUIzkTx9Zh1hWX4q/m9BPoPed9GOfA==" }, "babel-plugin-minify-infinity": { "version": "0.4.3", @@ -449,9 +468,9 @@ "integrity": "sha512-aXZiaqWDNUbyNNNpWs/8NyST+oU7QTpK7J9zFEFSA0eOmtUNMU3fczlTTTlnCxHmq/jYNFEmkkSG3DDBtW3Y4Q==" }, "babel-plugin-minify-simplify": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/babel-plugin-minify-simplify/-/babel-plugin-minify-simplify-0.5.0.tgz", - "integrity": "sha512-TM01J/YcKZ8XIQd1Z3nF2AdWHoDsarjtZ5fWPDksYZNsoOjQ2UO2EWm824Ym6sp127m44gPlLFiO5KFxU8pA5Q==" + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/babel-plugin-minify-simplify/-/babel-plugin-minify-simplify-0.5.1.tgz", + "integrity": "sha512-OSYDSnoCxP2cYDMk9gxNAed6uJDiDz65zgL6h8d3tm8qXIagWGMLWhqysT6DY3Vs7Fgq7YUDcjOomhVUb+xX6A==" }, "babel-plugin-minify-type-constructors": { "version": "0.4.3", @@ -514,14 +533,14 @@ "integrity": "sha1-viQcqBQEAwZ4t0hxcyK4nQyP4oA=" }, "babel-preset-meteor": { - "version": "7.5.5", - "resolved": "https://registry.npmjs.org/babel-preset-meteor/-/babel-preset-meteor-7.5.5.tgz", - "integrity": "sha512-Qdx8miwYtbadW9RiZ2WKqW9mD8A4FNbYsINFLmj4A4iq7ed9oTAqD5WbZHU8/mWYhZfn5aR4yBVb6GOt+FM/zA==" + "version": "7.6.0", + "resolved": "https://registry.npmjs.org/babel-preset-meteor/-/babel-preset-meteor-7.6.0.tgz", + "integrity": "sha512-YEuDJ3F8s8eLtv0Rpg9gD6xRa9gLYw6KiaZmYGyhj6VoyhEVAHFfzLd7aqE2KVlYYFowr/hi4BcqTE7hcu0ECQ==" }, "babel-preset-minify": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/babel-preset-minify/-/babel-preset-minify-0.5.0.tgz", - "integrity": "sha512-xj1s9Mon+RFubH569vrGCayA9Fm2GMsCgDRm1Jb8SgctOB7KFcrVc2o8K3YHUyMz+SWP8aea75BoS8YfsXXuiA==" + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/babel-preset-minify/-/babel-preset-minify-0.5.1.tgz", + "integrity": "sha512-1IajDumYOAPYImkHbrKeiN5AKKP9iOmRoO2IPbIuVp0j2iuCcj0n7P260z38siKMZZ+85d3mJZdtW8IgOv+Tzg==" }, "chalk": { "version": "2.4.2", @@ -559,9 +578,9 @@ "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=" }, "esutils": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.2.tgz", - "integrity": "sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs=" + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==" }, "function-bind": { "version": "1.1.1", @@ -603,25 +622,15 @@ "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz", "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==" }, - "lodash.isplainobject": { - "version": "4.0.6", - "resolved": "https://registry.npmjs.org/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz", - "integrity": "sha1-fFJqUtibRcRcxpC4gWO+BJf1UMs=" - }, - "lodash.some": { - "version": "4.6.0", - "resolved": "https://registry.npmjs.org/lodash.some/-/lodash.some-4.6.0.tgz", - "integrity": "sha1-G7nzFO9ri63tE7VJFpsqlF62jk0=" - }, "magic-string": { "version": "0.25.3", "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.25.3.tgz", "integrity": "sha512-6QK0OpF/phMz0Q2AxILkX2mFhi7m+WMwTRg0LQKq/WBB0cDP4rYH3Wp4/d3OTXlrPLVJT/RFqj8tFeAR4nk8AA==" }, "meteor-babel": { - "version": "7.5.7", - "resolved": "https://registry.npmjs.org/meteor-babel/-/meteor-babel-7.5.7.tgz", - "integrity": "sha512-eOmpvG/hhzbpbBnzM4RkW6zQD0D2oNaTtKH1a7WFWTscQuHh1kq5Pc/hstOyWpiBecDH6cdrxRgEsYdNwk4igg==" + "version": "7.6.0", + "resolved": "https://registry.npmjs.org/meteor-babel/-/meteor-babel-7.6.0.tgz", + "integrity": "sha512-LOFO4R6qoujjalVafJfSk/io9Mydj1tgAd8+b2f8a3f4dtaFxOp3ey99SrpDEjMdztOa1vMEEJbtGJ8ozoyENg==" }, "meteor-babel-helpers": { "version": "0.0.3", @@ -679,9 +688,9 @@ "integrity": "sha512-flVuee02C3FKRISbxhXl9mGzdbWUVHubl1SMaknjxkFB1/iqpJhArQUvRxOOPEc/9tAiX0BaQ28FJH10E4isSQ==" }, "regexpu-core": { - "version": "4.5.4", - "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-4.5.4.tgz", - "integrity": "sha512-BtizvGtFQKGPUcTy56o3nk1bGRp4SZOTYrDtGNlqCQufptV5IkkLN6Emw+yunAJjzf+C9FQFtvq7IoA3+oMYHQ==" + "version": "4.5.5", + "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-4.5.5.tgz", + "integrity": "sha512-FpI67+ky9J+cDizQUJlIlNZFKual/lUkFr1AG6zOCpwZ9cLrg8UUVakyUQJD7fCDIe9Z2nwTQJNPyonatNmDFQ==" }, "regjsgen": { "version": "0.5.0", @@ -706,9 +715,9 @@ "integrity": "sha512-4BzKwDWyJJbukwI6xIJRh+BDTitoGzxdgYPiQQ1zbcTZW6I8xgHPw1DnVuEs/mEZQlYm1e09DcFSApb4UaR5bQ==" }, "resolve": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.11.1.tgz", - "integrity": "sha512-vIpgF6wfuJOZI7KKKSP+HmiKggadPQAdsp5HiC1mvqnfp0gF1vdwgBWZIdrVft9pgqoMFQN+R7BSWZiBxx+BBw==" + "version": "1.12.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.12.0.tgz", + "integrity": "sha512-B/dOmuoAik5bKcD6s6nXDCjzUKnaDvdkRyAk6rsmsKLipWj4797iothd7jmmUhWTfinVMU+wc56rYKsit2Qy4w==" }, "safe-buffer": { "version": "5.1.2", @@ -716,9 +725,9 @@ "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" }, "semver": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.0.tgz", - "integrity": "sha512-Ya52jSX2u7QKghxeoFGpLwCtGlt7j0oY9DYb5apt9nPlJ42ID+ulTXESnt/qAQcoSERyZ5sl3LDIOw0nAn/5DA==" + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==" }, "source-map": { "version": "0.5.7", @@ -746,9 +755,9 @@ "integrity": "sha1-yy4SAwZ+DI3h9hQJS5/kVwTqYAM=" }, "typescript": { - "version": "3.5.3", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.5.3.tgz", - "integrity": "sha512-ACzBtm/PhXBDId6a6sDJfroT2pOWt/oOnk4/dElG5G33ZL776N3Y6/6bKZJBFpd+b05F3Ct9qDjMeJmRWtE2/g==" + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.6.2.tgz", + "integrity": "sha512-lmQ4L+J6mnu3xweP8+rOrUwzmN+MRAj7TgtJtDaXE5PMyX2kCrklhg3rvOsOIfNeAWMQWO2F1GPc1kMD2vLAfw==" }, "unicode-canonical-property-names-ecmascript": { "version": "1.0.4", diff --git a/packages/babel-compiler/package.js b/packages/babel-compiler/package.js index 53d2539dfd..3d996a46fc 100644 --- a/packages/babel-compiler/package.js +++ b/packages/babel-compiler/package.js @@ -10,7 +10,7 @@ Package.describe({ }); Npm.depends({ - 'meteor-babel': '7.5.7', + 'meteor-babel': '7.6.0', 'json5': '2.1.0' }); diff --git a/scripts/dev-bundle-server-package.js b/scripts/dev-bundle-server-package.js index 8ecedcc886..49d97c2d21 100644 --- a/scripts/dev-bundle-server-package.js +++ b/scripts/dev-bundle-server-package.js @@ -14,7 +14,7 @@ var packageJson = { "meteor-promise": "0.8.7", promise: "8.0.2", reify: "0.20.12", - "@babel/parser": "7.5.5", + "@babel/parser": "7.6.0", "@types/underscore": "1.9.2", underscore: "1.9.1", "source-map-support": "https://github.com/meteor/node-source-map-support/tarball/1912478769d76e5df4c365e147f25896aee6375e", diff --git a/scripts/dev-bundle-tool-package.js b/scripts/dev-bundle-tool-package.js index 88b0fdc4c5..4eff2d05e2 100644 --- a/scripts/dev-bundle-tool-package.js +++ b/scripts/dev-bundle-tool-package.js @@ -15,14 +15,14 @@ var packageJson = { "node-gyp": "5.0.1", "node-pre-gyp": "0.13.0", typescript: "3.5.3", - "meteor-babel": "7.5.7", + "meteor-babel": "7.6.0", // Keep the versions of these packages consistent with the versions // found in dev-bundle-server-package.js. "meteor-promise": "0.8.7", reify: "0.20.12", fibers: "3.1.1", // So that Babel can emit require("@babel/runtime/helpers/...") calls. - "@babel/runtime": "7.5.5", + "@babel/runtime": "7.6.0", // For backwards compatibility with isopackets that still depend on // babel-runtime rather than @babel/runtime. "babel-runtime": "7.0.0-beta.3", diff --git a/tools/static-assets/skel-bare/package.json b/tools/static-assets/skel-bare/package.json index b200eb7385..dcecedddd5 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.5.5", + "@babel/runtime": "^7.6.0", "meteor-node-stubs": "^1.0.0" } } diff --git a/tools/static-assets/skel-full/package.json b/tools/static-assets/skel-full/package.json index 0a702aaeb8..60004bb26a 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.5.5", + "@babel/runtime": "^7.6.0", "meteor-node-stubs": "^1.0.0" }, "devDependencies": { diff --git a/tools/static-assets/skel-minimal/package.json b/tools/static-assets/skel-minimal/package.json index 271d68b460..593d6791a6 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.5.5", + "@babel/runtime": "^7.6.0", "meteor-node-stubs": "^1.0.0" }, "meteor": { diff --git a/tools/static-assets/skel-react/package.json b/tools/static-assets/skel-react/package.json index 05274018a8..0ad424ec3c 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.5.5", + "@babel/runtime": "^7.6.0", "meteor-node-stubs": "^1.0.0", "react": "^16.5.0", "react-dom": "^16.5.0" diff --git a/tools/static-assets/skel/package.json b/tools/static-assets/skel/package.json index 271d68b460..593d6791a6 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.5.5", + "@babel/runtime": "^7.6.0", "meteor-node-stubs": "^1.0.0" }, "meteor": { From c8e322e197e84d89331d898f0b53c006db394b41 Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Fri, 6 Sep 2019 18:43:33 -0400 Subject: [PATCH 209/327] Update typescript version to 3.6.2. Most of these changes came for free with the update of meteor-babel to version 7.6.0, but a few remaining spots needed to be updated. --- History.md | 2 +- packages/typescript/package.js | 2 +- scripts/dev-bundle-tool-package.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/History.md b/History.md index 5594cdca5e..9f0ed14bec 100644 --- a/History.md +++ b/History.md @@ -57,7 +57,7 @@ N/A * The `meteor-babel` npm package has been updated to version 7.6.0, enabling compilation of the `meteor/tools` codebase with TypeScript - (specifically, version 3.5.3 of the `typescript` npm package). + (specifically, version 3.6.2 of the `typescript` npm package). * The `reify` npm package has been updated to version 0.20.12. diff --git a/packages/typescript/package.js b/packages/typescript/package.js index 7b8c5694c2..e026a2161e 100644 --- a/packages/typescript/package.js +++ b/packages/typescript/package.js @@ -1,6 +1,6 @@ Package.describe({ name: "typescript", - version: "3.5.2-beta182.17", + version: "3.6.2-beta182.17", 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 4eff2d05e2..fb23613d03 100644 --- a/scripts/dev-bundle-tool-package.js +++ b/scripts/dev-bundle-tool-package.js @@ -14,7 +14,7 @@ var packageJson = { pacote: "https://github.com/meteor/pacote/tarball/00b3b094e6074e45fc221d5bd96419d07ea34c6a", "node-gyp": "5.0.1", "node-pre-gyp": "0.13.0", - typescript: "3.5.3", + typescript: "3.6.2", "meteor-babel": "7.6.0", // Keep the versions of these packages consistent with the versions // found in dev-bundle-server-package.js. From 7bf1b3cbc52b908f76b29f93e91aba70d90ab5df Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Fri, 6 Sep 2019 18:45:04 -0400 Subject: [PATCH 210/327] Update 'meteor create --react' react[-dom] versions to 16.9.0. --- tools/static-assets/skel-react/package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/static-assets/skel-react/package.json b/tools/static-assets/skel-react/package.json index 0ad424ec3c..cb6cc1e070 100644 --- a/tools/static-assets/skel-react/package.json +++ b/tools/static-assets/skel-react/package.json @@ -10,8 +10,8 @@ "dependencies": { "@babel/runtime": "^7.6.0", "meteor-node-stubs": "^1.0.0", - "react": "^16.5.0", - "react-dom": "^16.5.0" + "react": "^16.9.0", + "react-dom": "^16.9.0" }, "meteor": { "mainModule": { From 9fb6b9cd895bf00f16c57358ecc837c12c0a2e48 Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Fri, 6 Sep 2019 18:49:16 -0400 Subject: [PATCH 211/327] Bump package versions for 1.8.2-beta.18 release. --- packages/babel-compiler/package.js | 2 +- packages/babel-runtime/package.js | 2 +- packages/context/package.js | 2 +- packages/ecmascript-runtime-client/package.js | 2 +- packages/ecmascript-runtime-server/package.js | 2 +- packages/ecmascript/package.js | 2 +- packages/meteor-tool/package.js | 2 +- packages/minifier-css/package.js | 2 +- packages/modules-runtime/package.js | 2 +- packages/modules/package.js | 2 +- packages/mongo/package.js | 2 +- packages/npm-mongo/package.js | 2 +- packages/standard-minifier-css/package.js | 2 +- packages/typescript/package.js | 2 +- scripts/admin/meteor-release-experimental.json | 2 +- 15 files changed, 15 insertions(+), 15 deletions(-) diff --git a/packages/babel-compiler/package.js b/packages/babel-compiler/package.js index 3d996a46fc..ab7b4ab25b 100644 --- a/packages/babel-compiler/package.js +++ b/packages/babel-compiler/package.js @@ -6,7 +6,7 @@ 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.4.0-beta182.17' + version: '7.4.0-beta182.18' }); Npm.depends({ diff --git a/packages/babel-runtime/package.js b/packages/babel-runtime/package.js index df480ad1f0..65805f40d9 100644 --- a/packages/babel-runtime/package.js +++ b/packages/babel-runtime/package.js @@ -1,7 +1,7 @@ Package.describe({ name: "babel-runtime", summary: "Runtime support for output of Babel transpiler", - version: '1.4.0-beta182.17', + version: '1.4.0-beta182.18', documentation: 'README.md' }); diff --git a/packages/context/package.js b/packages/context/package.js index 39b2c88ca8..412cee0167 100644 --- a/packages/context/package.js +++ b/packages/context/package.js @@ -1,6 +1,6 @@ Package.describe({ name: "context", - version: "0.4.0-beta182.17", + version: "0.4.0-beta182.18", summary: "Manage contextual information without passing objects around", documentation: "README.md" }); diff --git a/packages/ecmascript-runtime-client/package.js b/packages/ecmascript-runtime-client/package.js index 19a13bfa5a..da6effe196 100644 --- a/packages/ecmascript-runtime-client/package.js +++ b/packages/ecmascript-runtime-client/package.js @@ -1,6 +1,6 @@ Package.describe({ name: "ecmascript-runtime-client", - version: "0.9.0-beta182.17", + version: "0.9.0-beta182.18", summary: "Polyfills for new ECMAScript 2015 APIs like Map and Set", git: "https://github.com/meteor/meteor/tree/devel/packages/ecmascript-runtime-client", documentation: "README.md" diff --git a/packages/ecmascript-runtime-server/package.js b/packages/ecmascript-runtime-server/package.js index b89949b83e..693622d03e 100644 --- a/packages/ecmascript-runtime-server/package.js +++ b/packages/ecmascript-runtime-server/package.js @@ -1,6 +1,6 @@ Package.describe({ name: "ecmascript-runtime-server", - version: "0.8.0-beta182.17", + version: "0.8.0-beta182.18", summary: "Polyfills for new ECMAScript 2015 APIs like Map and Set", git: "https://github.com/meteor/meteor/tree/devel/packages/ecmascript-runtime-client", documentation: "README.md" diff --git a/packages/ecmascript/package.js b/packages/ecmascript/package.js index e1778d8050..414edaf1ec 100644 --- a/packages/ecmascript/package.js +++ b/packages/ecmascript/package.js @@ -1,6 +1,6 @@ Package.describe({ name: 'ecmascript', - version: '0.13.0-beta182.17', + version: '0.13.0-beta182.18', summary: 'Compiler plugin that supports ES2015+ in all .js files', documentation: 'README.md' }); diff --git a/packages/meteor-tool/package.js b/packages/meteor-tool/package.js index e62580a5a4..4adb688e32 100644 --- a/packages/meteor-tool/package.js +++ b/packages/meteor-tool/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "The Meteor command-line tool", - version: '1.8.2-beta.17' + version: '1.8.2-beta.18' }); Package.includeTool(); diff --git a/packages/minifier-css/package.js b/packages/minifier-css/package.js index 0542dc191d..619c9e50e1 100644 --- a/packages/minifier-css/package.js +++ b/packages/minifier-css/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: 'CSS minifier', - version: '1.4.3' + version: '1.4.3-beta182.18' }); Npm.depends({ diff --git a/packages/modules-runtime/package.js b/packages/modules-runtime/package.js index d0841da3d7..31c29c957c 100644 --- a/packages/modules-runtime/package.js +++ b/packages/modules-runtime/package.js @@ -1,6 +1,6 @@ Package.describe({ name: "modules-runtime", - version: "0.11.0-beta182.17", + version: "0.11.0-beta182.18", summary: "CommonJS module system", git: "https://github.com/benjamn/install", documentation: "README.md" diff --git a/packages/modules/package.js b/packages/modules/package.js index c3900e976f..8ccc4ba361 100644 --- a/packages/modules/package.js +++ b/packages/modules/package.js @@ -1,6 +1,6 @@ Package.describe({ name: "modules", - version: "0.14.0-beta182.17", + version: "0.14.0-beta182.18", summary: "CommonJS module system", documentation: "README.md" }); diff --git a/packages/mongo/package.js b/packages/mongo/package.js index 843bb6b3be..72279d75f8 100644 --- a/packages/mongo/package.js +++ b/packages/mongo/package.js @@ -9,7 +9,7 @@ Package.describe({ summary: "Adaptor for using MongoDB and Minimongo over DDP", - version: '1.7.0-beta182.17' + version: '1.7.0-beta182.18' }); Npm.depends({ diff --git a/packages/npm-mongo/package.js b/packages/npm-mongo/package.js index bf864cb468..e0e837963f 100644 --- a/packages/npm-mongo/package.js +++ b/packages/npm-mongo/package.js @@ -3,7 +3,7 @@ Package.describe({ summary: "Wrapper around the mongo npm package", - version: "3.2.0-beta182.17", + version: "3.2.0-beta182.18", documentation: null }); diff --git a/packages/standard-minifier-css/package.js b/packages/standard-minifier-css/package.js index 1ae8621ddf..4adf1ca60a 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.5.4', + version: '1.5.4-beta182.18', summary: 'Standard css minifier used with Meteor apps by default.', documentation: 'README.md' }); diff --git a/packages/typescript/package.js b/packages/typescript/package.js index e026a2161e..5180d09219 100644 --- a/packages/typescript/package.js +++ b/packages/typescript/package.js @@ -1,6 +1,6 @@ Package.describe({ name: "typescript", - version: "3.6.2-beta182.17", + version: "3.6.2-beta182.18", summary: "Compiler plugin that compiles TypeScript and ECMAScript in .ts and .tsx files", documentation: "README.md" }); diff --git a/scripts/admin/meteor-release-experimental.json b/scripts/admin/meteor-release-experimental.json index 9cb09b643a..459c211386 100644 --- a/scripts/admin/meteor-release-experimental.json +++ b/scripts/admin/meteor-release-experimental.json @@ -1,6 +1,6 @@ { "track": "METEOR", - "version": "1.8.2-beta.17", + "version": "1.8.2-beta.18", "recommended": false, "official": false, "description": "Meteor" From 6b1e1f7a4f4ab1e57db6897e7acdac7b128b0922 Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Fri, 6 Sep 2019 19:12:35 -0400 Subject: [PATCH 212/327] Bump $BUNDLE_VERSION to 8.16.1.1 before rebuilding dev bundle. --- meteor | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meteor b/meteor index 6121059425..312b1371f7 100755 --- a/meteor +++ b/meteor @@ -1,6 +1,6 @@ #!/usr/bin/env bash -BUNDLE_VERSION=8.16.1.0 +BUNDLE_VERSION=8.16.1.1 # OS Check. Put here because here is where we download the precompiled # bundles that are arch specific. From 5124cb495c3ad13418fc08c45ac7720fcf8ecefb Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Sat, 7 Sep 2019 20:22:18 -0400 Subject: [PATCH 213/327] Use json5 for optimisticReadJsonOrNull. Because json5 is more tolerant of non-standards-compliant input, it has no trouble with \t tab characters outside of string literals, so this change should fix issue #10688. Note that json5 is already installed in dev_bundle/lib/node_modules/json5, because it is a dependency of @babel/core, so we don't need to rebuild the dev bundle immediately, though it would be a good idea to do so before the next beta/RC release. --- scripts/dev-bundle-tool-package.js | 1 + tools/fs/optimistic.ts | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/scripts/dev-bundle-tool-package.js b/scripts/dev-bundle-tool-package.js index fb23613d03..57ce4a8c7a 100644 --- a/scripts/dev-bundle-tool-package.js +++ b/scripts/dev-bundle-tool-package.js @@ -36,6 +36,7 @@ var packageJson = { "graceful-fs": "4.2.2", fstream: "https://github.com/meteor/fstream/tarball/cf4ea6c175355cec7bee38311e170d08c4078a5d", tar: "2.2.1", + json5: "2.1.0", kexec: "3.0.0", "source-map": "0.5.7", chalk: "0.5.1", diff --git a/tools/fs/optimistic.ts b/tools/fs/optimistic.ts index 672430e0b3..3cc9d6a90d 100644 --- a/tools/fs/optimistic.ts +++ b/tools/fs/optimistic.ts @@ -246,6 +246,9 @@ export const optimisticHashOrNull = makeOptimistic("hashOrNull", ( return null; }); +// A more tolerant implementation of JSON.parse. +const { parse: jsonParse } = require("json5"); + export const optimisticReadJsonOrNull = makeOptimistic("readJsonOrNull", ( path: string, @@ -254,7 +257,7 @@ makeOptimistic("readJsonOrNull", ( }, ) => { try { - return JSON.parse( + return jsonParse( optimisticReadFile(path, options) ) as Record; From c4ad648c5e3d87b7b3112dd6074b3fc6e2a69109 Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Tue, 17 Sep 2019 21:11:56 -0400 Subject: [PATCH 214/327] Update meteor-babel to version 7.6.1. --- History.md | 2 +- .../.npm/package/npm-shrinkwrap.json | 83 +++++++++++-------- packages/babel-compiler/package.js | 2 +- scripts/dev-bundle-tool-package.js | 2 +- 4 files changed, 50 insertions(+), 39 deletions(-) diff --git a/History.md b/History.md index 9f0ed14bec..6095131999 100644 --- a/History.md +++ b/History.md @@ -55,7 +55,7 @@ N/A * The `mongodb` npm package used by the `npm-mongo` Meteor package has been updated to version 3.2.7. -* The `meteor-babel` npm package has been updated to version 7.6.0, +* The `meteor-babel` npm package has been updated to version 7.6.1, enabling compilation of the `meteor/tools` codebase with TypeScript (specifically, version 3.6.2 of the `typescript` npm package). diff --git a/packages/babel-compiler/.npm/package/npm-shrinkwrap.json b/packages/babel-compiler/.npm/package/npm-shrinkwrap.json index 9b2cff8a65..e027e1cbf9 100644 --- a/packages/babel-compiler/.npm/package/npm-shrinkwrap.json +++ b/packages/babel-compiler/.npm/package/npm-shrinkwrap.json @@ -11,11 +11,6 @@ "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.6.0.tgz", "integrity": "sha512-FuRhDRtsd6IptKpHXAa+4WPZYY2ZzgowkbLBecEDDSje1X/apG7jQM33or3NdOmjXBKWGOg4JmSiRfUfuTtHXw==", "dependencies": { - "@babel/parser": { - "version": "7.6.0", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.6.0.tgz", - "integrity": "sha512-+o2q111WEx4srBs7L9eJmcwi655eD8sXniLqMB93TBK9GrNzGrxDWSjiqz2hLU0Ha8MTXFIP0yd9fNdP+m43ZQ==" - }, "json5": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/json5/-/json5-2.1.0.tgz", @@ -144,9 +139,9 @@ "integrity": "sha512-7dV4eu9gBxoM0dAnj/BCFDW9LFU0zvTrkq0ugM7pnHEgguOEeOz1so2ZghEdzviYzQEED0r4EAgpsBChKy1TRQ==" }, "@babel/parser": { - "version": "7.5.5", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.5.5.tgz", - "integrity": "sha512-E5BN68cqR7dhKan1SfqgPGhQ178bkVKpXTPEXnFJBrEt8/DKRZlybmy+IgYLTeN7tp1R5Ccmbm2rBk17sHYU3g==" + "version": "7.6.0", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.6.0.tgz", + "integrity": "sha512-+o2q111WEx4srBs7L9eJmcwi655eD8sXniLqMB93TBK9GrNzGrxDWSjiqz2hLU0Ha8MTXFIP0yd9fNdP+m43ZQ==" }, "@babel/plugin-proposal-async-generator-functions": { "version": "7.2.0", @@ -158,11 +153,26 @@ "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.5.5.tgz", "integrity": "sha512-AF79FsnWFxjlaosgdi421vmYG6/jg79bVD0dpD44QdgobzHKuLZ6S3vl8la9qIeSwGi8i1fS0O1mfuDAAdo1/A==" }, + "@babel/plugin-proposal-nullish-coalescing-operator": { + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-nullish-coalescing-operator/-/plugin-proposal-nullish-coalescing-operator-7.4.4.tgz", + "integrity": "sha512-Amph7Epui1Dh/xxUxS2+K22/MUi6+6JVTvy3P58tja3B6yKTSjwwx0/d83rF7551D6PVSSoplQb8GCwqec7HRw==" + }, "@babel/plugin-proposal-object-rest-spread": { "version": "7.5.5", "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.5.5.tgz", "integrity": "sha512-F2DxJJSQ7f64FyTVl5cw/9MWn6naXGdk3Q3UhDbFEEHv+EilCPoeRD3Zh/Utx1CJz4uyKlQ4uH+bJPbEhMV7Zw==" }, + "@babel/plugin-proposal-optional-catch-binding": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-catch-binding/-/plugin-proposal-optional-catch-binding-7.2.0.tgz", + "integrity": "sha512-mgYj3jCcxug6KUcX4OBoOJz3CMrwRfQELPQ5560F70YQUBZB7uac9fqaWamKR1iWUzGiK2t0ygzjTScZnVz75g==" + }, + "@babel/plugin-proposal-optional-chaining": { + "version": "7.6.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-chaining/-/plugin-proposal-optional-chaining-7.6.0.tgz", + "integrity": "sha512-kj4gkZ6qUggkprRq3Uh5KP8XnE1MdIO0J7MhdDX8+rAbB6dJ2UrensGIS+0NPZAaaJ1Vr0PN6oLUgXMU1uMcSg==" + }, "@babel/plugin-syntax-async-generators": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.2.0.tgz", @@ -188,11 +198,26 @@ "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.2.0.tgz", "integrity": "sha512-VyN4QANJkRW6lDBmENzRszvZf3/4AXaj9YR7GwrWeeN9tEBPuXbmDYVU9bYBN0D70zCWVwUy0HWq2553VCb6Hw==" }, + "@babel/plugin-syntax-nullish-coalescing-operator": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-nullish-coalescing-operator/-/plugin-syntax-nullish-coalescing-operator-7.2.0.tgz", + "integrity": "sha512-lRCEaKE+LTxDQtgbYajI04ddt6WW0WJq57xqkAZ+s11h4YgfRHhVA/Y2VhfPzzFD4qeLHWg32DMp9HooY4Kqlg==" + }, "@babel/plugin-syntax-object-rest-spread": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.2.0.tgz", "integrity": "sha512-t0JKGgqk2We+9may3t0xDdmneaXmyxq0xieYcKHxIsrJO64n1OiMWNUtc5gQK1PA0NpdCRrtZp4z+IUaKugrSA==" }, + "@babel/plugin-syntax-optional-catch-binding": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.2.0.tgz", + "integrity": "sha512-bDe4xKNhb0LI7IvZHiA13kff0KEfaGX/Hv4lMA9+7TEc63hMNvfKo6ZFpXhKuEp+II/q35Gc4NoMeDZyaUbj9w==" + }, + "@babel/plugin-syntax-optional-chaining": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-chaining/-/plugin-syntax-optional-chaining-7.2.0.tgz", + "integrity": "sha512-HtGCtvp5Uq/jH/WNUPkK6b7rufnCPLLlDAFN7cmACoIjaOOiXxUt3SswU5loHqrhtqTsa/WoLQ1OQ1AGuZqaWA==" + }, "@babel/plugin-transform-arrow-functions": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.2.0.tgz", @@ -341,26 +366,12 @@ "@babel/template": { "version": "7.6.0", "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.6.0.tgz", - "integrity": "sha512-5AEH2EXD8euCk446b7edmgFdub/qfH1SN6Nii3+fyXP807QRx9Q73A2N5hNwRRslC2H9sNzaFhsPubkS4L8oNQ==", - "dependencies": { - "@babel/parser": { - "version": "7.6.0", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.6.0.tgz", - "integrity": "sha512-+o2q111WEx4srBs7L9eJmcwi655eD8sXniLqMB93TBK9GrNzGrxDWSjiqz2hLU0Ha8MTXFIP0yd9fNdP+m43ZQ==" - } - } + "integrity": "sha512-5AEH2EXD8euCk446b7edmgFdub/qfH1SN6Nii3+fyXP807QRx9Q73A2N5hNwRRslC2H9sNzaFhsPubkS4L8oNQ==" }, "@babel/traverse": { "version": "7.6.0", "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.6.0.tgz", - "integrity": "sha512-93t52SaOBgml/xY74lsmt7xOR4ufYvhb5c5qiM6lu4J/dWGMAfAh6eKw4PjLes6DI6nQgearoxnFJk60YchpvQ==", - "dependencies": { - "@babel/parser": { - "version": "7.6.0", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.6.0.tgz", - "integrity": "sha512-+o2q111WEx4srBs7L9eJmcwi655eD8sXniLqMB93TBK9GrNzGrxDWSjiqz2hLU0Ha8MTXFIP0yd9fNdP+m43ZQ==" - } - } + "integrity": "sha512-93t52SaOBgml/xY74lsmt7xOR4ufYvhb5c5qiM6lu4J/dWGMAfAh6eKw4PjLes6DI6nQgearoxnFJk60YchpvQ==" }, "@babel/types": { "version": "7.6.1", @@ -533,9 +544,9 @@ "integrity": "sha1-viQcqBQEAwZ4t0hxcyK4nQyP4oA=" }, "babel-preset-meteor": { - "version": "7.6.0", - "resolved": "https://registry.npmjs.org/babel-preset-meteor/-/babel-preset-meteor-7.6.0.tgz", - "integrity": "sha512-YEuDJ3F8s8eLtv0Rpg9gD6xRa9gLYw6KiaZmYGyhj6VoyhEVAHFfzLd7aqE2KVlYYFowr/hi4BcqTE7hcu0ECQ==" + "version": "7.6.1", + "resolved": "https://registry.npmjs.org/babel-preset-meteor/-/babel-preset-meteor-7.6.1.tgz", + "integrity": "sha512-MtFTa3g7cF+lepxY+XraKMTXBKdY5iNrSC2vcnp/cSC3rLwhWfc8WCxIS+qFU7dTen0u2IB3GIWI8cjqCIMOsA==" }, "babel-preset-minify": { "version": "0.5.1", @@ -628,9 +639,9 @@ "integrity": "sha512-6QK0OpF/phMz0Q2AxILkX2mFhi7m+WMwTRg0LQKq/WBB0cDP4rYH3Wp4/d3OTXlrPLVJT/RFqj8tFeAR4nk8AA==" }, "meteor-babel": { - "version": "7.6.0", - "resolved": "https://registry.npmjs.org/meteor-babel/-/meteor-babel-7.6.0.tgz", - "integrity": "sha512-LOFO4R6qoujjalVafJfSk/io9Mydj1tgAd8+b2f8a3f4dtaFxOp3ey99SrpDEjMdztOa1vMEEJbtGJ8ozoyENg==" + "version": "7.6.1", + "resolved": "https://registry.npmjs.org/meteor-babel/-/meteor-babel-7.6.1.tgz", + "integrity": "sha512-3gINjMYXgbBvkWs9x/rD4MInU2hOUTJ5dREEVcKQh48kvLa7WMKl28dkPFARTr0GmGVLqrlP8a01QCgEqk8+9A==" }, "meteor-babel-helpers": { "version": "0.0.3", @@ -688,9 +699,9 @@ "integrity": "sha512-flVuee02C3FKRISbxhXl9mGzdbWUVHubl1SMaknjxkFB1/iqpJhArQUvRxOOPEc/9tAiX0BaQ28FJH10E4isSQ==" }, "regexpu-core": { - "version": "4.5.5", - "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-4.5.5.tgz", - "integrity": "sha512-FpI67+ky9J+cDizQUJlIlNZFKual/lUkFr1AG6zOCpwZ9cLrg8UUVakyUQJD7fCDIe9Z2nwTQJNPyonatNmDFQ==" + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-4.6.0.tgz", + "integrity": "sha512-YlVaefl8P5BnFYOITTNzDvan1ulLOiXJzCNZxduTIosN17b87h3bvG9yHMoHaRuo88H4mQ06Aodj5VtYGGGiTg==" }, "regjsgen": { "version": "0.5.0", @@ -755,9 +766,9 @@ "integrity": "sha1-yy4SAwZ+DI3h9hQJS5/kVwTqYAM=" }, "typescript": { - "version": "3.6.2", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.6.2.tgz", - "integrity": "sha512-lmQ4L+J6mnu3xweP8+rOrUwzmN+MRAj7TgtJtDaXE5PMyX2kCrklhg3rvOsOIfNeAWMQWO2F1GPc1kMD2vLAfw==" + "version": "3.6.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.6.3.tgz", + "integrity": "sha512-N7bceJL1CtRQ2RiG0AQME13ksR7DiuQh/QehubYcghzv20tnh+MQnQIuJddTmsbqYj+dztchykemz0zFzlvdQw==" }, "unicode-canonical-property-names-ecmascript": { "version": "1.0.4", diff --git a/packages/babel-compiler/package.js b/packages/babel-compiler/package.js index ab7b4ab25b..b54f4b26c8 100644 --- a/packages/babel-compiler/package.js +++ b/packages/babel-compiler/package.js @@ -10,7 +10,7 @@ Package.describe({ }); Npm.depends({ - 'meteor-babel': '7.6.0', + 'meteor-babel': '7.6.1', 'json5': '2.1.0' }); diff --git a/scripts/dev-bundle-tool-package.js b/scripts/dev-bundle-tool-package.js index 57ce4a8c7a..9bc8d7b4a5 100644 --- a/scripts/dev-bundle-tool-package.js +++ b/scripts/dev-bundle-tool-package.js @@ -15,7 +15,7 @@ var packageJson = { "node-gyp": "5.0.1", "node-pre-gyp": "0.13.0", typescript: "3.6.2", - "meteor-babel": "7.6.0", + "meteor-babel": "7.6.1", // Keep the versions of these packages consistent with the versions // found in dev-bundle-server-package.js. "meteor-promise": "0.8.7", From ec403b3fe538e256401df23615e747b26f84f017 Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Tue, 17 Sep 2019 21:25:31 -0400 Subject: [PATCH 215/327] Update optimism npm package to latest version (0.11.2). --- History.md | 5 +++-- scripts/dev-bundle-tool-package.js | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/History.md b/History.md index 6095131999..a8a2a93ce6 100644 --- a/History.md +++ b/History.md @@ -67,8 +67,9 @@ N/A * The `node-gyp` npm package has been updated to version 5.0.1, and `node-pre-gyp` has been updated to 0.13.0. -* The `optimism` npm package has been updated to version 0.10.2, which - enables caching of thrown exceptions, as well as ordinary results. +* The `optimism` npm package has been updated to version 0.11.2, which + enables caching of thrown exceptions as well as ordinary results, in + addition to performance improvements. * The `pathwatcher` npm package has been updated to version 8.1.0. diff --git a/scripts/dev-bundle-tool-package.js b/scripts/dev-bundle-tool-package.js index 9bc8d7b4a5..d5f0a5f5f2 100644 --- a/scripts/dev-bundle-tool-package.js +++ b/scripts/dev-bundle-tool-package.js @@ -59,7 +59,7 @@ var packageJson = { pathwatcher: "8.1.0", // The @wry/context package version must be compatible with the // version constraint imposed by optimism/package.json. - optimism: "0.10.2", + optimism: "0.11.2", "@wry/context": "0.4.4", 'lru-cache': '4.1.3' } From f22bfec5274ca822241c8de38f4c98e78163a7d3 Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Tue, 17 Sep 2019 21:26:27 -0400 Subject: [PATCH 216/327] Bump $BUNDLE_VERSION to 8.16.1.2 before rebuilding dev bundle. --- meteor | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meteor b/meteor index 312b1371f7..2ab0b33f8b 100755 --- a/meteor +++ b/meteor @@ -1,6 +1,6 @@ #!/usr/bin/env bash -BUNDLE_VERSION=8.16.1.1 +BUNDLE_VERSION=8.16.1.2 # OS Check. Put here because here is where we download the precompiled # bundles that are arch specific. From 7bc5b5b061b794661792d2019b19f04db566adf5 Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Wed, 18 Sep 2019 11:40:47 -0400 Subject: [PATCH 217/327] Use dep API from optimism instead of wrap in a few places. Background: https://github.com/benjamn/optimism/pull/50 --- tools/fs/files.ts | 12 ++---------- tools/fs/optimistic.ts | 26 ++++++-------------------- 2 files changed, 8 insertions(+), 30 deletions(-) diff --git a/tools/fs/files.ts b/tools/fs/files.ts index 3d51cb8cc5..d2fb10c8cd 100644 --- a/tools/fs/files.ts +++ b/tools/fs/files.ts @@ -11,6 +11,7 @@ import os from "os"; import { spawn, execFile } from "child_process"; import { EventEmitter } from "events"; import { Slot } from "@wry/context"; +import { dep } from "optimism"; const _ = require('underscore'); const Fiber = require("fibers"); @@ -1646,16 +1647,7 @@ export function withCache(fn: () => R): R { return cache ? fn() : withCacheSlot.withValue(Object.create(null), fn); } -let dependOnPathSalt = 0; -import { wrap } from "optimism"; -export const dependOnPath = wrap( - // Always return something different to prevent optimism from - // second-guessing the dirtiness of this function. - (_path: string) => ++dependOnPathSalt, - // This function is disposable because we don't care about its result, - // only its role in optimistic dependency tracking/dirtying. - { disposable: true } -); +export const dependOnPath = dep(); function wrapDestructiveFsFunc( fnName: string, diff --git a/tools/fs/optimistic.ts b/tools/fs/optimistic.ts index 3cc9d6a90d..18969a36ac 100644 --- a/tools/fs/optimistic.ts +++ b/tools/fs/optimistic.ts @@ -1,5 +1,5 @@ import assert from "assert"; -import { wrap, OptimisticWrapperFunction } from "optimism"; +import { wrap, OptimisticWrapperFunction, dep } from "optimism"; import ignore from "ignore"; import { Profile } from "../tool-env/profile"; import { watch, SafeWatcher } from "./safe-watcher"; @@ -146,13 +146,7 @@ function maybeDependOnNodeModules(path: string) { } } -let dependOnDirectorySalt = 0; - -const dependOnDirectory = wrap((_dir: string) => { - // Always return something different to prevent optimism from - // second-guessing the dirtiness of this function. - return ++dependOnDirectorySalt; -}, { +const dependOnDirectory = dep({ subscribe(dir: string) { let watcher: SafeWatcher | null = watch( dir, @@ -166,10 +160,6 @@ const dependOnDirectory = wrap((_dir: string) => { } }; }, - - // This function is disposable because we don't care about its result, - // only its role in optimistic dependency tracking/dirtying. - disposable: true }); // Called when an optimistic function detects the given file does not @@ -191,20 +181,16 @@ function dependOnParentDirectory(path: string) { // Note that this strategy will not detect changes within subdirectories // of this node_modules directory, but that's ok because the use case we // care about is adding or removing npm packages. -const dependOnNodeModules = wrap((nodeModulesDir: string) => { +function dependOnNodeModules(nodeModulesDir: string) { assert(pathIsAbsolute(nodeModulesDir)); assert(nodeModulesDir.endsWith(pathSep + "node_modules")); - return dependOnDirectory(nodeModulesDir); -}, { - // This function is disposable because we don't care about its result, - // only its role in optimistic dependency tracking/dirtying. - disposable: true -}); + dependOnDirectory(nodeModulesDir); +} // Invalidate all optimistic results derived from paths involving the // given node_modules directory. export function dirtyNodeModulesDirectory(nodeModulesDir: string) { - dependOnNodeModules.dirty(nodeModulesDir); + dependOnDirectory.dirty(nodeModulesDir); } export const optimisticStatOrNull = makeOptimistic("statOrNull", (path: string) => { From f9c498adb83942099c956729be29e8d2652a6021 Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Wed, 18 Sep 2019 16:19:02 -0400 Subject: [PATCH 218/327] Improve the shouldWatch function in tools/fs/optimistic.ts. (#10693) This function determines whether the optimistic caching system should subscribe to file change notifications for a given path. Note that Meteor has other ways of watching for file changes (e.g. the WatchSet abstraction), as well as other mechanisms for invalidating cached results, so time and resources can often be saved by returning false here, if we know that the path will be watched in other ways. Improvements: - Add METEOR_PROFILE instrumentation to the shouldWatch implementation. - Stop exporting shouldWatch, since it is no longer used anywhere else in the codebase. - Return false early to avoid watching files inside the .meteor directory, a significant shortcut. - Allow watching files in application node_modules directories that are not located directly in the root application directory (closes #10664). --- tools/fs/optimistic.ts | 33 +++++++++++++++++++++++++++++++-- 1 file changed, 31 insertions(+), 2 deletions(-) diff --git a/tools/fs/optimistic.ts b/tools/fs/optimistic.ts index 18969a36ac..64e6dbf676 100644 --- a/tools/fs/optimistic.ts +++ b/tools/fs/optimistic.ts @@ -15,6 +15,7 @@ import { readFile, readdir, dependOnPath, + findAppDir, } from "./files"; // When in doubt, the optimistic caching system can be completely disabled @@ -79,7 +80,12 @@ function makeOptimistic< return wrapper; } -export const shouldWatch = wrap((path: string) => { +// The Meteor application directory should never change during the lifetime +// of the build process, so it should be safe to cache findAppDir without +// subscribing to file changes. +const optimisticFindAppDir = wrap(findAppDir); + +const shouldWatch = wrap(Profile("shouldWatch", (path: string) => { const parts = path.split(pathSep); const nmi = parts.indexOf("node_modules"); @@ -88,6 +94,14 @@ export const shouldWatch = wrap((path: string) => { return true; } + const dotMeteorIndex = parts.lastIndexOf(".meteor", nmi); + if (dotMeteorIndex >= 0) { + // Watch nothing inside of .meteor, at least for the purposes of the + // optimistic caching system. Meteor watches files inside .meteor/local + // via the WatchSet abstraction, unrelatedly. + return false; + } + if (nmi < parts.length - 1) { const nmi2 = parts.indexOf("node_modules", nmi + 1); if (nmi2 > nmi) { @@ -97,6 +111,21 @@ export const shouldWatch = wrap((path: string) => { return false; } + const parentDirParts = parts.slice(0, nmi); + const parentDir = parentDirParts.join(pathSep); + const appDir = optimisticFindAppDir(parentDir); + if ( + appDir && + parentDir.startsWith(appDir) && + appDir.split(pathSep).length < parentDirParts.length + ) { + // If the given path is contained by the Meteor application directory, + // but the node_modules directory we're considering is not directly + // contained by the root application directory, watch the file. See + // discussion in issue https://github.com/meteor/meteor/issues/10664 + return true; + } + const packageDirParts = parts.slice(0, nmi + 2); if (parts[nmi + 1].startsWith("@")) { @@ -118,7 +147,7 @@ export const shouldWatch = wrap((path: string) => { // instead we rely on dependOnNodeModules to tell us when files in // node_modules directories might have changed. return false; -}); +})); function maybeDependOnPath(path: string) { if (typeof path === "string") { From 2468d17fec6639a07cded3a7f0fdbb0a93fcad52 Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Wed, 18 Sep 2019 19:07:41 -0400 Subject: [PATCH 219/327] Allow creating Meteor apps with --typescript skeleton. Just as developers can run meteor create --react my-react-app meteor create --minimal my-minimal-app meteor create --bare my-bare-app meteor create --full my-full-app they can now run meteor create --typescript my-typescript-app to produce a new TypeScript application, based on the --react application, configured using a recommended tsconfig.json file. This app represents the current best/simplest-known way to set up a Meteor-compatible TypeScript application, but it is still very much a work in progress. Please feel free to submit pull requests to improve it, or create issues to discuss how it should work. For example, the community-maintained @types/meteor package covers all the core packages used by this starter application, but it has not been updated in a while, so there will no doubt be meteor/* packages with missing types. In future versions, Meteor should ideally generate the appropriate .d.ts files from TypeScript package source code, so that no separate @types/meteor/* declarations need to be maintained. --- tools/cli/commands.js | 23 ++++++----- .../skel-react/imports/api/links.js | 2 +- .../static-assets/skel-typescript/.gitignore | 1 + .../skel-typescript/.meteor/.gitignore | 1 + .../skel-typescript/.meteor/packages | 22 ++++++++++ .../skel-typescript/.meteor/platforms | 2 + .../skel-typescript/client/main.css | 4 ++ .../skel-typescript/client/main.html | 7 ++++ .../skel-typescript/client/main.tsx | 8 ++++ .../skel-typescript/imports/api/links.ts | 10 +++++ .../skel-typescript/imports/ui/App.tsx | 11 +++++ .../skel-typescript/imports/ui/Hello.tsx | 22 ++++++++++ .../skel-typescript/imports/ui/Info.tsx | 34 ++++++++++++++++ .../skel-typescript/package.json | 29 ++++++++++++++ .../skel-typescript/server/main.ts | 31 ++++++++++++++ .../skel-typescript/tests/main.ts | 21 ++++++++++ .../skel-typescript/tsconfig.json | 40 +++++++++++++++++++ tools/tsconfig.json | 1 + 18 files changed, 258 insertions(+), 11 deletions(-) create mode 100644 tools/static-assets/skel-typescript/.gitignore create mode 100644 tools/static-assets/skel-typescript/.meteor/.gitignore create mode 100644 tools/static-assets/skel-typescript/.meteor/packages create mode 100644 tools/static-assets/skel-typescript/.meteor/platforms create mode 100644 tools/static-assets/skel-typescript/client/main.css create mode 100644 tools/static-assets/skel-typescript/client/main.html create mode 100644 tools/static-assets/skel-typescript/client/main.tsx create mode 100644 tools/static-assets/skel-typescript/imports/api/links.ts create mode 100644 tools/static-assets/skel-typescript/imports/ui/App.tsx create mode 100644 tools/static-assets/skel-typescript/imports/ui/Hello.tsx create mode 100644 tools/static-assets/skel-typescript/imports/ui/Info.tsx create mode 100644 tools/static-assets/skel-typescript/package.json create mode 100644 tools/static-assets/skel-typescript/server/main.ts create mode 100644 tools/static-assets/skel-typescript/tests/main.ts create mode 100644 tools/static-assets/skel-typescript/tsconfig.json diff --git a/tools/cli/commands.js b/tools/cli/commands.js index 7648a2128c..2b4d2f5599 100644 --- a/tools/cli/commands.js +++ b/tools/cli/commands.js @@ -505,6 +505,7 @@ main.registerCommand({ minimal: { type: Boolean }, full: { type: Boolean }, react: { type: Boolean }, + typescript: { type: Boolean }, }, catalogRefresh: new catalog.Refresh.Never() }, function (options) { @@ -593,7 +594,7 @@ main.registerCommand({ return transform(f); }, transformContents: function (contents, f) { - if ((/(\.html|\.js|\.css)/).test(f)) { + if ((/(\.html|\.[jt]sx?|\.css)/).test(f)) { return Buffer.from(transform(contents.toString())); } else { return contents; @@ -757,6 +758,8 @@ main.registerCommand({ skelName += "-full"; } else if (options.react) { skelName += "-react"; + } else if (options.typescript) { + skelName += "-typescript"; } files.cp_r(files.pathJoin(__dirnameConverted, '..', 'static-assets', skelName), appPath, { @@ -764,7 +767,7 @@ main.registerCommand({ return transform(f); }, transformContents: function (contents, f) { - if ((/(\.html|\.js|\.css)/).test(f)) { + if ((/(\.html|\.[jt]sx?|\.css)/).test(f)) { return Buffer.from(transform(contents.toString())); } else { return contents; @@ -864,20 +867,20 @@ main.registerCommand({ if (! options.bare && ! options.minimal && ! options.full && - ! options.react) { - // Notify people about --bare, --minimal, --full, and --react. + ! options.react && + ! options.typescript) { + // Notify people about --bare, --minimal, --full, --react, and --typescript. Console.info([ "", "To start with a different app template, try one of the following:", "", ].join("\n")); - cmd("meteor create --bare # to create an empty app"); - cmd("meteor create --minimal # to create an app with as few " + - "Meteor packages as possible"); - cmd("meteor create --full # to create a more complete " + - "scaffolded app"); - cmd("meteor create --react # to create a basic React-based app"); + cmd("meteor create --bare # to create an empty app"); + cmd("meteor create --minimal # to create an app with as few Meteor packages as possible"); + cmd("meteor create --full # to create a more complete scaffolded app"); + cmd("meteor create --react # to create a basic React-based app"); + cmd("meteor create --typescript # to create an app using TypeScript and React"); } Console.info(""); diff --git a/tools/static-assets/skel-react/imports/api/links.js b/tools/static-assets/skel-react/imports/api/links.js index 27352f85ff..872bb75c9c 100644 --- a/tools/static-assets/skel-react/imports/api/links.js +++ b/tools/static-assets/skel-react/imports/api/links.js @@ -1,3 +1,3 @@ import { Mongo } from 'meteor/mongo'; -export default Links = new Mongo.Collection('links'); +export default new Mongo.Collection('links'); diff --git a/tools/static-assets/skel-typescript/.gitignore b/tools/static-assets/skel-typescript/.gitignore new file mode 100644 index 0000000000..c2658d7d1b --- /dev/null +++ b/tools/static-assets/skel-typescript/.gitignore @@ -0,0 +1 @@ +node_modules/ diff --git a/tools/static-assets/skel-typescript/.meteor/.gitignore b/tools/static-assets/skel-typescript/.meteor/.gitignore new file mode 100644 index 0000000000..4083037423 --- /dev/null +++ b/tools/static-assets/skel-typescript/.meteor/.gitignore @@ -0,0 +1 @@ +local diff --git a/tools/static-assets/skel-typescript/.meteor/packages b/tools/static-assets/skel-typescript/.meteor/packages new file mode 100644 index 0000000000..3319ee0005 --- /dev/null +++ b/tools/static-assets/skel-typescript/.meteor/packages @@ -0,0 +1,22 @@ +# Meteor packages used by this project, one per line. +# Check this file (and the other files in this directory) into your repository. +# +# 'meteor add' and 'meteor remove' will edit this file for you, +# but you can also edit it by hand. + +meteor-base # Packages every Meteor app needs to have +mobile-experience # Packages for a great mobile UX +mongo # The database Meteor supports right now +reactive-var # Reactive variable for tracker + +standard-minifier-css # CSS minifier run for production mode +standard-minifier-js # JS minifier run for production mode +es5-shim # ECMAScript 5 compatibility for older browsers +ecmascript # Enable ECMAScript2015+ syntax in app code +typescript # Enable TypeScript syntax in .ts and .tsx modules +shell-server # Server-side component of the `meteor shell` command + +autopublish # Publish all data to the clients (for prototyping) +insecure # Allow all DB writes from clients (for prototyping) +static-html # Define static page content in .html files +react-meteor-data # React higher-order component for reactively tracking Meteor data diff --git a/tools/static-assets/skel-typescript/.meteor/platforms b/tools/static-assets/skel-typescript/.meteor/platforms new file mode 100644 index 0000000000..efeba1b50c --- /dev/null +++ b/tools/static-assets/skel-typescript/.meteor/platforms @@ -0,0 +1,2 @@ +server +browser diff --git a/tools/static-assets/skel-typescript/client/main.css b/tools/static-assets/skel-typescript/client/main.css new file mode 100644 index 0000000000..7f354f0fa7 --- /dev/null +++ b/tools/static-assets/skel-typescript/client/main.css @@ -0,0 +1,4 @@ +body { + padding: 10px; + font-family: sans-serif; +} diff --git a/tools/static-assets/skel-typescript/client/main.html b/tools/static-assets/skel-typescript/client/main.html new file mode 100644 index 0000000000..27c3712e54 --- /dev/null +++ b/tools/static-assets/skel-typescript/client/main.html @@ -0,0 +1,7 @@ + + ~name~ + + + +
+ diff --git a/tools/static-assets/skel-typescript/client/main.tsx b/tools/static-assets/skel-typescript/client/main.tsx new file mode 100644 index 0000000000..e3b8986233 --- /dev/null +++ b/tools/static-assets/skel-typescript/client/main.tsx @@ -0,0 +1,8 @@ +import React from 'react'; +import { Meteor } from 'meteor/meteor'; +import { render } from 'react-dom'; +import App from '/imports/ui/App' + +Meteor.startup(() => { + render(, document.getElementById('react-target')); +}); diff --git a/tools/static-assets/skel-typescript/imports/api/links.ts b/tools/static-assets/skel-typescript/imports/api/links.ts new file mode 100644 index 0000000000..f426a971d4 --- /dev/null +++ b/tools/static-assets/skel-typescript/imports/api/links.ts @@ -0,0 +1,10 @@ +import { Mongo } from 'meteor/mongo'; + +export interface Link { + _id?: string; + title: string; + url: string; + createdAt: Date; +} + +export const Links = new Mongo.Collection('links'); diff --git a/tools/static-assets/skel-typescript/imports/ui/App.tsx b/tools/static-assets/skel-typescript/imports/ui/App.tsx new file mode 100644 index 0000000000..e28430f56a --- /dev/null +++ b/tools/static-assets/skel-typescript/imports/ui/App.tsx @@ -0,0 +1,11 @@ +import React from 'react'; +import Hello from './Hello'; +import Info from './Info'; + +export default () => ( +
+

Welcome to Meteor!

+ + +
+); diff --git a/tools/static-assets/skel-typescript/imports/ui/Hello.tsx b/tools/static-assets/skel-typescript/imports/ui/Hello.tsx new file mode 100644 index 0000000000..a717944c0c --- /dev/null +++ b/tools/static-assets/skel-typescript/imports/ui/Hello.tsx @@ -0,0 +1,22 @@ +import React from 'react'; + +export default class Hello extends React.Component { + state = { + counter: 0, + } + + increment() { + this.setState({ + counter: this.state.counter + 1 + }); + } + + render() { + return ( +
+ +

You've pressed the button {this.state.counter} times.

+
+ ); + } +} diff --git a/tools/static-assets/skel-typescript/imports/ui/Info.tsx b/tools/static-assets/skel-typescript/imports/ui/Info.tsx new file mode 100644 index 0000000000..098df948ac --- /dev/null +++ b/tools/static-assets/skel-typescript/imports/ui/Info.tsx @@ -0,0 +1,34 @@ +import React from 'react'; +import { withTracker } from 'meteor/react-meteor-data'; +import { Links, Link } from '../api/links'; + +class Info extends React.Component<{ + links: Link[]; +}> { + render() { + const links = this.props.links.map( + link => this.makeLink(link) + ); + + return ( +
+

Learn Meteor!

+
    { links }
+
+ ); + } + + makeLink(link: Link) { + return ( +
  • + {link.title} +
  • + ); + } +} + +export default withTracker(() => { + return { + links: Links.find().fetch(), + }; +})(Info); diff --git a/tools/static-assets/skel-typescript/package.json b/tools/static-assets/skel-typescript/package.json new file mode 100644 index 0000000000..4fb03a4b66 --- /dev/null +++ b/tools/static-assets/skel-typescript/package.json @@ -0,0 +1,29 @@ +{ + "name": "~name~", + "private": true, + "scripts": { + "start": "meteor run", + "test": "meteor test --once --driver-package meteortesting:mocha", + "test-app": "TEST_WATCH=1 meteor test --full-app --driver-package meteortesting:mocha", + "visualize": "meteor --production --extra-packages bundle-visualizer" + }, + "dependencies": { + "@babel/runtime": "^7.6.0", + "meteor-node-stubs": "^1.0.0", + "react": "^16.9.0", + "react-dom": "^16.9.0" + }, + "devDependencies": { + "@types/meteor": "^1.4.30", + "@types/mocha": "^5.2.7", + "@types/react": "^16.9.0", + "@types/react-dom": "^16.9.0" + }, + "meteor": { + "mainModule": { + "client": "client/main.tsx", + "server": "server/main.ts" + }, + "testModule": "tests/main.ts" + } +} diff --git a/tools/static-assets/skel-typescript/server/main.ts b/tools/static-assets/skel-typescript/server/main.ts new file mode 100644 index 0000000000..9f8cf7abcc --- /dev/null +++ b/tools/static-assets/skel-typescript/server/main.ts @@ -0,0 +1,31 @@ +import { Meteor } from 'meteor/meteor'; +import { Links } from '/imports/api/links'; + +function insertLink(title: string, url: string) { + Links.insert({ title, url, createdAt: new Date() }); +} + +Meteor.startup(() => { + // If the Links collection is empty, add some data. + if (Links.find().count() === 0) { + insertLink( + 'Do the Tutorial', + 'https://www.meteor.com/tutorials/react/creating-an-app' + ); + + insertLink( + 'Follow the Guide', + 'http://guide.meteor.com' + ); + + insertLink( + 'Read the Docs', + 'https://docs.meteor.com' + ); + + insertLink( + 'Discussions', + 'https://forums.meteor.com' + ); + } +}); diff --git a/tools/static-assets/skel-typescript/tests/main.ts b/tools/static-assets/skel-typescript/tests/main.ts new file mode 100644 index 0000000000..7c3722128b --- /dev/null +++ b/tools/static-assets/skel-typescript/tests/main.ts @@ -0,0 +1,21 @@ +import { Meteor } from 'meteor/meteor'; +import assert from 'assert'; + +describe('~name~', function () { + it('package.json has correct name', async function () { + const { name } = await import('../package.json'); + assert.strictEqual(name, '~name~'); + }); + + if (Meteor.isClient) { + it('client is not server', function () { + assert.strictEqual(Meteor.isServer, false); + }); + } + + if (Meteor.isServer) { + it('server is not client', function () { + assert.strictEqual(Meteor.isClient, false); + }); + } +}); diff --git a/tools/static-assets/skel-typescript/tsconfig.json b/tools/static-assets/skel-typescript/tsconfig.json new file mode 100644 index 0000000000..4be740cec2 --- /dev/null +++ b/tools/static-assets/skel-typescript/tsconfig.json @@ -0,0 +1,40 @@ +{ + "compilerOptions": { + /* Basic Options */ + "target": "es2018", + "module": "esNext", + "lib": ["esnext", "dom"], + "allowJs": true, + "checkJs": false, + "jsx": "preserve", + "incremental": true, + "noEmit": true, + + /* Strict Type-Checking Options */ + "strict": true, + "noImplicitAny": true, + "strictNullChecks": true, + + /* Additional Checks */ + "noUnusedLocals": true, + "noUnusedParameters": true, + "noImplicitReturns": false, + "noFallthroughCasesInSwitch": false, + + /* Module Resolution Options */ + "baseUrl": ".", + "paths": { + /* Support absolute /imports/* with a leading '/' */ + "/*": ["*"] + }, + "moduleResolution": "node", + "resolveJsonModule": true, + "types": ["node", "mocha"], + "esModuleInterop": true, + "preserveSymlinks": true + }, + "exclude": [ + "./.meteor/**", + "./packages/**" + ] +} diff --git a/tools/tsconfig.json b/tools/tsconfig.json index 668d91e71b..ce0a729ba8 100644 --- a/tools/tsconfig.json +++ b/tools/tsconfig.json @@ -6,6 +6,7 @@ "lib": ["esnext"], "allowJs": true, "checkJs": false, + "jsx": "preserve", "incremental": true, "noEmit": true, From ee62fd419e052989d0fa64f343aa149f39b981f9 Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Thu, 19 Sep 2019 09:41:23 -0400 Subject: [PATCH 220/327] Mention TypeScript support and skeleton app in History.md. --- History.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/History.md b/History.md index a8a2a93ce6..4151d99d9d 100644 --- a/History.md +++ b/History.md @@ -28,6 +28,19 @@ N/A [fork](https://github.com/meteor/pacote/tree/v9.5.8-meteor) of its `pacote` dependency has been updated to version 9.5.8. +* New Meteor applications now include an official `typescript` package, + supporting TypeScript compilation of `.ts` and `.tsx` modules, which can + be added to existing apps by running `meteor add typescript`. + +* New TypeScript-based Meteor applications can be created by running + ```sh + meteor create --typescript new-typescript-app + ``` + This app skeleton contains a recommended tsconfig.json file, and should + serve as a reference for how to make TypeScript and Meteor work together + (to the best of our current knowledge). + [PR #10695](https://github.com/meteor/meteor/pull/10695) + * When bundling client code, the Meteor module system now prefers the `"module"` field in `package.json`, if defined. [PR #10541](https://github.com/meteor/meteor/pull/10541) From 63bb2cbac63411c9dd2938896d4f9086deef8906 Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Thu, 19 Sep 2019 10:12:48 -0400 Subject: [PATCH 221/327] Invalidate AppVeyor .babel-cache cache when BUNDLE_VERSION changes. --- appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index 28290ec4c6..7c1ca47fdd 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -43,5 +43,5 @@ on_failure: cache: - dev_bundle -> meteor - - .babel-cache + - .babel-cache -> meteor - .meteor From c61c75b0e8a9ad8956a0593c0d22406ac16f1cb1 Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Thu, 19 Sep 2019 10:46:23 -0400 Subject: [PATCH 222/327] Include checksum of meteor script in .babel-cache CircleCI cache key. --- .circleci/config.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 7dfe7f968c..eae8da0cea 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -128,8 +128,9 @@ jobs: - package-npm-deps-cache-group2-v3- - restore_cache: keys: - - v2-other-deps-cache-{{ .Branch }}-{{ .Revision }} - - v2-other-deps-cache-{{ .Branch }}- + - v3-other-deps-cache-{{ .Branch }}-{{ checksum "meteor" }}-{{ .Revision }} + - v3-other-deps-cache-{{ .Branch }}-{{ checksum "meteor" }}- + - v3-other-deps-cache-{{ .Branch }}- - restore_cache: keys: - v1-test-groups-{{ .Branch }} @@ -768,7 +769,7 @@ jobs: - packages/fetch/.npm/package/node_modules - packages/non-core/mongo-decimal/.npm/package/node_modules - save_cache: - key: v2-other-deps-cache-{{ .Branch }}-{{ .Revision }} + key: v3-other-deps-cache-{{ .Branch }}-{{ checksum "meteor" }}-{{ .Revision }} paths: - ".babel-cache" - ".meteor" From de01ab1a09b8bb069071167a2b5407db3f8636cd Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Wed, 18 Sep 2019 16:11:42 -0400 Subject: [PATCH 223/327] Pass tsconfig.json path to meteor-babel via features.typescript. This information is not used by meteor-babel, yet, but it will become important as Meteor's TypeScript support begins to honor tsconfig.json. --- packages/babel-compiler/babel-compiler.js | 35 +++++++++++++++++------ 1 file changed, 26 insertions(+), 9 deletions(-) diff --git a/packages/babel-compiler/babel-compiler.js b/packages/babel-compiler/babel-compiler.js index f93790fc18..b88abe5a30 100644 --- a/packages/babel-compiler/babel-compiler.js +++ b/packages/babel-compiler/babel-compiler.js @@ -79,22 +79,22 @@ BCp.processOneFileForTarget = function (inputFile, source) { // compilation, give it the following file extension: .es5.js ! excludedFileExtensionPattern.test(inputFilePath)) { - const extraFeatures = { ...this.extraFeatures }; + const features = { ...this.extraFeatures }; const arch = inputFile.getArch(); if (arch.startsWith("os.")) { // Start with a much simpler set of Babel presets and plugins if // we're compiling for Node 8. - extraFeatures.nodeMajorVersion = parseInt(process.versions.node, 10); + features.nodeMajorVersion = parseInt(process.versions.node, 10); } else if (arch === "web.browser") { - extraFeatures.modernBrowsers = true; + features.modernBrowsers = true; } - if (! extraFeatures.hasOwnProperty("jscript")) { + if (! features.hasOwnProperty("jscript")) { // Perform some additional transformations to improve compatibility // in older browsers (e.g. wrapping named function expressions, per // http://kiro.me/blog/nfe_dilemma.html). - extraFeatures.jscript = true; + features.jscript = true; } if (shouldCompileModulesOnly(inputFilePath)) { @@ -102,12 +102,9 @@ BCp.processOneFileForTarget = function (inputFile, source) { // compiled to support ECMAScript modules syntax, but should *not* // be compiled in any other way (for more explanation, see my longer // comment in shouldCompileModulesOnly). - extraFeatures.compileModulesOnly = true; + features.compileModulesOnly = true; } - var babelOptions = Babel.getDefaultOptions(extraFeatures); - babelOptions.caller = { name: "meteor", arch }; - const cacheOptions = { cacheDirectory: this.cacheDirectory, cacheDeps: { @@ -115,6 +112,12 @@ BCp.processOneFileForTarget = function (inputFile, source) { }, }; + this.inferTypeScriptConfig( + features, inputFile, cacheOptions.cacheDeps); + + var babelOptions = Babel.getDefaultOptions(features); + babelOptions.caller = { name: "meteor", arch }; + this.inferExtraBabelOptions( inputFile, babelOptions, @@ -212,6 +215,20 @@ function profile(name, func) { } }; +BCp.inferTypeScriptConfig = function (features, inputFile, cacheDeps) { + if (features.typescript && inputFile.findControlFile) { + const tsconfigPath = inputFile.findControlFile("tsconfig.json"); + if (tsconfigPath) { + if (typeof features.typescript !== "object") { + features.typescript = Object.create(null); + } + Object.assign(features.typescript, { tsconfigPath }); + return true; + } + } + return false; +}; + BCp.inferExtraBabelOptions = function (inputFile, babelOptions, cacheDeps) { if (! inputFile.require || ! inputFile.findControlFile || From 6c3ce7baa6201d01534e6827d6f23fd6cc445abd Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Thu, 19 Sep 2019 10:46:59 -0400 Subject: [PATCH 224/327] Update terser minifier to version 4.3.1. --- History.md | 3 +++ .../.npm/package/npm-shrinkwrap.json | 18 +++++++++--------- packages/minifier-js/package.js | 4 ++-- 3 files changed, 14 insertions(+), 11 deletions(-) diff --git a/History.md b/History.md index 4151d99d9d..b236fb7048 100644 --- a/History.md +++ b/History.md @@ -77,6 +77,9 @@ N/A * The `core-js` npm package used by `ecmascript-runtime-client` and `ecmascript-runtime-server` has been updated to version 3.1.4. +* The `terser` npm package used by `minifier-js` (and indirectly by + `standard-minifier-js`) has been updated to version 4.3.1. + * The `node-gyp` npm package has been updated to version 5.0.1, and `node-pre-gyp` has been updated to 0.13.0. diff --git a/packages/minifier-js/.npm/package/npm-shrinkwrap.json b/packages/minifier-js/.npm/package/npm-shrinkwrap.json index eec2ad9379..30e274a698 100644 --- a/packages/minifier-js/.npm/package/npm-shrinkwrap.json +++ b/packages/minifier-js/.npm/package/npm-shrinkwrap.json @@ -7,9 +7,9 @@ "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==" }, "commander": { - "version": "2.17.1", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.17.1.tgz", - "integrity": "sha512-wPMUt6FnH2yzG95SA6mzjQOEKUU3aLaDEmzs1ti+1E9h+CsrZghRlqEM/EJ4KscsQVG8uNN4uVreUeT8+drlgg==" + "version": "2.20.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.0.tgz", + "integrity": "sha512-7j2y+40w61zy6YC2iRNpUe/NwhNyoXrYpHMrSunaMG64nRnaf96zO/KMQR4OyN/UnE5KLyEBnKHd4aG3rskjpQ==" }, "source-map": { "version": "0.6.1", @@ -17,14 +17,14 @@ "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" }, "source-map-support": { - "version": "0.5.10", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.10.tgz", - "integrity": "sha512-YfQ3tQFTK/yzlGJuX8pTwa4tifQj4QS2Mj7UegOu8jAz59MqIiMGPXxQhVQiIMNzayuUSF/jEuVnfFF5JqybmQ==" + "version": "0.5.13", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.13.tgz", + "integrity": "sha512-SHSKFHadjVA5oR4PPqhtAVdcBWwRYVd6g6cAXnIbRiIwc2EhPrTuKUBdSLvlEKyIP3GCf89fltvcZiP9MMFA1w==" }, "terser": { - "version": "3.16.1", - "resolved": "https://registry.npmjs.org/terser/-/terser-3.16.1.tgz", - "integrity": "sha512-JDJjgleBROeek2iBcSNzOHLKsB/MdDf+E/BOAJ0Tk9r7p9/fVobfv7LMJ/g/k3v9SXdmjZnIlFd5nfn/Rt0Xow==" + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/terser/-/terser-4.3.1.tgz", + "integrity": "sha512-pnzH6dnFEsR2aa2SJaKb1uSCl3QmIsJ8dEkj0Fky+2AwMMcC9doMqLOQIH6wVTEKaVfKVvLSk5qxPBEZT9mywg==" } } } diff --git a/packages/minifier-js/package.js b/packages/minifier-js/package.js index e6c8fab292..1f7721c178 100644 --- a/packages/minifier-js/package.js +++ b/packages/minifier-js/package.js @@ -1,10 +1,10 @@ Package.describe({ summary: "JavaScript minifier", - version: "2.4.1" + version: "2.5.0" }); Npm.depends({ - terser: "3.16.1" + terser: "4.3.1" }); Package.onUse(function (api) { From 810c8ea89bfaacd52867275f3aaacdd102f305f6 Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Thu, 19 Sep 2019 11:01:17 -0400 Subject: [PATCH 225/327] Update core-js to version 3.2.1. --- History.md | 2 +- .../.npm/package/npm-shrinkwrap.json | 6 +++--- packages/ecmascript-runtime-client/package.js | 2 +- .../.npm/package/npm-shrinkwrap.json | 6 +++--- packages/ecmascript-runtime-server/package.js | 2 +- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/History.md b/History.md index b236fb7048..728a2639be 100644 --- a/History.md +++ b/History.md @@ -75,7 +75,7 @@ N/A * The `reify` npm package has been updated to version 0.20.12. * The `core-js` npm package used by `ecmascript-runtime-client` and - `ecmascript-runtime-server` has been updated to version 3.1.4. + `ecmascript-runtime-server` has been updated to version 3.2.1. * The `terser` npm package used by `minifier-js` (and indirectly by `standard-minifier-js`) has been updated to version 4.3.1. diff --git a/packages/ecmascript-runtime-client/.npm/package/npm-shrinkwrap.json b/packages/ecmascript-runtime-client/.npm/package/npm-shrinkwrap.json index 79e8c3e339..c5366d30b1 100644 --- a/packages/ecmascript-runtime-client/.npm/package/npm-shrinkwrap.json +++ b/packages/ecmascript-runtime-client/.npm/package/npm-shrinkwrap.json @@ -2,9 +2,9 @@ "lockfileVersion": 1, "dependencies": { "core-js": { - "version": "3.1.4", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.1.4.tgz", - "integrity": "sha512-YNZN8lt82XIMLnLirj9MhKDFZHalwzzrL9YLt6eb0T5D0EDl4IQ90IGkua8mHbnxNrkj1d8hbdizMc0Qmg1WnQ==" + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.2.1.tgz", + "integrity": "sha512-Qa5XSVefSVPRxy2XfUC13WbvqkxhkwB3ve+pgCQveNgYzbM/UxZeu1dcOX/xr4UmfUd+muuvsaxilQzCyUurMw==" } } } diff --git a/packages/ecmascript-runtime-client/package.js b/packages/ecmascript-runtime-client/package.js index da6effe196..19e8dd569f 100644 --- a/packages/ecmascript-runtime-client/package.js +++ b/packages/ecmascript-runtime-client/package.js @@ -7,7 +7,7 @@ Package.describe({ }); Npm.depends({ - "core-js": "3.1.4" + "core-js": "3.2.1" }); Package.onUse(function(api) { diff --git a/packages/ecmascript-runtime-server/.npm/package/npm-shrinkwrap.json b/packages/ecmascript-runtime-server/.npm/package/npm-shrinkwrap.json index 79e8c3e339..c5366d30b1 100644 --- a/packages/ecmascript-runtime-server/.npm/package/npm-shrinkwrap.json +++ b/packages/ecmascript-runtime-server/.npm/package/npm-shrinkwrap.json @@ -2,9 +2,9 @@ "lockfileVersion": 1, "dependencies": { "core-js": { - "version": "3.1.4", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.1.4.tgz", - "integrity": "sha512-YNZN8lt82XIMLnLirj9MhKDFZHalwzzrL9YLt6eb0T5D0EDl4IQ90IGkua8mHbnxNrkj1d8hbdizMc0Qmg1WnQ==" + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.2.1.tgz", + "integrity": "sha512-Qa5XSVefSVPRxy2XfUC13WbvqkxhkwB3ve+pgCQveNgYzbM/UxZeu1dcOX/xr4UmfUd+muuvsaxilQzCyUurMw==" } } } diff --git a/packages/ecmascript-runtime-server/package.js b/packages/ecmascript-runtime-server/package.js index 693622d03e..fa722b8458 100644 --- a/packages/ecmascript-runtime-server/package.js +++ b/packages/ecmascript-runtime-server/package.js @@ -7,7 +7,7 @@ Package.describe({ }); Npm.depends({ - "core-js": "3.1.4" + "core-js": "3.2.1" }); Package.onUse(function(api) { From e94739f7e8adee41e7e5aa8fc0a466ddece5472f Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Thu, 19 Sep 2019 11:06:18 -0400 Subject: [PATCH 226/327] Bump package versions for 1.8.2-rc.0 release. :tada: --- packages/babel-compiler/package.js | 2 +- packages/babel-runtime/package.js | 2 +- packages/context/package.js | 2 +- packages/ecmascript-runtime-client/package.js | 2 +- packages/ecmascript-runtime-server/package.js | 2 +- packages/ecmascript/package.js | 2 +- packages/meteor-tool/package.js | 2 +- packages/minifier-css/package.js | 2 +- packages/minifier-js/package.js | 2 +- packages/modules-runtime/package.js | 2 +- packages/modules/package.js | 2 +- packages/mongo/package.js | 2 +- packages/npm-mongo/package.js | 2 +- packages/standard-minifier-css/package.js | 2 +- packages/standard-minifier-js/package.js | 2 +- packages/typescript/package.js | 2 +- scripts/admin/meteor-release-experimental.json | 2 +- 17 files changed, 17 insertions(+), 17 deletions(-) diff --git a/packages/babel-compiler/package.js b/packages/babel-compiler/package.js index b54f4b26c8..721d7785db 100644 --- a/packages/babel-compiler/package.js +++ b/packages/babel-compiler/package.js @@ -6,7 +6,7 @@ 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.4.0-beta182.18' + version: '7.4.0-rc182.0' }); Npm.depends({ diff --git a/packages/babel-runtime/package.js b/packages/babel-runtime/package.js index 65805f40d9..c57f7372dd 100644 --- a/packages/babel-runtime/package.js +++ b/packages/babel-runtime/package.js @@ -1,7 +1,7 @@ Package.describe({ name: "babel-runtime", summary: "Runtime support for output of Babel transpiler", - version: '1.4.0-beta182.18', + version: '1.4.0-rc182.0', documentation: 'README.md' }); diff --git a/packages/context/package.js b/packages/context/package.js index 412cee0167..1ebd2e1fdc 100644 --- a/packages/context/package.js +++ b/packages/context/package.js @@ -1,6 +1,6 @@ Package.describe({ name: "context", - version: "0.4.0-beta182.18", + version: "0.4.0-rc182.0", summary: "Manage contextual information without passing objects around", documentation: "README.md" }); diff --git a/packages/ecmascript-runtime-client/package.js b/packages/ecmascript-runtime-client/package.js index 19e8dd569f..ff508479f0 100644 --- a/packages/ecmascript-runtime-client/package.js +++ b/packages/ecmascript-runtime-client/package.js @@ -1,6 +1,6 @@ Package.describe({ name: "ecmascript-runtime-client", - version: "0.9.0-beta182.18", + version: "0.9.0-rc182.0", summary: "Polyfills for new ECMAScript 2015 APIs like Map and Set", git: "https://github.com/meteor/meteor/tree/devel/packages/ecmascript-runtime-client", documentation: "README.md" diff --git a/packages/ecmascript-runtime-server/package.js b/packages/ecmascript-runtime-server/package.js index fa722b8458..71fee4d6f9 100644 --- a/packages/ecmascript-runtime-server/package.js +++ b/packages/ecmascript-runtime-server/package.js @@ -1,6 +1,6 @@ Package.describe({ name: "ecmascript-runtime-server", - version: "0.8.0-beta182.18", + version: "0.8.0-rc182.0", summary: "Polyfills for new ECMAScript 2015 APIs like Map and Set", git: "https://github.com/meteor/meteor/tree/devel/packages/ecmascript-runtime-client", documentation: "README.md" diff --git a/packages/ecmascript/package.js b/packages/ecmascript/package.js index 414edaf1ec..0f32b54d0a 100644 --- a/packages/ecmascript/package.js +++ b/packages/ecmascript/package.js @@ -1,6 +1,6 @@ Package.describe({ name: 'ecmascript', - version: '0.13.0-beta182.18', + version: '0.13.0-rc182.0', summary: 'Compiler plugin that supports ES2015+ in all .js files', documentation: 'README.md' }); diff --git a/packages/meteor-tool/package.js b/packages/meteor-tool/package.js index 4adb688e32..cdbbdfe478 100644 --- a/packages/meteor-tool/package.js +++ b/packages/meteor-tool/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "The Meteor command-line tool", - version: '1.8.2-beta.18' + version: '1.8.2-rc.0' }); Package.includeTool(); diff --git a/packages/minifier-css/package.js b/packages/minifier-css/package.js index 619c9e50e1..3380cf0984 100644 --- a/packages/minifier-css/package.js +++ b/packages/minifier-css/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: 'CSS minifier', - version: '1.4.3-beta182.18' + version: '1.4.3-rc182.0' }); Npm.depends({ diff --git a/packages/minifier-js/package.js b/packages/minifier-js/package.js index 1f7721c178..fa319ae271 100644 --- a/packages/minifier-js/package.js +++ b/packages/minifier-js/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "JavaScript minifier", - version: "2.5.0" + version: "2.5.0-rc182.0" }); Npm.depends({ diff --git a/packages/modules-runtime/package.js b/packages/modules-runtime/package.js index 31c29c957c..0b653264a4 100644 --- a/packages/modules-runtime/package.js +++ b/packages/modules-runtime/package.js @@ -1,6 +1,6 @@ Package.describe({ name: "modules-runtime", - version: "0.11.0-beta182.18", + version: "0.11.0-rc182.0", summary: "CommonJS module system", git: "https://github.com/benjamn/install", documentation: "README.md" diff --git a/packages/modules/package.js b/packages/modules/package.js index 8ccc4ba361..88de0ee2be 100644 --- a/packages/modules/package.js +++ b/packages/modules/package.js @@ -1,6 +1,6 @@ Package.describe({ name: "modules", - version: "0.14.0-beta182.18", + version: "0.14.0-rc182.0", summary: "CommonJS module system", documentation: "README.md" }); diff --git a/packages/mongo/package.js b/packages/mongo/package.js index 72279d75f8..d35c3cb019 100644 --- a/packages/mongo/package.js +++ b/packages/mongo/package.js @@ -9,7 +9,7 @@ Package.describe({ summary: "Adaptor for using MongoDB and Minimongo over DDP", - version: '1.7.0-beta182.18' + version: '1.7.0-rc182.0' }); Npm.depends({ diff --git a/packages/npm-mongo/package.js b/packages/npm-mongo/package.js index e0e837963f..78086dd1e6 100644 --- a/packages/npm-mongo/package.js +++ b/packages/npm-mongo/package.js @@ -3,7 +3,7 @@ Package.describe({ summary: "Wrapper around the mongo npm package", - version: "3.2.0-beta182.18", + version: "3.2.0-rc182.0", documentation: null }); diff --git a/packages/standard-minifier-css/package.js b/packages/standard-minifier-css/package.js index 4adf1ca60a..41a7952b88 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.5.4-beta182.18', + version: '1.5.4-rc182.0', summary: 'Standard css minifier used with Meteor apps by default.', documentation: 'README.md' }); diff --git a/packages/standard-minifier-js/package.js b/packages/standard-minifier-js/package.js index 6f98cf77c3..0b3680082d 100644 --- a/packages/standard-minifier-js/package.js +++ b/packages/standard-minifier-js/package.js @@ -1,6 +1,6 @@ Package.describe({ name: 'standard-minifier-js', - version: '2.4.1', + version: '2.5.0-rc182.0', summary: 'Standard javascript minifiers used with Meteor apps by default.', documentation: 'README.md', }); diff --git a/packages/typescript/package.js b/packages/typescript/package.js index 5180d09219..2197102160 100644 --- a/packages/typescript/package.js +++ b/packages/typescript/package.js @@ -1,6 +1,6 @@ Package.describe({ name: "typescript", - version: "3.6.2-beta182.18", + version: "3.6.2-rc182.0", summary: "Compiler plugin that compiles TypeScript and ECMAScript in .ts and .tsx files", documentation: "README.md" }); diff --git a/scripts/admin/meteor-release-experimental.json b/scripts/admin/meteor-release-experimental.json index 459c211386..ccc4f289f0 100644 --- a/scripts/admin/meteor-release-experimental.json +++ b/scripts/admin/meteor-release-experimental.json @@ -1,6 +1,6 @@ { "track": "METEOR", - "version": "1.8.2-beta.18", + "version": "1.8.2-rc.0", "recommended": false, "official": false, "description": "Meteor" From d0781233e85c611e1f6bf1d839031f95a4b8fa20 Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Thu, 19 Sep 2019 13:21:27 -0400 Subject: [PATCH 227/327] Install typescript in devDependencies of skel-typescript. This is important so that tools like VSCode will pick up the correct version of the TypeScript SDK, rather than whatever default version was installed with VSCode. --- tools/static-assets/skel-typescript/package.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/static-assets/skel-typescript/package.json b/tools/static-assets/skel-typescript/package.json index 4fb03a4b66..ee78e5c99b 100644 --- a/tools/static-assets/skel-typescript/package.json +++ b/tools/static-assets/skel-typescript/package.json @@ -17,7 +17,8 @@ "@types/meteor": "^1.4.30", "@types/mocha": "^5.2.7", "@types/react": "^16.9.0", - "@types/react-dom": "^16.9.0" + "@types/react-dom": "^16.9.0", + "typescript": "^3.6.3" }, "meteor": { "mainModule": { From 37f363177ef566e5bc3e69431aebabbbb4959566 Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Thu, 19 Sep 2019 14:51:41 -0400 Subject: [PATCH 228/327] Update coffeescript to use version 2.4.1. --- .../.npm/package/npm-shrinkwrap.json | 6 +++--- .../non-core/coffeescript-compiler/package.js | 19 +++++-------------- .../coffeescript-test-helper/package.js | 4 ++-- .../compile-coffeescript/npm-shrinkwrap.json | 12 ++++++------ packages/non-core/coffeescript/package.js | 15 ++++++++------- 5 files changed, 24 insertions(+), 32 deletions(-) diff --git a/packages/non-core/coffeescript-compiler/.npm/package/npm-shrinkwrap.json b/packages/non-core/coffeescript-compiler/.npm/package/npm-shrinkwrap.json index 1d8d07771c..12bd41c863 100644 --- a/packages/non-core/coffeescript-compiler/.npm/package/npm-shrinkwrap.json +++ b/packages/non-core/coffeescript-compiler/.npm/package/npm-shrinkwrap.json @@ -2,9 +2,9 @@ "lockfileVersion": 1, "dependencies": { "coffeescript": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/coffeescript/-/coffeescript-2.3.2.tgz", - "integrity": "sha512-YObiFDoukx7qPBi/K0kUKyntEZDfBQiqs/DbrR1xzASKOBjGT7auD85/DiPeRr9k++lRj7l3uA9TNMLfyfcD/Q==" + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/coffeescript/-/coffeescript-2.4.1.tgz", + "integrity": "sha512-34GV1aHrsMpTaO3KfMJL40ZNuvKDR/g98THHnE9bQj8HjMaZvSrLik99WWqyMhRtbe8V5hpx5iLgdcSvM/S2wg==" }, "source-map": { "version": "0.5.7", diff --git a/packages/non-core/coffeescript-compiler/package.js b/packages/non-core/coffeescript-compiler/package.js index 0850dd130b..bf9b41779f 100644 --- a/packages/non-core/coffeescript-compiler/package.js +++ b/packages/non-core/coffeescript-compiler/package.js @@ -1,29 +1,20 @@ -// The NPM `coffeescript` module requires Node 6+; but instead of checking for -// a Node runtime version, detect support for async functions, which were -// added in Node 7.6. -try { - new Function('async () => {}')(); -} catch (exception) { - throw new Error('Your runtime does not support this version of CoffeeScript. Please upgrade to Meteor 1.6 or later, or use a 1.x version of CoffeeScript.'); -} - - Package.describe({ name: 'coffeescript-compiler', summary: 'Compiler for CoffeeScript code, supporting the coffeescript package', // This version of NPM `coffeescript` module, with _1, _2 etc. // If you change this, make sure to also update ../coffeescript/package.js to match. - version: '2.3.2_1' + version: '2.4.1' }); Npm.depends({ - 'coffeescript': '2.3.2', + 'coffeescript': '2.4.1', 'source-map': '0.5.7' }); Package.onUse(function (api) { - api.use('babel-compiler@6.24.7||7.1.1'); - api.use('ecmascript@0.11.1'); + api.versionsFrom("1.8.1"); + api.use('babel-compiler'); + api.use('ecmascript'); api.mainModule('coffeescript-compiler.js', 'server'); diff --git a/packages/non-core/coffeescript-test-helper/package.js b/packages/non-core/coffeescript-test-helper/package.js index b208cca667..1cd0be0ea4 100644 --- a/packages/non-core/coffeescript-test-helper/package.js +++ b/packages/non-core/coffeescript-test-helper/package.js @@ -1,10 +1,10 @@ Package.describe({ summary: "Used by the coffeescript package's tests", - version: "1.1.3" + version: "1.2.0" }); Package.onUse(function (api) { - api.use('coffeescript@2.2.1_1', ['client', 'server']); + api.use('coffeescript@2.4.1', ['client', 'server']); api.export('COFFEESCRIPT_EXPORTED'); api.export('COFFEESCRIPT_EXPORTED_ONE_MORE'); api.export('COFFEESCRIPT_EXPORTED_WITH_BACKTICKS'); diff --git a/packages/non-core/coffeescript/.npm/plugin/compile-coffeescript/npm-shrinkwrap.json b/packages/non-core/coffeescript/.npm/plugin/compile-coffeescript/npm-shrinkwrap.json index a59317fc81..30caf81d3c 100644 --- a/packages/non-core/coffeescript/.npm/plugin/compile-coffeescript/npm-shrinkwrap.json +++ b/packages/non-core/coffeescript/.npm/plugin/compile-coffeescript/npm-shrinkwrap.json @@ -2,14 +2,14 @@ "lockfileVersion": 1, "dependencies": { "@babel/runtime": { - "version": "7.1.2", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.1.2.tgz", - "integrity": "sha512-Y3SCjmhSupzFB6wcv1KmmFucH6gDVnI30WjOcicV10ju0cZjak3Jcs67YLIXBrmZYw1xCrVeJPbycFwrqNyxpg==" + "version": "7.6.0", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.6.0.tgz", + "integrity": "sha512-89eSBLJsxNxOERC0Op4vd+0Bqm6wRMqMbFtV3i0/fbaWw/mJ8Q3eBvgX0G4SyrOOLCtbu98HspF8o09MRT+KzQ==" }, "regenerator-runtime": { - "version": "0.12.1", - "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.12.1.tgz", - "integrity": "sha512-odxIc1/vDlo4iZcfXqRYFj0vpXFNoGdKMAUieAlFYO6m/nl5e9KR/beGf41z4a1FI+aQgtjhuaSlDxQ0hmkrHg==" + "version": "0.13.3", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.3.tgz", + "integrity": "sha512-naKIZz2GQ8JWh///G7L3X6LaQUAMp2lvb1rvwwsURe/VXwD6VMfr+/1NuNw3ag8v2kY1aQ/go5SNn79O9JU7yw==" } } } diff --git a/packages/non-core/coffeescript/package.js b/packages/non-core/coffeescript/package.js index 1fe5e6d492..a46a72ce04 100644 --- a/packages/non-core/coffeescript/package.js +++ b/packages/non-core/coffeescript/package.js @@ -6,12 +6,12 @@ Package.describe({ // so bumping the version of this package will be how they get newer versions // of `coffeescript-compiler`. If you change this, make sure to also update // ../coffeescript-compiler/package.js to match. - version: '2.3.2_1' + version: '2.4.1' }); Package.registerBuildPlugin({ name: 'compile-coffeescript', - use: ['caching-compiler@1.1.12', 'ecmascript@0.11.1', 'coffeescript-compiler@2.3.2_1'], + use: ['caching-compiler@1.2.1', 'ecmascript@0.12.7', 'coffeescript-compiler@2.4.1'], sources: ['compile-coffeescript.js'], npmDependencies: { // A breaking change was introduced in @babel/runtime@7.0.0-beta.56 @@ -22,11 +22,12 @@ Package.registerBuildPlugin({ // rather than delegating to the one installed in the application's // node_modules directory, so the coffeescript package can work in // Meteor 1.7.1 apps as well as 1.7.0.x and earlier. - '@babel/runtime': '7.1.2' + '@babel/runtime': '7.6.0' } }); Package.onUse(function (api) { + api.versionsFrom("1.8.1"); api.use('isobuild:compiler-plugin@1.0.0'); // Because the CoffeeScript plugin now calls @@ -35,10 +36,10 @@ Package.onUse(function (api) { // same runtime environment that the 'ecmascript' package provides. // The following api.imply calls should match those in ../../ecmascript/package.js, // except that coffeescript does not api.imply('modules'). - api.imply('ecmascript-runtime@0.7.0'); - api.imply('babel-runtime@1.2.4'); - api.imply('promise@0.11.1'); - api.imply('dynamic-import@0.4.1'); + api.imply('ecmascript-runtime'); + api.imply('babel-runtime'); + api.imply('promise'); + api.imply('dynamic-import'); }); Package.onTest(function (api) { From 0e19c365a8ee115db5b45e69a9f9173dd89cb29a Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Thu, 19 Sep 2019 15:15:47 -0400 Subject: [PATCH 229/327] Revert "Use json5 for optimisticReadJsonOrNull." This reverts commit 5124cb495c3ad13418fc08c45ac7720fcf8ecefb. Perhaps unsurprisingly, JSON5 is much slower than JSON, so much so that "other optimisticReadJsonOrNull" has become the single most expensive leaf when building one of our internal applications. We will have to find another solution. --- scripts/dev-bundle-tool-package.js | 1 - tools/fs/optimistic.ts | 5 +---- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/scripts/dev-bundle-tool-package.js b/scripts/dev-bundle-tool-package.js index d5f0a5f5f2..1c18504818 100644 --- a/scripts/dev-bundle-tool-package.js +++ b/scripts/dev-bundle-tool-package.js @@ -36,7 +36,6 @@ var packageJson = { "graceful-fs": "4.2.2", fstream: "https://github.com/meteor/fstream/tarball/cf4ea6c175355cec7bee38311e170d08c4078a5d", tar: "2.2.1", - json5: "2.1.0", kexec: "3.0.0", "source-map": "0.5.7", chalk: "0.5.1", diff --git a/tools/fs/optimistic.ts b/tools/fs/optimistic.ts index 64e6dbf676..c490c3c2cb 100644 --- a/tools/fs/optimistic.ts +++ b/tools/fs/optimistic.ts @@ -261,9 +261,6 @@ export const optimisticHashOrNull = makeOptimistic("hashOrNull", ( return null; }); -// A more tolerant implementation of JSON.parse. -const { parse: jsonParse } = require("json5"); - export const optimisticReadJsonOrNull = makeOptimistic("readJsonOrNull", ( path: string, @@ -272,7 +269,7 @@ makeOptimistic("readJsonOrNull", ( }, ) => { try { - return jsonParse( + return JSON.parse( optimisticReadFile(path, options) ) as Record; From df3fac2e1f972b3920b40e3f50db65770a1b53ce Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Thu, 19 Sep 2019 15:31:39 -0400 Subject: [PATCH 230/327] Sanitize risky whitespace characters to recover from failed JSON.parse. Partial alternative to using json5, which we tried in commit 5124cb495c3ad13418fc08c45ac7720fcf8ecefb, which was recently reverted due to performance concerns: 0e19c365a8ee115db5b45e69a9f9173dd89cb29a. Should solve the specific problem reported in #10688. --- tools/fs/optimistic.ts | 27 ++++++++++++++++++++++----- 1 file changed, 22 insertions(+), 5 deletions(-) diff --git a/tools/fs/optimistic.ts b/tools/fs/optimistic.ts index c490c3c2cb..376ad57ea7 100644 --- a/tools/fs/optimistic.ts +++ b/tools/fs/optimistic.ts @@ -261,29 +261,46 @@ export const optimisticHashOrNull = makeOptimistic("hashOrNull", ( return null; }); +const riskyJsonWhitespacePattern = + // Turns out a lot of weird characters technically count as /\s/ characters. + // This is all of them except for " ", "\n", and "\r", which are safe: + /[\t\b\f\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]+/g; + export const optimisticReadJsonOrNull = makeOptimistic("readJsonOrNull", ( path: string, options?: Parameters[1] & { allowSyntaxError?: boolean; }, -) => { +): Record | null => { + let contents: string | Buffer; try { - return JSON.parse( - optimisticReadFile(path, options) - ) as Record; - + contents = optimisticReadFile(path, options); } catch (e) { if (e.code === "ENOENT") { dependOnParentDirectory(path); return null; } + throw e; + } + try { + return JSON.parse(contents); + } catch (e) { if (e instanceof SyntaxError && options && options.allowSyntaxError) { return null; } + const stringContents: string = contents.toString("utf8"); + // Replace any risky whitespace characters with spaces, to address issue + // https://github.com/meteor/meteor/issues/10688 + const cleanContents = stringContents.replace(riskyJsonWhitespacePattern, " "); + if (cleanContents !== stringContents) { + // Try one last time to parse cleanContents before throwing. + return JSON.parse(cleanContents); + } + throw e; } }); From 9cba1234015ad90caa26d87bca90bef12e983545 Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Thu, 19 Sep 2019 17:44:46 -0400 Subject: [PATCH 231/327] Restore CLI progress messages by revisiting progress.ts conversion. I noticed recently that progress messages were no longer displayed (though the ASCII spinner was still animating). I bisected the problem to the progress.ts conversion in #10650, and I attempted to reproduce the conversion, step by step. The problem ended up being the renaming of ._title to .title, which was a mistake because external code accesses progress._title. Once I updated those invasive access points, progress messages began displaying once again. --- tools/console/console.js | 2 +- tools/console/progress.ts | 78 ++++++++++++++++--------------------- tools/utils/http-helpers.js | 2 +- 3 files changed, 35 insertions(+), 47 deletions(-) diff --git a/tools/console/console.js b/tools/console/console.js index 781f902af7..4c96edfe81 100644 --- a/tools/console/console.js +++ b/tools/console/console.js @@ -509,7 +509,7 @@ class StatusPoller { this._watching = watching; - var title = (watching != null ? watching._title : null) || FALLBACK_STATUS; + var title = (watching != null ? watching.title : null) || FALLBACK_STATUS; var progressDisplay = this._console._progressDisplay; progressDisplay.updateStatus && progressDisplay.updateStatus(title); diff --git a/tools/console/progress.ts b/tools/console/progress.ts index 58e1f64d76..7b50bfa876 100644 --- a/tools/console/progress.ts +++ b/tools/console/progress.ts @@ -19,41 +19,26 @@ type ProgressState = { * Watchers are invoked with a ProgressState object. */ export class Progress { - private title: string | null | void; - private isDone: boolean; - private forkJoin?: boolean; + public readonly title?: string; + public readonly startTime = Date.now(); - private parent?: Progress; + private parent: Progress | null; + private allTasks: Progress[] = []; + private selfState: ProgressState = { current: 0, done: false }; + private state: ProgressState = { current: 0, done: false }; + private isDone = false; private watchers: ProgressWatcher[]; - - private selfState: ProgressState; - private state: ProgressState; - - private allTasks: Progress[]; + private forkJoin: boolean; constructor(options: ProgressOptions = {}) { - this.parent = options.parent; + this.parent = options.parent || null; this.watchers = options.watchers || []; - - this.title = options.title; - if (this.title) { + this.forkJoin = !!options.forkJoin; + + if ((this.title = options.title)) { // Capitalize job titles when displayed in the progress bar. this.title = this.title[0].toUpperCase() + this.title.slice(1); } - - // XXX: Should we have a strict/mdg mode that enables this test? - //if (!this.title && this.parent) { - // throw new Error("No title passed"); - //} - - this.forkJoin = options.forkJoin; - - this.allTasks = []; - - this.selfState = { current: 0, done: false }; - this.state = {...this.selfState}; - - this.isDone = false; } toString() { @@ -118,38 +103,38 @@ export class Progress { } // Creates a subtask that must be completed as part of this (bigger) task - addChildTask(options: ProgressOptions = {}) { + addChildTask(options: ProgressOptions) { options = { parent: this, ...options, }; - const child = new Progress(options); this.allTasks.push(child); - this.reportChildState(child, child.state); - + this.reportChildState(); return child; } // Dumps the tree, for debug dump( stream: NodeJS.WriteStream, - options: { skipDone?: boolean } = {}, - prefix: string, + options?: { skipDone: boolean }, + prefix?: string, ) { - if (options.skipDone && this.isDone) { + if (options && options.skipDone && this.isDone) { return; } if (prefix) { stream.write(prefix); } - - const end = this.state.end; - stream.write("Task [" + this.title + "] " + this.state.current + "/" + (end || '?') + const end = this.state.end || '?'; + stream.write("Task [" + this.title + "] " + this.state.current + "/" + end + (this.isDone ? " done" : "") +"\n"); - - this.allTasks.forEach(child => child.dump(stream, options, (prefix || '') + ' ')); + if (this.allTasks.length) { + this.allTasks.forEach(child => { + child.dump(stream, options, (prefix || '') + ' '); + }); + } } // Receives a state report indicating progress of self @@ -165,24 +150,27 @@ export class Progress { } // Subscribes a watcher to changes - addWatcher(watcher: (state: ProgressState) => void) { + addWatcher(watcher: ProgressWatcher) { this.watchers.push(watcher); } // Notifies watchers & parents private notifyState() { if (this.parent) { - this.parent.reportChildState(this, this.state); + this.parent.reportChildState(); } - this.watchers.forEach(watcher => watcher(this.state)); + if (this.watchers.length) { + this.watchers.forEach(watcher => { + watcher(this.state); + }); + } } // Recomputes state, incorporating children's states private updateTotalState() { let allChildrenDone = true; - const state = {...this.selfState}; - + const state = { ...this.selfState }; this.allTasks.forEach(child => { const childState = child.state; @@ -216,7 +204,7 @@ export class Progress { } // Called by a child when its state changes - private reportChildState(_child: Progress, _state: ProgressState) { + private reportChildState() { this.updateTotalState(); this.notifyState(); } diff --git a/tools/utils/http-helpers.js b/tools/utils/http-helpers.js index 71e34303b0..09c291ba7e 100644 --- a/tools/utils/http-helpers.js +++ b/tools/utils/http-helpers.js @@ -463,7 +463,7 @@ _.extend(exports, { if (masterProgress && masterProgress.addChildTask) { options.progress = masterProgress.addChildTask({ - title: masterProgress._title + title: masterProgress.title }); } From c0f3222ea5896fee4cbd7bb954f7d2592ee81fea Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Thu, 19 Sep 2019 19:09:38 -0400 Subject: [PATCH 232/327] Bump package versions for 1.8.2-rc.1 release. --- packages/babel-compiler/package.js | 2 +- packages/babel-runtime/package.js | 2 +- packages/context/package.js | 2 +- packages/ecmascript-runtime-client/package.js | 2 +- packages/ecmascript-runtime-server/package.js | 2 +- packages/ecmascript/package.js | 2 +- packages/meteor-tool/package.js | 2 +- packages/minifier-css/package.js | 2 +- packages/minifier-js/package.js | 2 +- packages/modules-runtime/package.js | 2 +- packages/modules/package.js | 2 +- packages/mongo/package.js | 2 +- packages/npm-mongo/package.js | 2 +- packages/standard-minifier-css/package.js | 2 +- packages/standard-minifier-js/package.js | 2 +- packages/typescript/package.js | 2 +- scripts/admin/meteor-release-experimental.json | 2 +- 17 files changed, 17 insertions(+), 17 deletions(-) diff --git a/packages/babel-compiler/package.js b/packages/babel-compiler/package.js index 721d7785db..3bf21684a8 100644 --- a/packages/babel-compiler/package.js +++ b/packages/babel-compiler/package.js @@ -6,7 +6,7 @@ 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.4.0-rc182.0' + version: '7.4.0-rc182.1' }); Npm.depends({ diff --git a/packages/babel-runtime/package.js b/packages/babel-runtime/package.js index c57f7372dd..7900e11b71 100644 --- a/packages/babel-runtime/package.js +++ b/packages/babel-runtime/package.js @@ -1,7 +1,7 @@ Package.describe({ name: "babel-runtime", summary: "Runtime support for output of Babel transpiler", - version: '1.4.0-rc182.0', + version: '1.4.0-rc182.1', documentation: 'README.md' }); diff --git a/packages/context/package.js b/packages/context/package.js index 1ebd2e1fdc..afb97bbd1f 100644 --- a/packages/context/package.js +++ b/packages/context/package.js @@ -1,6 +1,6 @@ Package.describe({ name: "context", - version: "0.4.0-rc182.0", + version: "0.4.0-rc182.1", summary: "Manage contextual information without passing objects around", documentation: "README.md" }); diff --git a/packages/ecmascript-runtime-client/package.js b/packages/ecmascript-runtime-client/package.js index ff508479f0..3b3b0c9a7a 100644 --- a/packages/ecmascript-runtime-client/package.js +++ b/packages/ecmascript-runtime-client/package.js @@ -1,6 +1,6 @@ Package.describe({ name: "ecmascript-runtime-client", - version: "0.9.0-rc182.0", + version: "0.9.0-rc182.1", summary: "Polyfills for new ECMAScript 2015 APIs like Map and Set", git: "https://github.com/meteor/meteor/tree/devel/packages/ecmascript-runtime-client", documentation: "README.md" diff --git a/packages/ecmascript-runtime-server/package.js b/packages/ecmascript-runtime-server/package.js index 71fee4d6f9..ea50ca5128 100644 --- a/packages/ecmascript-runtime-server/package.js +++ b/packages/ecmascript-runtime-server/package.js @@ -1,6 +1,6 @@ Package.describe({ name: "ecmascript-runtime-server", - version: "0.8.0-rc182.0", + version: "0.8.0-rc182.1", summary: "Polyfills for new ECMAScript 2015 APIs like Map and Set", git: "https://github.com/meteor/meteor/tree/devel/packages/ecmascript-runtime-client", documentation: "README.md" diff --git a/packages/ecmascript/package.js b/packages/ecmascript/package.js index 0f32b54d0a..81fbe7ffc7 100644 --- a/packages/ecmascript/package.js +++ b/packages/ecmascript/package.js @@ -1,6 +1,6 @@ Package.describe({ name: 'ecmascript', - version: '0.13.0-rc182.0', + version: '0.13.0-rc182.1', summary: 'Compiler plugin that supports ES2015+ in all .js files', documentation: 'README.md' }); diff --git a/packages/meteor-tool/package.js b/packages/meteor-tool/package.js index cdbbdfe478..bc487391e0 100644 --- a/packages/meteor-tool/package.js +++ b/packages/meteor-tool/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "The Meteor command-line tool", - version: '1.8.2-rc.0' + version: '1.8.2-rc.1' }); Package.includeTool(); diff --git a/packages/minifier-css/package.js b/packages/minifier-css/package.js index 3380cf0984..19b8a100b6 100644 --- a/packages/minifier-css/package.js +++ b/packages/minifier-css/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: 'CSS minifier', - version: '1.4.3-rc182.0' + version: '1.4.3-rc182.1' }); Npm.depends({ diff --git a/packages/minifier-js/package.js b/packages/minifier-js/package.js index fa319ae271..e3037b8783 100644 --- a/packages/minifier-js/package.js +++ b/packages/minifier-js/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "JavaScript minifier", - version: "2.5.0-rc182.0" + version: "2.5.0-rc182.1" }); Npm.depends({ diff --git a/packages/modules-runtime/package.js b/packages/modules-runtime/package.js index 0b653264a4..33ebf725d2 100644 --- a/packages/modules-runtime/package.js +++ b/packages/modules-runtime/package.js @@ -1,6 +1,6 @@ Package.describe({ name: "modules-runtime", - version: "0.11.0-rc182.0", + version: "0.11.0-rc182.1", summary: "CommonJS module system", git: "https://github.com/benjamn/install", documentation: "README.md" diff --git a/packages/modules/package.js b/packages/modules/package.js index 88de0ee2be..ae9a78e19d 100644 --- a/packages/modules/package.js +++ b/packages/modules/package.js @@ -1,6 +1,6 @@ Package.describe({ name: "modules", - version: "0.14.0-rc182.0", + version: "0.14.0-rc182.1", summary: "CommonJS module system", documentation: "README.md" }); diff --git a/packages/mongo/package.js b/packages/mongo/package.js index d35c3cb019..8ebf9212ad 100644 --- a/packages/mongo/package.js +++ b/packages/mongo/package.js @@ -9,7 +9,7 @@ Package.describe({ summary: "Adaptor for using MongoDB and Minimongo over DDP", - version: '1.7.0-rc182.0' + version: '1.7.0-rc182.1' }); Npm.depends({ diff --git a/packages/npm-mongo/package.js b/packages/npm-mongo/package.js index 78086dd1e6..fce4c1f479 100644 --- a/packages/npm-mongo/package.js +++ b/packages/npm-mongo/package.js @@ -3,7 +3,7 @@ Package.describe({ summary: "Wrapper around the mongo npm package", - version: "3.2.0-rc182.0", + version: "3.2.0-rc182.1", documentation: null }); diff --git a/packages/standard-minifier-css/package.js b/packages/standard-minifier-css/package.js index 41a7952b88..1a45614650 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.5.4-rc182.0', + version: '1.5.4-rc182.1', summary: 'Standard css minifier used with Meteor apps by default.', documentation: 'README.md' }); diff --git a/packages/standard-minifier-js/package.js b/packages/standard-minifier-js/package.js index 0b3680082d..f32cd4aa8b 100644 --- a/packages/standard-minifier-js/package.js +++ b/packages/standard-minifier-js/package.js @@ -1,6 +1,6 @@ Package.describe({ name: 'standard-minifier-js', - version: '2.5.0-rc182.0', + version: '2.5.0-rc182.1', summary: 'Standard javascript minifiers used with Meteor apps by default.', documentation: 'README.md', }); diff --git a/packages/typescript/package.js b/packages/typescript/package.js index 2197102160..11d97f681d 100644 --- a/packages/typescript/package.js +++ b/packages/typescript/package.js @@ -1,6 +1,6 @@ Package.describe({ name: "typescript", - version: "3.6.2-rc182.0", + version: "3.6.2-rc182.1", summary: "Compiler plugin that compiles TypeScript and ECMAScript in .ts and .tsx files", documentation: "README.md" }); diff --git a/scripts/admin/meteor-release-experimental.json b/scripts/admin/meteor-release-experimental.json index ccc4f289f0..dafae671c3 100644 --- a/scripts/admin/meteor-release-experimental.json +++ b/scripts/admin/meteor-release-experimental.json @@ -1,6 +1,6 @@ { "track": "METEOR", - "version": "1.8.2-rc.0", + "version": "1.8.2-rc.1", "recommended": false, "official": false, "description": "Meteor" From 48d27202e70751fa7d2d624349fff36b1da8a1e9 Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Sun, 22 Sep 2019 11:34:22 -0400 Subject: [PATCH 233/327] Skip watching output files without absPath or sourcePath properties. https://github.com/meteor/meteor/pull/10522#issuecomment-533393100 --- tools/isobuild/compiler-plugin.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tools/isobuild/compiler-plugin.js b/tools/isobuild/compiler-plugin.js index 66b26da0a2..b29adce44c 100644 --- a/tools/isobuild/compiler-plugin.js +++ b/tools/isobuild/compiler-plugin.js @@ -1490,10 +1490,14 @@ export class PackageSourceBatch { // Watch all output files produced by computeJsOutputFilesMap. jsOutputFilesMap.forEach(entry => { entry.files.forEach(file => { - const absPath = file.absPath || - files.pathJoin(entry.batch.sourceRoot, file.sourcePath); + const { + sourcePath, + absPath = sourcePath && + files.pathJoin(entry.batch.sourceRoot, sourcePath), + } = file; const watchSet = entry.batch.unibuild.watchSet; if ( + typeof absPath === "string" && // Blindly calling watchSet.addFile would be logically correct here, // but we can save the cost of calling optimisticHashOrNull(absPath) // if the watchSet already knows about the file and it was not marked From 62faa518a05c04e88248ff11b03759627292e156 Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Mon, 23 Sep 2019 10:06:43 -0400 Subject: [PATCH 234/327] Bump package versions for 1.8.2-rc.2 release. --- packages/babel-compiler/package.js | 2 +- packages/babel-runtime/package.js | 2 +- packages/context/package.js | 2 +- packages/ecmascript-runtime-client/package.js | 2 +- packages/ecmascript-runtime-server/package.js | 2 +- packages/ecmascript/package.js | 2 +- packages/meteor-tool/package.js | 2 +- packages/minifier-css/package.js | 2 +- packages/minifier-js/package.js | 2 +- packages/modules-runtime/package.js | 2 +- packages/modules/package.js | 2 +- packages/mongo/package.js | 2 +- packages/npm-mongo/package.js | 2 +- packages/standard-minifier-css/package.js | 2 +- packages/standard-minifier-js/package.js | 2 +- packages/typescript/package.js | 2 +- scripts/admin/meteor-release-experimental.json | 2 +- 17 files changed, 17 insertions(+), 17 deletions(-) diff --git a/packages/babel-compiler/package.js b/packages/babel-compiler/package.js index 3bf21684a8..01b3098061 100644 --- a/packages/babel-compiler/package.js +++ b/packages/babel-compiler/package.js @@ -6,7 +6,7 @@ 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.4.0-rc182.1' + version: '7.4.0-rc182.2' }); Npm.depends({ diff --git a/packages/babel-runtime/package.js b/packages/babel-runtime/package.js index 7900e11b71..6400fe539f 100644 --- a/packages/babel-runtime/package.js +++ b/packages/babel-runtime/package.js @@ -1,7 +1,7 @@ Package.describe({ name: "babel-runtime", summary: "Runtime support for output of Babel transpiler", - version: '1.4.0-rc182.1', + version: '1.4.0-rc182.2', documentation: 'README.md' }); diff --git a/packages/context/package.js b/packages/context/package.js index afb97bbd1f..03df3110f6 100644 --- a/packages/context/package.js +++ b/packages/context/package.js @@ -1,6 +1,6 @@ Package.describe({ name: "context", - version: "0.4.0-rc182.1", + version: "0.4.0-rc182.2", summary: "Manage contextual information without passing objects around", documentation: "README.md" }); diff --git a/packages/ecmascript-runtime-client/package.js b/packages/ecmascript-runtime-client/package.js index 3b3b0c9a7a..a9318ede0d 100644 --- a/packages/ecmascript-runtime-client/package.js +++ b/packages/ecmascript-runtime-client/package.js @@ -1,6 +1,6 @@ Package.describe({ name: "ecmascript-runtime-client", - version: "0.9.0-rc182.1", + version: "0.9.0-rc182.2", summary: "Polyfills for new ECMAScript 2015 APIs like Map and Set", git: "https://github.com/meteor/meteor/tree/devel/packages/ecmascript-runtime-client", documentation: "README.md" diff --git a/packages/ecmascript-runtime-server/package.js b/packages/ecmascript-runtime-server/package.js index ea50ca5128..086b01b4eb 100644 --- a/packages/ecmascript-runtime-server/package.js +++ b/packages/ecmascript-runtime-server/package.js @@ -1,6 +1,6 @@ Package.describe({ name: "ecmascript-runtime-server", - version: "0.8.0-rc182.1", + version: "0.8.0-rc182.2", summary: "Polyfills for new ECMAScript 2015 APIs like Map and Set", git: "https://github.com/meteor/meteor/tree/devel/packages/ecmascript-runtime-client", documentation: "README.md" diff --git a/packages/ecmascript/package.js b/packages/ecmascript/package.js index 81fbe7ffc7..0d6eb7d8b7 100644 --- a/packages/ecmascript/package.js +++ b/packages/ecmascript/package.js @@ -1,6 +1,6 @@ Package.describe({ name: 'ecmascript', - version: '0.13.0-rc182.1', + version: '0.13.0-rc182.2', summary: 'Compiler plugin that supports ES2015+ in all .js files', documentation: 'README.md' }); diff --git a/packages/meteor-tool/package.js b/packages/meteor-tool/package.js index bc487391e0..1b03fe3c05 100644 --- a/packages/meteor-tool/package.js +++ b/packages/meteor-tool/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "The Meteor command-line tool", - version: '1.8.2-rc.1' + version: '1.8.2-rc.2' }); Package.includeTool(); diff --git a/packages/minifier-css/package.js b/packages/minifier-css/package.js index 19b8a100b6..79b0667e3e 100644 --- a/packages/minifier-css/package.js +++ b/packages/minifier-css/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: 'CSS minifier', - version: '1.4.3-rc182.1' + version: '1.4.3-rc182.2' }); Npm.depends({ diff --git a/packages/minifier-js/package.js b/packages/minifier-js/package.js index e3037b8783..2d44b04922 100644 --- a/packages/minifier-js/package.js +++ b/packages/minifier-js/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "JavaScript minifier", - version: "2.5.0-rc182.1" + version: "2.5.0-rc182.2" }); Npm.depends({ diff --git a/packages/modules-runtime/package.js b/packages/modules-runtime/package.js index 33ebf725d2..d528b99e81 100644 --- a/packages/modules-runtime/package.js +++ b/packages/modules-runtime/package.js @@ -1,6 +1,6 @@ Package.describe({ name: "modules-runtime", - version: "0.11.0-rc182.1", + version: "0.11.0-rc182.2", summary: "CommonJS module system", git: "https://github.com/benjamn/install", documentation: "README.md" diff --git a/packages/modules/package.js b/packages/modules/package.js index ae9a78e19d..55fe3c0e23 100644 --- a/packages/modules/package.js +++ b/packages/modules/package.js @@ -1,6 +1,6 @@ Package.describe({ name: "modules", - version: "0.14.0-rc182.1", + version: "0.14.0-rc182.2", summary: "CommonJS module system", documentation: "README.md" }); diff --git a/packages/mongo/package.js b/packages/mongo/package.js index 8ebf9212ad..c2123f29e3 100644 --- a/packages/mongo/package.js +++ b/packages/mongo/package.js @@ -9,7 +9,7 @@ Package.describe({ summary: "Adaptor for using MongoDB and Minimongo over DDP", - version: '1.7.0-rc182.1' + version: '1.7.0-rc182.2' }); Npm.depends({ diff --git a/packages/npm-mongo/package.js b/packages/npm-mongo/package.js index fce4c1f479..4f241bb49c 100644 --- a/packages/npm-mongo/package.js +++ b/packages/npm-mongo/package.js @@ -3,7 +3,7 @@ Package.describe({ summary: "Wrapper around the mongo npm package", - version: "3.2.0-rc182.1", + version: "3.2.0-rc182.2", documentation: null }); diff --git a/packages/standard-minifier-css/package.js b/packages/standard-minifier-css/package.js index 1a45614650..2da03bda5e 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.5.4-rc182.1', + version: '1.5.4-rc182.2', summary: 'Standard css minifier used with Meteor apps by default.', documentation: 'README.md' }); diff --git a/packages/standard-minifier-js/package.js b/packages/standard-minifier-js/package.js index f32cd4aa8b..6d7f333201 100644 --- a/packages/standard-minifier-js/package.js +++ b/packages/standard-minifier-js/package.js @@ -1,6 +1,6 @@ Package.describe({ name: 'standard-minifier-js', - version: '2.5.0-rc182.1', + version: '2.5.0-rc182.2', summary: 'Standard javascript minifiers used with Meteor apps by default.', documentation: 'README.md', }); diff --git a/packages/typescript/package.js b/packages/typescript/package.js index 11d97f681d..d823b7b619 100644 --- a/packages/typescript/package.js +++ b/packages/typescript/package.js @@ -1,6 +1,6 @@ Package.describe({ name: "typescript", - version: "3.6.2-rc182.1", + version: "3.6.2-rc182.2", summary: "Compiler plugin that compiles TypeScript and ECMAScript in .ts and .tsx files", documentation: "README.md" }); diff --git a/scripts/admin/meteor-release-experimental.json b/scripts/admin/meteor-release-experimental.json index dafae671c3..87b67c7416 100644 --- a/scripts/admin/meteor-release-experimental.json +++ b/scripts/admin/meteor-release-experimental.json @@ -1,6 +1,6 @@ { "track": "METEOR", - "version": "1.8.2-rc.1", + "version": "1.8.2-rc.2", "recommended": false, "official": false, "description": "Meteor" From a102e5fe379b1ee16a46ef1d674da18d8a701c75 Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Mon, 23 Sep 2019 12:00:55 -0400 Subject: [PATCH 235/327] Use optimisticStatOrNull in readAndStatDirectory. This drastically (by more than half) cuts down the number of calls to files.stat that occur during PackageSource#_findSources scanning. --- tools/fs/watch.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/fs/watch.ts b/tools/fs/watch.ts index 70ae2f6bc6..44afacdde1 100644 --- a/tools/fs/watch.ts +++ b/tools/fs/watch.ts @@ -6,6 +6,7 @@ import { coalesce } from "../utils/func-utils"; import { Profile } from "../tool-env/profile"; import { optimisticHashOrNull, + optimisticStatOrNull, } from "./optimistic"; const _ = require("underscore"); @@ -352,7 +353,7 @@ function readAndStatDirectory(absPath: string) { contents.forEach(entry => { // We do stat instead of lstat here, so that we treat symlinks to // directories just like directories themselves. - const stat = files.statOrNull(files.pathJoin(absPath, entry)); + const stat = optimisticStatOrNull(files.pathJoin(absPath, entry)); if (! stat) { // Disappeared after the readdir (or a dangling symlink)? // Eh, pretend it was never there in the first place. From f5c85a02437522d576f50433f8d1d9343d238dec Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Mon, 23 Sep 2019 12:18:26 -0400 Subject: [PATCH 236/327] Update typescript and optimism packages to latest versions. --- History.md | 2 +- scripts/dev-bundle-tool-package.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/History.md b/History.md index 728a2639be..0beb79cef2 100644 --- a/History.md +++ b/History.md @@ -83,7 +83,7 @@ N/A * The `node-gyp` npm package has been updated to version 5.0.1, and `node-pre-gyp` has been updated to 0.13.0. -* The `optimism` npm package has been updated to version 0.11.2, which +* The `optimism` npm package has been updated to version 0.11.3, which enables caching of thrown exceptions as well as ordinary results, in addition to performance improvements. diff --git a/scripts/dev-bundle-tool-package.js b/scripts/dev-bundle-tool-package.js index 1c18504818..5836478c58 100644 --- a/scripts/dev-bundle-tool-package.js +++ b/scripts/dev-bundle-tool-package.js @@ -14,7 +14,7 @@ var packageJson = { pacote: "https://github.com/meteor/pacote/tarball/00b3b094e6074e45fc221d5bd96419d07ea34c6a", "node-gyp": "5.0.1", "node-pre-gyp": "0.13.0", - typescript: "3.6.2", + typescript: "3.6.3", "meteor-babel": "7.6.1", // Keep the versions of these packages consistent with the versions // found in dev-bundle-server-package.js. @@ -58,7 +58,7 @@ var packageJson = { pathwatcher: "8.1.0", // The @wry/context package version must be compatible with the // version constraint imposed by optimism/package.json. - optimism: "0.11.2", + optimism: "0.11.3", "@wry/context": "0.4.4", 'lru-cache': '4.1.3' } From ef289cf044941bae95c0bbe1e73af70084f0712f Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Mon, 23 Sep 2019 12:20:00 -0400 Subject: [PATCH 237/327] Bump $BUNDLE_VERSION to 8.16.1.3 before rebuilding dev bundle. --- meteor | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meteor b/meteor index 2ab0b33f8b..e6c4894337 100755 --- a/meteor +++ b/meteor @@ -1,6 +1,6 @@ #!/usr/bin/env bash -BUNDLE_VERSION=8.16.1.2 +BUNDLE_VERSION=8.16.1.3 # OS Check. Put here because here is where we download the precompiled # bundles that are arch specific. From 8dd87a663658fc1591aa1b6aaec76abeae64ada7 Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Mon, 23 Sep 2019 12:26:57 -0400 Subject: [PATCH 238/327] Bump package versions for 1.8.2-rc.3 release. --- packages/babel-compiler/package.js | 2 +- packages/babel-runtime/package.js | 2 +- packages/context/package.js | 2 +- packages/ecmascript-runtime-client/package.js | 2 +- packages/ecmascript-runtime-server/package.js | 2 +- packages/ecmascript/package.js | 2 +- packages/meteor-tool/package.js | 2 +- packages/minifier-css/package.js | 2 +- packages/minifier-js/package.js | 2 +- packages/modules-runtime/package.js | 2 +- packages/modules/package.js | 2 +- packages/mongo/package.js | 2 +- packages/npm-mongo/package.js | 2 +- packages/standard-minifier-css/package.js | 2 +- packages/standard-minifier-js/package.js | 2 +- packages/typescript/package.js | 2 +- scripts/admin/meteor-release-experimental.json | 2 +- 17 files changed, 17 insertions(+), 17 deletions(-) diff --git a/packages/babel-compiler/package.js b/packages/babel-compiler/package.js index 01b3098061..8bb9521b43 100644 --- a/packages/babel-compiler/package.js +++ b/packages/babel-compiler/package.js @@ -6,7 +6,7 @@ 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.4.0-rc182.2' + version: '7.4.0-rc182.3' }); Npm.depends({ diff --git a/packages/babel-runtime/package.js b/packages/babel-runtime/package.js index 6400fe539f..1899a6d952 100644 --- a/packages/babel-runtime/package.js +++ b/packages/babel-runtime/package.js @@ -1,7 +1,7 @@ Package.describe({ name: "babel-runtime", summary: "Runtime support for output of Babel transpiler", - version: '1.4.0-rc182.2', + version: '1.4.0-rc182.3', documentation: 'README.md' }); diff --git a/packages/context/package.js b/packages/context/package.js index 03df3110f6..ec43aa12af 100644 --- a/packages/context/package.js +++ b/packages/context/package.js @@ -1,6 +1,6 @@ Package.describe({ name: "context", - version: "0.4.0-rc182.2", + version: "0.4.0-rc182.3", summary: "Manage contextual information without passing objects around", documentation: "README.md" }); diff --git a/packages/ecmascript-runtime-client/package.js b/packages/ecmascript-runtime-client/package.js index a9318ede0d..95d792ef19 100644 --- a/packages/ecmascript-runtime-client/package.js +++ b/packages/ecmascript-runtime-client/package.js @@ -1,6 +1,6 @@ Package.describe({ name: "ecmascript-runtime-client", - version: "0.9.0-rc182.2", + version: "0.9.0-rc182.3", summary: "Polyfills for new ECMAScript 2015 APIs like Map and Set", git: "https://github.com/meteor/meteor/tree/devel/packages/ecmascript-runtime-client", documentation: "README.md" diff --git a/packages/ecmascript-runtime-server/package.js b/packages/ecmascript-runtime-server/package.js index 086b01b4eb..62c8bd917d 100644 --- a/packages/ecmascript-runtime-server/package.js +++ b/packages/ecmascript-runtime-server/package.js @@ -1,6 +1,6 @@ Package.describe({ name: "ecmascript-runtime-server", - version: "0.8.0-rc182.2", + version: "0.8.0-rc182.3", summary: "Polyfills for new ECMAScript 2015 APIs like Map and Set", git: "https://github.com/meteor/meteor/tree/devel/packages/ecmascript-runtime-client", documentation: "README.md" diff --git a/packages/ecmascript/package.js b/packages/ecmascript/package.js index 0d6eb7d8b7..70bb44e841 100644 --- a/packages/ecmascript/package.js +++ b/packages/ecmascript/package.js @@ -1,6 +1,6 @@ Package.describe({ name: 'ecmascript', - version: '0.13.0-rc182.2', + version: '0.13.0-rc182.3', summary: 'Compiler plugin that supports ES2015+ in all .js files', documentation: 'README.md' }); diff --git a/packages/meteor-tool/package.js b/packages/meteor-tool/package.js index 1b03fe3c05..f17dc5cdf5 100644 --- a/packages/meteor-tool/package.js +++ b/packages/meteor-tool/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "The Meteor command-line tool", - version: '1.8.2-rc.2' + version: '1.8.2-rc.3' }); Package.includeTool(); diff --git a/packages/minifier-css/package.js b/packages/minifier-css/package.js index 79b0667e3e..ef1cc8af9a 100644 --- a/packages/minifier-css/package.js +++ b/packages/minifier-css/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: 'CSS minifier', - version: '1.4.3-rc182.2' + version: '1.4.3-rc182.3' }); Npm.depends({ diff --git a/packages/minifier-js/package.js b/packages/minifier-js/package.js index 2d44b04922..43ad9f94fc 100644 --- a/packages/minifier-js/package.js +++ b/packages/minifier-js/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "JavaScript minifier", - version: "2.5.0-rc182.2" + version: "2.5.0-rc182.3" }); Npm.depends({ diff --git a/packages/modules-runtime/package.js b/packages/modules-runtime/package.js index d528b99e81..cf339de8c0 100644 --- a/packages/modules-runtime/package.js +++ b/packages/modules-runtime/package.js @@ -1,6 +1,6 @@ Package.describe({ name: "modules-runtime", - version: "0.11.0-rc182.2", + version: "0.11.0-rc182.3", summary: "CommonJS module system", git: "https://github.com/benjamn/install", documentation: "README.md" diff --git a/packages/modules/package.js b/packages/modules/package.js index 55fe3c0e23..025e80c3b5 100644 --- a/packages/modules/package.js +++ b/packages/modules/package.js @@ -1,6 +1,6 @@ Package.describe({ name: "modules", - version: "0.14.0-rc182.2", + version: "0.14.0-rc182.3", summary: "CommonJS module system", documentation: "README.md" }); diff --git a/packages/mongo/package.js b/packages/mongo/package.js index c2123f29e3..43070f26f6 100644 --- a/packages/mongo/package.js +++ b/packages/mongo/package.js @@ -9,7 +9,7 @@ Package.describe({ summary: "Adaptor for using MongoDB and Minimongo over DDP", - version: '1.7.0-rc182.2' + version: '1.7.0-rc182.3' }); Npm.depends({ diff --git a/packages/npm-mongo/package.js b/packages/npm-mongo/package.js index 4f241bb49c..b4aaf15ff2 100644 --- a/packages/npm-mongo/package.js +++ b/packages/npm-mongo/package.js @@ -3,7 +3,7 @@ Package.describe({ summary: "Wrapper around the mongo npm package", - version: "3.2.0-rc182.2", + version: "3.2.0-rc182.3", documentation: null }); diff --git a/packages/standard-minifier-css/package.js b/packages/standard-minifier-css/package.js index 2da03bda5e..fd6f4aaf97 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.5.4-rc182.2', + version: '1.5.4-rc182.3', summary: 'Standard css minifier used with Meteor apps by default.', documentation: 'README.md' }); diff --git a/packages/standard-minifier-js/package.js b/packages/standard-minifier-js/package.js index 6d7f333201..c175928021 100644 --- a/packages/standard-minifier-js/package.js +++ b/packages/standard-minifier-js/package.js @@ -1,6 +1,6 @@ Package.describe({ name: 'standard-minifier-js', - version: '2.5.0-rc182.2', + version: '2.5.0-rc182.3', summary: 'Standard javascript minifiers used with Meteor apps by default.', documentation: 'README.md', }); diff --git a/packages/typescript/package.js b/packages/typescript/package.js index d823b7b619..6f704ca939 100644 --- a/packages/typescript/package.js +++ b/packages/typescript/package.js @@ -1,6 +1,6 @@ Package.describe({ name: "typescript", - version: "3.6.2-rc182.2", + version: "3.6.2-rc182.3", summary: "Compiler plugin that compiles TypeScript and ECMAScript in .ts and .tsx files", documentation: "README.md" }); diff --git a/scripts/admin/meteor-release-experimental.json b/scripts/admin/meteor-release-experimental.json index 87b67c7416..d8cc67e514 100644 --- a/scripts/admin/meteor-release-experimental.json +++ b/scripts/admin/meteor-release-experimental.json @@ -1,6 +1,6 @@ { "track": "METEOR", - "version": "1.8.2-rc.2", + "version": "1.8.2-rc.3", "recommended": false, "official": false, "description": "Meteor" From 8c187586ae79e331beacf10a8e2287d8ee6c6b99 Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Mon, 23 Sep 2019 12:50:46 -0400 Subject: [PATCH 239/327] Update typescript plugin patch version to match npm version. --- packages/typescript/package.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/typescript/package.js b/packages/typescript/package.js index 6f704ca939..9c5279951e 100644 --- a/packages/typescript/package.js +++ b/packages/typescript/package.js @@ -1,6 +1,6 @@ Package.describe({ name: "typescript", - version: "3.6.2-rc182.3", + version: "3.6.3-rc182.3", summary: "Compiler plugin that compiles TypeScript and ECMAScript in .ts and .tsx files", documentation: "README.md" }); From e209c7076b6e63c967155d01aee2ad57eee26142 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B0=AD=E4=B9=9D=E9=BC=8E?= <109224573@qq.com> Date: Wed, 9 Oct 2019 11:30:21 +0800 Subject: [PATCH 240/327] Chore: Use https in readme --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 41c0e884eb..2d0593dc8f 100644 --- a/README.md +++ b/README.md @@ -47,8 +47,8 @@ meteor Building an application with Meteor? -* Announcement list: sign up at http://www.meteor.com/ -* Having problems? Ask for help at: http://stackoverflow.com/questions/tagged/meteor +* 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/ Interested in helping or contributing to Meteor? These resources will help: From 01bf44adffbb65e847e14c7158c57683afefff37 Mon Sep 17 00:00:00 2001 From: Gabriel Medeiros Coelho Date: Tue, 15 Oct 2019 13:02:49 -0300 Subject: [PATCH 241/327] change success variable declaration Since variables defined with const are not supposed to be reassigned, 'success = false' could cause errors. Changed declaration to let to avoid that. --- packages/check/match_test.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/check/match_test.js b/packages/check/match_test.js index 33f2a72440..59c20fb69c 100644 --- a/packages/check/match_test.js +++ b/packages/check/match_test.js @@ -446,7 +446,7 @@ Meteor.isServer && Tinytest.addAsync('check - non-fiber check works', (test, onC // Get out of a fiber with process.nextTick and ensure that we can still use // check. process.nextTick(() => { - const success = true; + let success = true; if (Fiber.current) { success = false; } From bccf9d804eb4652dfc4a8d7c7d704213e4f4b94f Mon Sep 17 00:00:00 2001 From: Pedro Luiz Cabral Salomon Prado Date: Tue, 15 Oct 2019 14:43:10 -0300 Subject: [PATCH 242/327] Use String.prototype.endsWith instead of indexOf (#10739) Fix alert [found](https://lgtm.com/projects/g/meteor/meteor/snapshot/10a004e1c3dd923b9902c2a50e7b36109ff23d36/files/tools/fs/files.js?sort=name&dir=ASC&mode=heatmap#L1445) in LGTM platform --- tools/fs/files.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/fs/files.js b/tools/fs/files.js index 02a4c7353e..804226c79e 100644 --- a/tools/fs/files.js +++ b/tools/fs/files.js @@ -1442,7 +1442,7 @@ files.currentEnvWithPathsAdded = function (...paths) { // add .bat extension to link file if not present var ensureBatExtension = function (p) { - if (p.indexOf(".bat") !== p.length - 4) { + if (p.endsWith(".bat")) { p = p + ".bat"; } return p; From f08ae216668b462441de29e064318cbc742c3038 Mon Sep 17 00:00:00 2001 From: seke Date: Thu, 24 Oct 2019 11:01:09 +0200 Subject: [PATCH 243/327] Small improvement to hashStampedToken --- packages/accounts-base/accounts_server.js | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/packages/accounts-base/accounts_server.js b/packages/accounts-base/accounts_server.js index fc2a89dd2f..abce89da1d 100644 --- a/packages/accounts-base/accounts_server.js +++ b/packages/accounts-base/accounts_server.js @@ -785,15 +785,10 @@ export class AccountsServer extends AccountsCommon { // {token, when} => {hashedToken, when} _hashStampedToken(stampedToken) { - const hashedStampedToken = Object.keys(stampedToken).reduce( - (prev, key) => key === 'token' ? - prev : - { ...prev, [key]: stampedToken[key] }, - {}, - ) + const { token, ...hashedStampedToken } = stampedToken; return { ...hashedStampedToken, - hashedToken: this._hashLoginToken(stampedToken.token) + hashedToken: this._hashLoginToken(token) }; }; From bbd256ffd13be52e2a267325ee15e303a38dfde5 Mon Sep 17 00:00:00 2001 From: filipenevola Date: Thu, 5 Sep 2019 15:00:20 +0200 Subject: [PATCH 244/327] Fix "Cannot find module" error when using dynamic and nested imports. Fixes #10643. --- tools/isobuild/import-scanner.ts | 40 +++++++++++++++++++++++++------- 1 file changed, 31 insertions(+), 9 deletions(-) diff --git a/tools/isobuild/import-scanner.ts b/tools/isobuild/import-scanner.ts index 64a8398cf0..c9321eca58 100644 --- a/tools/isobuild/import-scanner.ts +++ b/tools/isobuild/import-scanner.ts @@ -227,12 +227,19 @@ function ensureLeadingSlash(path?: string) { return posix; } +const Status = { + NOT_IMPORTED: false, + DYNAMIC: 'dynamic', + STATIC: 'static', +}; + // Files start with file.imported === false. As we scan the dependency // graph, a file can get promoted to "dynamic" or "static" to indicate // that it has been imported by other modules. The "dynamic" status trumps // false, and "static" trumps both "dynamic" and false. A file can never // be demoted to a lower status after it has been promoted. -const importedStatusOrder = [false, "dynamic", "static"]; +const importedStatusOrder = [Status.NOT_IMPORTED, Status.DYNAMIC, + Status.STATIC]; // Set each file.imported status to the maximum status of provided files. function alignImportedStatuses(...files: File[]) { @@ -242,11 +249,20 @@ function alignImportedStatuses(...files: File[]) { files.forEach(file => file.imported = maxStatus); } +function getParentStatus(importInfo) { + return importInfo.some(entry => !entry.parentWasDynamic) ? Status.STATIC : + Status.DYNAMIC; +} + +function isHigherStatus(newStatus, previousStatus) { + return importedStatusOrder.indexOf(newStatus) > + importedStatusOrder.indexOf(previousStatus); +} + // Set file.imported to status if status has a higher index than the // current value of file.imported. function setImportedStatus(file: File, status: string | boolean) { - if (importedStatusOrder.indexOf(status) > - importedStatusOrder.indexOf(file.imported)) { + if (isHigherStatus(status, file.imported)) { file.imported = status; } } @@ -789,7 +805,11 @@ export default class ImportScanner { // newlyMissing and merge the new identifiers back into // this.allMissingModules. Object.keys(newlyMissing).forEach(id => { - if (has(previousAllMissingModules, id)) { + const skipScan = has(previousAllMissingModules, id) && + !isHigherStatus(getParentStatus(newlyMissing[id]), + getParentStatus(previousAllMissingModules[id])); + + if (skipScan) { delete newlyMissing[id]; } else { ImportScanner.mergeMissing( @@ -999,7 +1019,8 @@ export default class ImportScanner { // they can be handled by the loop above. const file = this.getFile(resolved.path); if (file && file.alias) { - setImportedStatus(file, forDynamicImport ? "dynamic" : "static"); + setImportedStatus(file, forDynamicImport ? Status.DYNAMIC : + Status.STATIC); return file.alias; } } @@ -1031,14 +1052,14 @@ export default class ImportScanner { } if (forDynamicImport && - file.imported === "dynamic") { + file.imported === Status.DYNAMIC) { // If we've already scanned this file dynamically, then we don't // need to scan it dynamically again. return; } // Set file.imported to a truthy value (either "dynamic" or true). - setImportedStatus(file, forDynamicImport ? "dynamic" : "static"); + setImportedStatus(file, forDynamicImport ? Status.DYNAMIC : Status.STATIC); if (file.reportPendingErrors && file.reportPendingErrors() > 0) { @@ -1528,7 +1549,8 @@ export default class ImportScanner { if (file) { // If the file already exists, just update file.imported according // to the forDynamicImport parameter. - setImportedStatus(file, forDynamicImport ? "dynamic" : "static"); + setImportedStatus(file, forDynamicImport ? Status.DYNAMIC : + Status.STATIC); return file; } @@ -1549,7 +1571,7 @@ export default class ImportScanner { servePath: stripLeadingSlash(absModuleId), hash: sha1(data), lazy: true, - imported: forDynamicImport ? "dynamic" : "static", + imported: forDynamicImport ? Status.DYNAMIC : Status.STATIC, // Since _addPkgJsonToOutput is only ever called for package.json // files that are involved in resolving package directories, and pkg // is only a subset of the information in the actual package.json From 11e60dc22ec3de1e04acc063e6e7ab9a7a6a8cc5 Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Thu, 24 Oct 2019 18:14:26 -0400 Subject: [PATCH 245/327] Finish converting changes from PR #10730 to TypeScript. --- tools/isobuild/import-scanner.ts | 28 +++++++++++++++++----------- 1 file changed, 17 insertions(+), 11 deletions(-) diff --git a/tools/isobuild/import-scanner.ts b/tools/isobuild/import-scanner.ts index c9321eca58..d73ef61b6d 100644 --- a/tools/isobuild/import-scanner.ts +++ b/tools/isobuild/import-scanner.ts @@ -238,8 +238,11 @@ const Status = { // that it has been imported by other modules. The "dynamic" status trumps // false, and "static" trumps both "dynamic" and false. A file can never // be demoted to a lower status after it has been promoted. -const importedStatusOrder = [Status.NOT_IMPORTED, Status.DYNAMIC, - Status.STATIC]; +const importedStatusOrder = [ + Status.NOT_IMPORTED, + Status.DYNAMIC, + Status.STATIC, +]; // Set each file.imported status to the maximum status of provided files. function alignImportedStatuses(...files: File[]) { @@ -249,12 +252,16 @@ function alignImportedStatuses(...files: File[]) { files.forEach(file => file.imported = maxStatus); } -function getParentStatus(importInfo) { - return importInfo.some(entry => !entry.parentWasDynamic) ? Status.STATIC : - Status.DYNAMIC; +function getParentStatus(importInfos: ImportInfo[]) { + return importInfos.some(entry => !entry.parentWasDynamic) + ? Status.STATIC + : Status.DYNAMIC; } -function isHigherStatus(newStatus, previousStatus) { +function isHigherStatus( + newStatus: string | boolean, + previousStatus: string | boolean, +) { return importedStatusOrder.indexOf(newStatus) > importedStatusOrder.indexOf(previousStatus); } @@ -806,7 +813,8 @@ export default class ImportScanner { // this.allMissingModules. Object.keys(newlyMissing).forEach(id => { const skipScan = has(previousAllMissingModules, id) && - !isHigherStatus(getParentStatus(newlyMissing[id]), + !isHigherStatus( + getParentStatus(newlyMissing[id]), getParentStatus(previousAllMissingModules[id])); if (skipScan) { @@ -1019,8 +1027,7 @@ export default class ImportScanner { // they can be handled by the loop above. const file = this.getFile(resolved.path); if (file && file.alias) { - setImportedStatus(file, forDynamicImport ? Status.DYNAMIC : - Status.STATIC); + setImportedStatus(file, forDynamicImport ? Status.DYNAMIC : Status.STATIC); return file.alias; } } @@ -1549,8 +1556,7 @@ export default class ImportScanner { if (file) { // If the file already exists, just update file.imported according // to the forDynamicImport parameter. - setImportedStatus(file, forDynamicImport ? Status.DYNAMIC : - Status.STATIC); + setImportedStatus(file, forDynamicImport ? Status.DYNAMIC : Status.STATIC); return file; } From 11ef92725261d49ca8c86ca9b47179ac1fba23f3 Mon Sep 17 00:00:00 2001 From: Florian Kaiser Date: Thu, 24 Oct 2019 23:33:34 +0100 Subject: [PATCH 246/327] Remove qs-middleware from webapp package to avoid license issues (#10711) Closes #10707. --- packages/webapp/.npm/package/npm-shrinkwrap.json | 5 ----- packages/webapp/package.js | 2 +- packages/webapp/webapp_server.js | 7 +++++-- 3 files changed, 6 insertions(+), 8 deletions(-) diff --git a/packages/webapp/.npm/package/npm-shrinkwrap.json b/packages/webapp/.npm/package/npm-shrinkwrap.json index f9f1cbd82b..3223b4e7d5 100644 --- a/packages/webapp/.npm/package/npm-shrinkwrap.json +++ b/packages/webapp/.npm/package/npm-shrinkwrap.json @@ -192,11 +192,6 @@ "resolved": "https://registry.npmjs.org/qs/-/qs-6.4.0.tgz", "integrity": "sha1-E+JtKK1rD/qpExLNO/cI7TUecjM=" }, - "qs-middleware": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/qs-middleware/-/qs-middleware-1.0.3.tgz", - "integrity": "sha1-hPNTUnW6IP0AwhIu+szmqwEJLBk=" - }, "range-parser": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.0.tgz", diff --git a/packages/webapp/package.js b/packages/webapp/package.js index a041431640..65ed969146 100644 --- a/packages/webapp/package.js +++ b/packages/webapp/package.js @@ -11,7 +11,7 @@ Npm.depends({"basic-auth-connect": "1.0.0", parseurl: "1.3.2", send: "0.16.1", "stream-to-string": "1.1.0", - "qs-middleware": "1.0.3", + "qs": "6.4.0", useragent: "2.3.0"}); Npm.strip({ diff --git a/packages/webapp/webapp_server.js b/packages/webapp/webapp_server.js index 784964b08d..6bde057331 100644 --- a/packages/webapp/webapp_server.js +++ b/packages/webapp/webapp_server.js @@ -10,7 +10,7 @@ import { createHash } from "crypto"; import { connect } from "./connect.js"; import compress from "compression"; import cookieParser from "cookie-parser"; -import query from "qs-middleware"; +import qs from "qs"; import parseRequest from "parseurl"; import basicAuth from "basic-auth-connect"; import { lookup as lookupUserAgent } from "useragent"; @@ -850,7 +850,10 @@ function runWebAppServer() { // // Do this before the next middleware destroys req.url if a path prefix // is set to close #10111. - app.use(query()); + app.use(function (request, response, next) { + request.query = qs.parse(parseUrl(request.url).query); + next(); + }); function getPathParts(path) { const parts = path.split("/"); From 56c21a9796514a72652b939c503eab093c1c2c3f Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Thu, 24 Oct 2019 18:55:12 -0400 Subject: [PATCH 247/327] Attempt to make optimisticStatOrNull less expensive. (#10720) --- tools/fs/optimistic.ts | 58 +++++++++++++++++++++++++++++++----------- 1 file changed, 43 insertions(+), 15 deletions(-) diff --git a/tools/fs/optimistic.ts b/tools/fs/optimistic.ts index 376ad57ea7..c8a8d40b54 100644 --- a/tools/fs/optimistic.ts +++ b/tools/fs/optimistic.ts @@ -222,24 +222,52 @@ export function dirtyNodeModulesDirectory(nodeModulesDir: string) { dependOnDirectory.dirty(nodeModulesDir); } -export const optimisticStatOrNull = makeOptimistic("statOrNull", (path: string) => { - const result = statOrNull(path); - if (result === null) { - dependOnParentDirectory(path); +function makeCheapPathFunction( + pathFunction: (path: string) => TResult, +): typeof pathFunction { + if (! ENABLED) { + return pathFunction; } - return result; -}); + const wrapper = wrap(pathFunction, { + subscribe(path) { + let watcher: SafeWatcher | null = watch( + path, + () => wrapper.dirty(path), + ); + return function () { + if (watcher) { + watcher.close(); + watcher = null; + } + }; + } + }); + return wrapper; +} + +export const optimisticStatOrNull = makeCheapPathFunction( + (path: string) => { + const result = statOrNull(path); + if (result === null) { + dependOnParentDirectory(path); + } + return result; + }, +); export const optimisticLStat = makeOptimistic("lstat", lstat); -export const optimisticLStatOrNull = makeOptimistic("lstatOrNull", (path: string) => { - try { - return optimisticLStat(path); - } catch (e) { - if (e.code !== "ENOENT") throw e; - dependOnParentDirectory(path); - return null; - } -}); +export const optimisticLStatOrNull = makeCheapPathFunction( + (path: string) => { + try { + return optimisticLStat(path); + } catch (e) { + if (e.code !== "ENOENT") throw e; + dependOnParentDirectory(path); + return null; + } + }, +); + export const optimisticReadFile = makeOptimistic("readFile", readFile); export const optimisticReaddir = makeOptimistic("readdir", readdir); export const optimisticHashOrNull = makeOptimistic("hashOrNull", ( From 354c65e7aa93d8c906d9c32934bc871068a4c9b4 Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Thu, 24 Oct 2019 18:47:28 -0400 Subject: [PATCH 248/327] Bump webapp package patch version to 1.7.5 after PR #10711. --- packages/webapp/package.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/webapp/package.js b/packages/webapp/package.js index 65ed969146..c651bcf3d8 100644 --- a/packages/webapp/package.js +++ b/packages/webapp/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Serves a Meteor app over HTTP", - version: '1.7.4' + version: '1.7.5' }); Npm.depends({"basic-auth-connect": "1.0.0", From f42d6db609f9a63ef8045e6f4baa1680a418d33e Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Thu, 24 Oct 2019 18:57:13 -0400 Subject: [PATCH 249/327] Update Node.js to version 8.16.2. https://nodejs.org/en/blog/release/v8.16.2/ https://github.com/nodejs/node/blob/master/doc/changelogs/CHANGELOG_V8.md#8.16.2 --- History.md | 2 +- scripts/build-dev-bundle-common.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/History.md b/History.md index 0beb79cef2..c39add593a 100644 --- a/History.md +++ b/History.md @@ -22,7 +22,7 @@ N/A ### Changes * Node has been updated to version - [8.16.1](https://nodejs.org/en/blog/release/v8.16.1/). + [8.16.2](https://nodejs.org/en/blog/release/v8.16.2/). * The `npm` npm package has been updated to version 6.11.3, and our [fork](https://github.com/meteor/pacote/tree/v9.5.8-meteor) of its diff --git a/scripts/build-dev-bundle-common.sh b/scripts/build-dev-bundle-common.sh index c1810b44a8..8470be4568 100644 --- a/scripts/build-dev-bundle-common.sh +++ b/scripts/build-dev-bundle-common.sh @@ -5,7 +5,7 @@ set -u UNAME=$(uname) ARCH=$(uname -m) -NODE_VERSION=8.16.1 +NODE_VERSION=8.16.2 MONGO_VERSION_64BIT=4.0.6 MONGO_VERSION_32BIT=3.2.22 NPM_VERSION=6.11.3 From 7fb7fcdd6d3dd0cb980d1ce08931bb0dee00aa3d Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Thu, 24 Oct 2019 19:33:15 -0400 Subject: [PATCH 250/327] Work around incorrect fs.statSync type inference. --- tools/fs/files.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/fs/files.ts b/tools/fs/files.ts index d2fb10c8cd..24d57da570 100644 --- a/tools/fs/files.ts +++ b/tools/fs/files.ts @@ -5,7 +5,7 @@ /// import assert from "assert"; -import fs, { Stats } from "fs"; +import fs, { PathLike, Stats } from "fs"; import path from "path"; import os from "os"; import { spawn, execFile } from "child_process"; @@ -1745,7 +1745,7 @@ export const open = wrapFsFunc("open", fs.openSync, [0]); export const read = wrapFsFunc("read", fs.readSync, []); export const readlink = wrapFsFunc<[string], string>("readlink", fs.readlinkSync, [0]); export const rmdir = wrapDestructiveFsFunc("rmdir", fs.rmdirSync); -export const stat = wrapFsFunc("stat", fs.statSync, [0], { cached: true }); +export const stat = wrapFsFunc("stat", fs.statSync as (path: PathLike) => Stats, [0], { cached: true }); export const symlink = wrapFsFunc("symlink", fs.symlinkSync, [0, 1]); export const unlink = wrapDestructiveFsFunc("unlink", fs.unlinkSync); export const write = wrapFsFunc("write", fs.writeSync, []); From 1cf59867b2f74f5be1a3e6f1eb13ea4ae10540db Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Thu, 24 Oct 2019 19:16:51 -0400 Subject: [PATCH 251/327] Remove no-longer-necessary noYieldsAllowed wrapper from loadIsopackage. --- tools/tool-env/isopackets.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/tool-env/isopackets.js b/tools/tool-env/isopackets.js index 8fdee84079..e88ab878ac 100644 --- a/tools/tool-env/isopackets.js +++ b/tools/tool-env/isopackets.js @@ -102,7 +102,7 @@ export function loadIsopackage(packageName, isopacketName = "combined") { // result is cached, so no yielding occurs later. assert.strictEqual(archinfo.host().split(".", 1)[0], "os"); - const isopacket = fiberHelpers.noYieldsAllowed(function () { + const isopacket = function () { if (_.has(loadedIsopackets, isopacketName)) { if (loadedIsopackets[isopacketName]) { return loadedIsopackets[isopacketName]; @@ -120,7 +120,7 @@ export function loadIsopackage(packageName, isopacketName = "combined") { } throw Error("Unknown isopacket: " + isopacketName); - }); + }(); if (! _.has(isopacket, packageName)) { throw new Error("Unknown isopacket dependency: " + packageName); From 9b4e742516190237d3d9e97a5c5bd6096b6ca8d9 Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Thu, 24 Oct 2019 19:36:34 -0400 Subject: [PATCH 252/327] Bump $BUNDLE_VERSION to 8.16.2.0 before rebuilding dev bundle. --- meteor | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meteor b/meteor index e6c4894337..b52709e73f 100755 --- a/meteor +++ b/meteor @@ -1,6 +1,6 @@ #!/usr/bin/env bash -BUNDLE_VERSION=8.16.1.3 +BUNDLE_VERSION=8.16.2.0 # OS Check. Put here because here is where we download the precompiled # bundles that are arch specific. From 19f00eef81d4312b12ebf6282c8a38d6e3f04e24 Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Thu, 24 Oct 2019 19:36:39 -0400 Subject: [PATCH 253/327] Bump package versions for 1.8.2-rc.4 release. --- packages/babel-compiler/package.js | 2 +- packages/babel-runtime/package.js | 2 +- packages/context/package.js | 2 +- packages/ecmascript-runtime-client/package.js | 2 +- packages/ecmascript-runtime-server/package.js | 2 +- packages/ecmascript/package.js | 2 +- packages/meteor-tool/package.js | 2 +- packages/minifier-css/package.js | 2 +- packages/minifier-js/package.js | 2 +- packages/modules-runtime/package.js | 2 +- packages/modules/package.js | 2 +- packages/mongo/package.js | 2 +- packages/npm-mongo/package.js | 2 +- packages/standard-minifier-css/package.js | 2 +- packages/standard-minifier-js/package.js | 2 +- packages/typescript/package.js | 2 +- packages/webapp/package.js | 2 +- scripts/admin/meteor-release-experimental.json | 2 +- 18 files changed, 18 insertions(+), 18 deletions(-) diff --git a/packages/babel-compiler/package.js b/packages/babel-compiler/package.js index 8bb9521b43..158e43fd51 100644 --- a/packages/babel-compiler/package.js +++ b/packages/babel-compiler/package.js @@ -6,7 +6,7 @@ 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.4.0-rc182.3' + version: '7.4.0-rc182.4' }); Npm.depends({ diff --git a/packages/babel-runtime/package.js b/packages/babel-runtime/package.js index 1899a6d952..464af08075 100644 --- a/packages/babel-runtime/package.js +++ b/packages/babel-runtime/package.js @@ -1,7 +1,7 @@ Package.describe({ name: "babel-runtime", summary: "Runtime support for output of Babel transpiler", - version: '1.4.0-rc182.3', + version: '1.4.0-rc182.4', documentation: 'README.md' }); diff --git a/packages/context/package.js b/packages/context/package.js index ec43aa12af..69cd6aace8 100644 --- a/packages/context/package.js +++ b/packages/context/package.js @@ -1,6 +1,6 @@ Package.describe({ name: "context", - version: "0.4.0-rc182.3", + version: "0.4.0-rc182.4", summary: "Manage contextual information without passing objects around", documentation: "README.md" }); diff --git a/packages/ecmascript-runtime-client/package.js b/packages/ecmascript-runtime-client/package.js index 95d792ef19..55be73b3e6 100644 --- a/packages/ecmascript-runtime-client/package.js +++ b/packages/ecmascript-runtime-client/package.js @@ -1,6 +1,6 @@ Package.describe({ name: "ecmascript-runtime-client", - version: "0.9.0-rc182.3", + version: "0.9.0-rc182.4", summary: "Polyfills for new ECMAScript 2015 APIs like Map and Set", git: "https://github.com/meteor/meteor/tree/devel/packages/ecmascript-runtime-client", documentation: "README.md" diff --git a/packages/ecmascript-runtime-server/package.js b/packages/ecmascript-runtime-server/package.js index 62c8bd917d..395787b76f 100644 --- a/packages/ecmascript-runtime-server/package.js +++ b/packages/ecmascript-runtime-server/package.js @@ -1,6 +1,6 @@ Package.describe({ name: "ecmascript-runtime-server", - version: "0.8.0-rc182.3", + version: "0.8.0-rc182.4", summary: "Polyfills for new ECMAScript 2015 APIs like Map and Set", git: "https://github.com/meteor/meteor/tree/devel/packages/ecmascript-runtime-client", documentation: "README.md" diff --git a/packages/ecmascript/package.js b/packages/ecmascript/package.js index 70bb44e841..fb2a8dde88 100644 --- a/packages/ecmascript/package.js +++ b/packages/ecmascript/package.js @@ -1,6 +1,6 @@ Package.describe({ name: 'ecmascript', - version: '0.13.0-rc182.3', + version: '0.13.0-rc182.4', summary: 'Compiler plugin that supports ES2015+ in all .js files', documentation: 'README.md' }); diff --git a/packages/meteor-tool/package.js b/packages/meteor-tool/package.js index f17dc5cdf5..5a290df025 100644 --- a/packages/meteor-tool/package.js +++ b/packages/meteor-tool/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "The Meteor command-line tool", - version: '1.8.2-rc.3' + version: '1.8.2-rc.4' }); Package.includeTool(); diff --git a/packages/minifier-css/package.js b/packages/minifier-css/package.js index ef1cc8af9a..341026d2e1 100644 --- a/packages/minifier-css/package.js +++ b/packages/minifier-css/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: 'CSS minifier', - version: '1.4.3-rc182.3' + version: '1.4.3-rc182.4' }); Npm.depends({ diff --git a/packages/minifier-js/package.js b/packages/minifier-js/package.js index 43ad9f94fc..6349599f78 100644 --- a/packages/minifier-js/package.js +++ b/packages/minifier-js/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "JavaScript minifier", - version: "2.5.0-rc182.3" + version: "2.5.0-rc182.4" }); Npm.depends({ diff --git a/packages/modules-runtime/package.js b/packages/modules-runtime/package.js index cf339de8c0..da67b2b307 100644 --- a/packages/modules-runtime/package.js +++ b/packages/modules-runtime/package.js @@ -1,6 +1,6 @@ Package.describe({ name: "modules-runtime", - version: "0.11.0-rc182.3", + version: "0.11.0-rc182.4", summary: "CommonJS module system", git: "https://github.com/benjamn/install", documentation: "README.md" diff --git a/packages/modules/package.js b/packages/modules/package.js index 025e80c3b5..ee11680085 100644 --- a/packages/modules/package.js +++ b/packages/modules/package.js @@ -1,6 +1,6 @@ Package.describe({ name: "modules", - version: "0.14.0-rc182.3", + version: "0.14.0-rc182.4", summary: "CommonJS module system", documentation: "README.md" }); diff --git a/packages/mongo/package.js b/packages/mongo/package.js index 43070f26f6..b5a71ef7a1 100644 --- a/packages/mongo/package.js +++ b/packages/mongo/package.js @@ -9,7 +9,7 @@ Package.describe({ summary: "Adaptor for using MongoDB and Minimongo over DDP", - version: '1.7.0-rc182.3' + version: '1.7.0-rc182.4' }); Npm.depends({ diff --git a/packages/npm-mongo/package.js b/packages/npm-mongo/package.js index b4aaf15ff2..53e6333b27 100644 --- a/packages/npm-mongo/package.js +++ b/packages/npm-mongo/package.js @@ -3,7 +3,7 @@ Package.describe({ summary: "Wrapper around the mongo npm package", - version: "3.2.0-rc182.3", + version: "3.2.0-rc182.4", documentation: null }); diff --git a/packages/standard-minifier-css/package.js b/packages/standard-minifier-css/package.js index fd6f4aaf97..0a7650084a 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.5.4-rc182.3', + version: '1.5.4-rc182.4', summary: 'Standard css minifier used with Meteor apps by default.', documentation: 'README.md' }); diff --git a/packages/standard-minifier-js/package.js b/packages/standard-minifier-js/package.js index c175928021..5540319183 100644 --- a/packages/standard-minifier-js/package.js +++ b/packages/standard-minifier-js/package.js @@ -1,6 +1,6 @@ Package.describe({ name: 'standard-minifier-js', - version: '2.5.0-rc182.3', + version: '2.5.0-rc182.4', summary: 'Standard javascript minifiers used with Meteor apps by default.', documentation: 'README.md', }); diff --git a/packages/typescript/package.js b/packages/typescript/package.js index 9c5279951e..de153be4d7 100644 --- a/packages/typescript/package.js +++ b/packages/typescript/package.js @@ -1,6 +1,6 @@ Package.describe({ name: "typescript", - version: "3.6.3-rc182.3", + version: "3.6.3-rc182.4", summary: "Compiler plugin that compiles TypeScript and ECMAScript in .ts and .tsx files", documentation: "README.md" }); diff --git a/packages/webapp/package.js b/packages/webapp/package.js index c651bcf3d8..9272c04e5e 100644 --- a/packages/webapp/package.js +++ b/packages/webapp/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Serves a Meteor app over HTTP", - version: '1.7.5' + version: '1.7.5-rc182.4' }); Npm.depends({"basic-auth-connect": "1.0.0", diff --git a/scripts/admin/meteor-release-experimental.json b/scripts/admin/meteor-release-experimental.json index d8cc67e514..624066c366 100644 --- a/scripts/admin/meteor-release-experimental.json +++ b/scripts/admin/meteor-release-experimental.json @@ -1,6 +1,6 @@ { "track": "METEOR", - "version": "1.8.2-rc.3", + "version": "1.8.2-rc.4", "recommended": false, "official": false, "description": "Meteor" From 3a92597deb9cb3a77a4d2e3f13bbe28ac9912e6d Mon Sep 17 00:00:00 2001 From: evolross Date: Thu, 24 Oct 2019 18:21:28 -0700 Subject: [PATCH 254/327] Update History.md (#10729) Added entry for v1.6.1.4 release --- History.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/History.md b/History.md index 601f174a4e..cc390068e7 100644 --- a/History.md +++ b/History.md @@ -906,6 +906,20 @@ N/A [Feature #24](https://github.com/meteor/meteor-feature-requests/issues/24) [PR #9657](https://github.com/meteor/meteor/pull/9657) +## v1.6.1.4, 2018-08-16 + +### Breaking changes +N/A + +### Migration Steps +N/A + +### Changes + +* Node has been updated to version + [8.11.4](https://nodejs.org/en/blog/release/v8.11.4/), an important + [security release](https://nodejs.org/en/blog/vulnerability/august-2018-security-releases/). + ## v1.6.1.3, 2018-06-16 ### Breaking changes From d84f4c2083cb669d09beb6d3ee50f93995113db7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Filipe=20N=C3=A9vola?= Date: Thu, 31 Oct 2019 07:00:39 +0100 Subject: [PATCH 255/327] adding developer evangelist on CONTRIBUTING.md --- CONTRIBUTING.md | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 2479865a57..a0573dfb1f 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -83,12 +83,11 @@ Community package maintainers are community members who maintain packages outsid Current Community Package Maintainers: - [@mitar](https://github.com/mitar) for [Blaze](https://github.com/meteor/blaze) -#### Community Manager +#### Developer Evangelist -The community manager helps to coordinate resources, documentation, events, and other supportive work needed to ensure the health of the Meteor project. +- [@filipenevola](https://github.com/filipenevola) (Feel free to reach him out on [Twitter](https://twitter.com/FilipeNevola)) -Previous Community Manager (this role is currently unfilled): -- [@theadactyl](https://github.com/theadactyl) +[Read more](https://forums.meteor.com/t/im-joining-meteor-as-developer-evangelist/50613/2) ### Tracking project work From 1761ea02c51e5aed149771e2ac29869503668e94 Mon Sep 17 00:00:00 2001 From: filipenevola Date: Mon, 4 Nov 2019 07:36:55 -0300 Subject: [PATCH 256/327] - adds break change on 1.8.2 history about variables named exports --- History.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/History.md b/History.md index c39add593a..344630c54c 100644 --- a/History.md +++ b/History.md @@ -3,7 +3,10 @@ ## v1.8.2, TBD ### Breaking changes -N/A +* Be sure you are not using variables named `exports` otherwise you will get + this error `Uncaught SyntaxError: Identifier 'exports' has already been + declared`. [Comment #535535056](https://github.com/meteor/meteor/pull/10522#issuecomment-535535056) + Thanks @SimonSimCity ### Migration Steps From ebeb7f6879cfafe29983419e782d4db5dd1c689e Mon Sep 17 00:00:00 2001 From: filipenevola Date: Mon, 4 Nov 2019 07:41:27 -0300 Subject: [PATCH 257/327] - adds break change on 1.8.2 history about variables named exports --- History.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/History.md b/History.md index 344630c54c..49e4d0c3f2 100644 --- a/History.md +++ b/History.md @@ -6,7 +6,7 @@ * Be sure you are not using variables named `exports` otherwise you will get this error `Uncaught SyntaxError: Identifier 'exports' has already been declared`. [Comment #535535056](https://github.com/meteor/meteor/pull/10522#issuecomment-535535056) - Thanks @SimonSimCity + Thanks [@SimonSimCity](https://github.com/SimonSimCity) ### Migration Steps From 3e9e11d76ce348c089ee58d5518d473182d92721 Mon Sep 17 00:00:00 2001 From: David Glasser Date: Tue, 5 Nov 2019 07:01:54 -0800 Subject: [PATCH 258/327] tools/deploy: provide more context for version-status errors (#10670) Also only print the error once on failure. --- tools/meteor-services/deploy.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tools/meteor-services/deploy.js b/tools/meteor-services/deploy.js index 01c2400fd6..764fc6269f 100644 --- a/tools/meteor-services/deploy.js +++ b/tools/meteor-services/deploy.js @@ -428,12 +428,13 @@ async function pollForDeploy(pollingState, versionId, site) { // keep polling as per usual – this may have just been a whiff from Galaxy. // We do the retry here because we might hit an error if we try to parse the // result of the version-status call below. - Console.warn(versionStatusResult.errorMessage || 'Unexpected error from Galaxy'); pollingState.errors++; + const errorMessage = versionStatusResult.errorMessage || 'Unexpected error from Galaxy'; if (pollingState.errors >= pollingState.maxErrors) { - Console.error(versionStatusResult.errorMessage); + Console.error(`Error checking deploy status; giving up: ${errorMessage}`); return 1; } else if (new Date() < deadline) { + Console.warn(`Error checking deploy status; will retry: ${errorMessage}`); await sleepForMilliseconds(pollIntervalMs); return await pollForDeploy(pollingState, versionId, site); } From dea305ca4a8b199e15975daba2dfbcd84fd6dfef Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Tue, 5 Nov 2019 10:53:17 -0500 Subject: [PATCH 259/327] Set a higher LRU cache size for makeCheapPathFunction entries. In PR #10720, we introduced the makeCheapPathFunction in an effort to reduce the caching overhead for very frequently called (and already pretty quick) operations like files.stat. However, the default maximum LRU cache size of Math.pow(2, 16) can cause quite a bit of cache eviction churn for large applications, which @veered has identified as a potential source of build performance problems. By setting the maximum cache size to Math.pow(2, 20) instead, I am no longer seeing any files.stat calls in the profiling output for rebuilding a large internal app, saving several seconds of rebuild time. The obvious downside is that this cache might accumulate more memory over time, which is why I didn't just set the max to Infinity, though that might be a viable option if the total set of paths ever stat'd is small enough to fit into the available memory. In the future, I hope to find ways of managing LRU cache size that respond to actual memory pressure (relative to available memory), rather than pruning the cache after an arbitrary numeric threshold is reached. --- tools/fs/optimistic.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tools/fs/optimistic.ts b/tools/fs/optimistic.ts index c8a8d40b54..e351092178 100644 --- a/tools/fs/optimistic.ts +++ b/tools/fs/optimistic.ts @@ -229,6 +229,11 @@ function makeCheapPathFunction( return pathFunction; } const wrapper = wrap(pathFunction, { + // The maximum LRU cache size is Math.pow(2, 16) by default, but it's + // important to prevent eviction churn for very-frequently-called + // functions like optimisticStatOrNull. While it's tempting to set + // this limit to Infinity, increasing it by 16x comes close enough. + max: Math.pow(2, 20), subscribe(path) { let watcher: SafeWatcher | null = watch( path, From 241ba1de0fd22fd002a991d6de28e45cb4954cb7 Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Tue, 5 Nov 2019 11:39:10 -0500 Subject: [PATCH 260/327] Update meteor-babel to version 7.7.0. Note that typescript has been updated to version 3.7.2 as part of this update: https://devblogs.microsoft.com/typescript/announcing-typescript-3-7-rc/ --- History.md | 6 +- .../.npm/package/npm-shrinkwrap.json | 298 +++++++++--------- packages/babel-compiler/package.js | 2 +- scripts/dev-bundle-server-package.js | 2 +- scripts/dev-bundle-tool-package.js | 6 +- 5 files changed, 157 insertions(+), 157 deletions(-) diff --git a/History.md b/History.md index 49e4d0c3f2..eb009c93ea 100644 --- a/History.md +++ b/History.md @@ -11,7 +11,7 @@ ### Migration Steps * Be sure to update the `@babel/runtime` npm package to its latest version - (currently 7.6.0): + (currently 7.7.0): ```sh meteor npm install @babel/runtime@latest ``` @@ -71,9 +71,9 @@ * The `mongodb` npm package used by the `npm-mongo` Meteor package has been updated to version 3.2.7. -* The `meteor-babel` npm package has been updated to version 7.6.1, +* The `meteor-babel` npm package has been updated to version 7.7.0, enabling compilation of the `meteor/tools` codebase with TypeScript - (specifically, version 3.6.2 of the `typescript` npm package). + (specifically, version 3.7.2 of the `typescript` npm package). * The `reify` npm package has been updated to version 0.20.12. diff --git a/packages/babel-compiler/.npm/package/npm-shrinkwrap.json b/packages/babel-compiler/.npm/package/npm-shrinkwrap.json index e027e1cbf9..ab3dce7907 100644 --- a/packages/babel-compiler/.npm/package/npm-shrinkwrap.json +++ b/packages/babel-compiler/.npm/package/npm-shrinkwrap.json @@ -7,91 +7,96 @@ "integrity": "sha512-27d4lZoomVyo51VegxI20xZPuSHusqbQag/ztrBC7wegWoQ1nLREPVSKSW8byhTlzTKyNE4ifaTA6lCp7JjpFw==" }, "@babel/core": { - "version": "7.6.0", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.6.0.tgz", - "integrity": "sha512-FuRhDRtsd6IptKpHXAa+4WPZYY2ZzgowkbLBecEDDSje1X/apG7jQM33or3NdOmjXBKWGOg4JmSiRfUfuTtHXw==", + "version": "7.7.0", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.7.0.tgz", + "integrity": "sha512-Bb1NjZCaiwTQC/ARL+MwDpgocdnwWDCaugvkGt6cxfBzQa8Whv1JybBoUEiBDKl8Ni3H3c7Fykwk7QChUsHRlg==", "dependencies": { "json5": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/json5/-/json5-2.1.0.tgz", - "integrity": "sha512-8Mh9h6xViijj36g7Dxi+Y4S6hNGV96vcJZr/SrlHh1LR/pEn/8j/+qIBbs44YKl69Lrfctp4QD+AdWLTMqEZAQ==" + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.1.1.tgz", + "integrity": "sha512-l+3HXD0GEI3huGq1njuqtzYK8OYJyXMkOLtQ53pjWh89tvWS2h6l+1zMkYWqlb57+SiQodKZyvMEFb2X+KrFhQ==" } } }, "@babel/generator": { - "version": "7.6.0", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.6.0.tgz", - "integrity": "sha512-Ms8Mo7YBdMMn1BYuNtKuP/z0TgEIhbcyB8HVR6PPNYp4P61lMsABiS4A3VG1qznjXVCf3r+fVHhm4efTYVsySA==" + "version": "7.7.0", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.7.0.tgz", + "integrity": "sha512-1wdJ6UxHyL1XoJQ119JmvuRX27LRih7iYStMPZOWAjQqeAabFg3dYXKMpgihma+to+0ADsTVVt6oRyUxWZw6Mw==" }, "@babel/helper-annotate-as-pure": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.0.0.tgz", - "integrity": "sha512-3UYcJUj9kvSLbLbUIfQTqzcy5VX7GRZ/CCDrnOaZorFFM01aXp1+GJwuFGV4NDDoAS+mOUyHcO6UD/RfqOks3Q==" + "version": "7.7.0", + "resolved": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.7.0.tgz", + "integrity": "sha512-k50CQxMlYTYo+GGyUGFwpxKVtxVJi9yh61sXZji3zYHccK9RYliZGSTOgci85T+r+0VFN2nWbGM04PIqwfrpMg==" }, "@babel/helper-builder-binary-assignment-operator-visitor": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.1.0.tgz", - "integrity": "sha512-qNSR4jrmJ8M1VMM9tibvyRAHXQs2PmaksQF7c1CGJNipfe3D8p+wgNwgso/P2A2r2mdgBWAXljNWR0QRZAMW8w==" + "version": "7.7.0", + "resolved": "https://registry.npmjs.org/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.7.0.tgz", + "integrity": "sha512-Cd8r8zs4RKDwMG/92lpZcnn5WPQ3LAMQbCw42oqUh4s7vsSN5ANUZjMel0OOnxDLq57hoDDbai+ryygYfCTOsw==" }, "@babel/helper-builder-react-jsx": { - "version": "7.3.0", - "resolved": "https://registry.npmjs.org/@babel/helper-builder-react-jsx/-/helper-builder-react-jsx-7.3.0.tgz", - "integrity": "sha512-MjA9KgwCuPEkQd9ncSXvSyJ5y+j2sICHyrI0M3L+6fnS4wMSNDc1ARXsbTfbb2cXHn17VisSnU/sHFTCxVxSMw==" + "version": "7.7.0", + "resolved": "https://registry.npmjs.org/@babel/helper-builder-react-jsx/-/helper-builder-react-jsx-7.7.0.tgz", + "integrity": "sha512-LSln3cexwInTMYYoFeVLKnYPPMfWNJ8PubTBs3hkh7wCu9iBaqq1OOyW+xGmEdLxT1nhsl+9SJ+h2oUDYz0l2A==" }, "@babel/helper-call-delegate": { - "version": "7.4.4", - "resolved": "https://registry.npmjs.org/@babel/helper-call-delegate/-/helper-call-delegate-7.4.4.tgz", - "integrity": "sha512-l79boDFJ8S1c5hvQvG+rc+wHw6IuH7YldmRKsYtpbawsxURu/paVy57FZMomGK22/JckepaikOkY0MoAmdyOlQ==" + "version": "7.7.0", + "resolved": "https://registry.npmjs.org/@babel/helper-call-delegate/-/helper-call-delegate-7.7.0.tgz", + "integrity": "sha512-Su0Mdq7uSSWGZayGMMQ+z6lnL00mMCnGAbO/R0ZO9odIdB/WNU/VfQKqMQU0fdIsxQYbRjDM4BixIa93SQIpvw==" }, "@babel/helper-create-class-features-plugin": { - "version": "7.6.0", - "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.6.0.tgz", - "integrity": "sha512-O1QWBko4fzGju6VoVvrZg0RROCVifcLxiApnGP3OWfWzvxRZFCoBD81K5ur5e3bVY2Vf/5rIJm8cqPKn8HUJng==" + "version": "7.7.0", + "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.7.0.tgz", + "integrity": "sha512-MZiB5qvTWoyiFOgootmRSDV1udjIqJW/8lmxgzKq6oDqxdmHUjeP2ZUOmgHdYjmUVNABqRrHjYAYRvj8Eox/UA==" + }, + "@babel/helper-create-regexp-features-plugin": { + "version": "7.7.0", + "resolved": "https://registry.npmjs.org/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.7.0.tgz", + "integrity": "sha512-ZhagAAVGD3L6MPM9/zZi7RRteonfBFLVUz3kjsnYsMAtr9hOJCKI9BAKIMpqn3NyWicPieoX779UL+7/3BEAOA==" }, "@babel/helper-define-map": { - "version": "7.5.5", - "resolved": "https://registry.npmjs.org/@babel/helper-define-map/-/helper-define-map-7.5.5.tgz", - "integrity": "sha512-fTfxx7i0B5NJqvUOBBGREnrqbTxRh7zinBANpZXAVDlsZxYdclDp467G1sQ8VZYMnAURY3RpBUAgOYT9GfzHBg==" + "version": "7.7.0", + "resolved": "https://registry.npmjs.org/@babel/helper-define-map/-/helper-define-map-7.7.0.tgz", + "integrity": "sha512-kPKWPb0dMpZi+ov1hJiwse9dWweZsz3V9rP4KdytnX1E7z3cTNmFGglwklzFPuqIcHLIY3bgKSs4vkwXXdflQA==" }, "@babel/helper-explode-assignable-expression": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@babel/helper-explode-assignable-expression/-/helper-explode-assignable-expression-7.1.0.tgz", - "integrity": "sha512-NRQpfHrJ1msCHtKjbzs9YcMmJZOg6mQMmGRB+hbamEdG5PNpaSm95275VD92DvJKuyl0s2sFiDmMZ+EnnvufqA==" + "version": "7.7.0", + "resolved": "https://registry.npmjs.org/@babel/helper-explode-assignable-expression/-/helper-explode-assignable-expression-7.7.0.tgz", + "integrity": "sha512-CDs26w2shdD1urNUAji2RJXyBFCaR+iBEGnFz3l7maizMkQe3saVw9WtjG1tz8CwbjvlFnaSLVhgnu1SWaherg==" }, "@babel/helper-function-name": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.1.0.tgz", - "integrity": "sha512-A95XEoCpb3TO+KZzJ4S/5uW5fNe26DjBGqf1o9ucyLyCmi1dXq/B3c8iaWTfBk3VvetUxl16e8tIrd5teOCfGw==" + "version": "7.7.0", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.7.0.tgz", + "integrity": "sha512-tDsJgMUAP00Ugv8O2aGEua5I2apkaQO7lBGUq1ocwN3G23JE5Dcq0uh3GvFTChPa4b40AWiAsLvCZOA2rdnQ7Q==" }, "@babel/helper-get-function-arity": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.0.0.tgz", - "integrity": "sha512-r2DbJeg4svYvt3HOS74U4eWKsUAMRH01Z1ds1zx8KNTPtpTL5JAsdFv8BNyOpVqdFhHkkRDIg5B4AsxmkjAlmQ==" + "version": "7.7.0", + "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.7.0.tgz", + "integrity": "sha512-tLdojOTz4vWcEnHWHCuPN5P85JLZWbm5Fx5ZsMEMPhF3Uoe3O7awrbM2nQ04bDOUToH/2tH/ezKEOR8zEYzqyw==" }, "@babel/helper-hoist-variables": { - "version": "7.4.4", - "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.4.4.tgz", - "integrity": "sha512-VYk2/H/BnYbZDDg39hr3t2kKyifAm1W6zHRfhx8jGjIHpQEBv9dry7oQ2f3+J703TLu69nYdxsovl0XYfcnK4w==" + "version": "7.7.0", + "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.7.0.tgz", + "integrity": "sha512-LUe/92NqsDAkJjjCEWkNe+/PcpnisvnqdlRe19FahVapa4jndeuJ+FBiTX1rcAKWKcJGE+C3Q3tuEuxkSmCEiQ==" }, "@babel/helper-member-expression-to-functions": { - "version": "7.5.5", - "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.5.5.tgz", - "integrity": "sha512-5qZ3D1uMclSNqYcXqiHoA0meVdv+xUEex9em2fqMnrk/scphGlGgg66zjMrPJESPwrFJ6sbfFQYUSa0Mz7FabA==" + "version": "7.7.0", + "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.7.0.tgz", + "integrity": "sha512-QaCZLO2RtBcmvO/ekOLp8p7R5X2JriKRizeDpm5ChATAFWrrYDcDxPuCIBXKyBjY+i1vYSdcUTMIb8psfxHDPA==" }, "@babel/helper-module-imports": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.0.0.tgz", - "integrity": "sha512-aP/hlLq01DWNEiDg4Jn23i+CXxW/owM4WpDLFUbpjxe4NS3BhLVZQ5i7E0ZrxuQ/vwekIeciyamgB1UIYxxM6A==" + "version": "7.7.0", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.7.0.tgz", + "integrity": "sha512-Dv3hLKIC1jyfTkClvyEkYP2OlkzNvWs5+Q8WgPbxM5LMeorons7iPP91JM+DU7tRbhqA1ZeooPaMFvQrn23RHw==" }, "@babel/helper-module-transforms": { - "version": "7.5.5", - "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.5.5.tgz", - "integrity": "sha512-jBeCvETKuJqeiaCdyaheF40aXnnU1+wkSiUs/IQg3tB85up1LyL8x77ClY8qJpuRJUcXQo+ZtdNESmZl4j56Pw==" + "version": "7.7.0", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.7.0.tgz", + "integrity": "sha512-rXEefBuheUYQyX4WjV19tuknrJFwyKw0HgzRwbkyTbB+Dshlq7eqkWbyjzToLrMZk/5wKVKdWFluiAsVkHXvuQ==" }, "@babel/helper-optimise-call-expression": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.0.0.tgz", - "integrity": "sha512-u8nd9NQePYNQV8iPWu/pLLYBqZBa4ZaY1YWRFMuxrid94wKI1QNt67NEZ7GAe5Kc/0LLScbim05xZFWkAdrj9g==" + "version": "7.7.0", + "resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.7.0.tgz", + "integrity": "sha512-48TeqmbazjNU/65niiiJIJRc5JozB8acui1OS7bSd6PgxfuovWsvjfWSzlgx+gPFdVveNzUdpdIg5l56Pl5jqg==" }, "@babel/helper-plugin-utils": { "version": "7.0.0", @@ -104,34 +109,34 @@ "integrity": "sha512-CkCYQLkfkiugbRDO8eZn6lRuR8kzZoGXCg3149iTk5se7g6qykSpy3+hELSwquhu+TgHn8nkLiBwHvNX8Hofcw==" }, "@babel/helper-remap-async-to-generator": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.1.0.tgz", - "integrity": "sha512-3fOK0L+Fdlg8S5al8u/hWE6vhufGSn0bN09xm2LXMy//REAF8kDCrYoOBKYmA8m5Nom+sV9LyLCwrFynA8/slg==" + "version": "7.7.0", + "resolved": "https://registry.npmjs.org/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.7.0.tgz", + "integrity": "sha512-pHx7RN8X0UNHPB/fnuDnRXVZ316ZigkO8y8D835JlZ2SSdFKb6yH9MIYRU4fy/KPe5sPHDFOPvf8QLdbAGGiyw==" }, "@babel/helper-replace-supers": { - "version": "7.5.5", - "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.5.5.tgz", - "integrity": "sha512-XvRFWrNnlsow2u7jXDuH4jDDctkxbS7gXssrP4q2nUD606ukXHRvydj346wmNg+zAgpFx4MWf4+usfC93bElJg==" + "version": "7.7.0", + "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.7.0.tgz", + "integrity": "sha512-5ALYEul5V8xNdxEeWvRsBzLMxQksT7MaStpxjJf9KsnLxpAKBtfw5NeMKZJSYDa0lKdOcy0g+JT/f5mPSulUgg==" }, "@babel/helper-simple-access": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.1.0.tgz", - "integrity": "sha512-Vk+78hNjRbsiu49zAPALxTb+JUQCz1aolpd8osOF16BGnLtseD21nbHgLPGUwrXEurZgiCOUmvs3ExTu4F5x6w==" + "version": "7.7.0", + "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.7.0.tgz", + "integrity": "sha512-AJ7IZD7Eem3zZRuj5JtzFAptBw7pMlS3y8Qv09vaBWoFsle0d1kAn5Wq6Q9MyBXITPOKnxwkZKoAm4bopmv26g==" }, "@babel/helper-split-export-declaration": { - "version": "7.4.4", - "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.4.4.tgz", - "integrity": "sha512-Ro/XkzLf3JFITkW6b+hNxzZ1n5OQ80NvIUdmHspih1XAhtN3vPTuUFT4eQnela+2MaZ5ulH+iyP513KJrxbN7Q==" + "version": "7.7.0", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.7.0.tgz", + "integrity": "sha512-HgYSI8rH08neWlAH3CcdkFg9qX9YsZysZI5GD8LjhQib/mM0jGOZOVkoUiiV2Hu978fRtjtsGsW6w0pKHUWtqA==" }, "@babel/helper-wrap-function": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/@babel/helper-wrap-function/-/helper-wrap-function-7.2.0.tgz", - "integrity": "sha512-o9fP1BZLLSrYlxYEYyl2aS+Flun5gtjTIG8iln+XuEzQTs0PLagAGSXUcqruJwD5fM48jzIEggCKpIfWTcR7pQ==" + "version": "7.7.0", + "resolved": "https://registry.npmjs.org/@babel/helper-wrap-function/-/helper-wrap-function-7.7.0.tgz", + "integrity": "sha512-sd4QjeMgQqzshSjecZjOp8uKfUtnpmCyQhKQrVJBBgeHAB/0FPi33h3AbVlVp07qQtMD4QgYSzaMI7VwncNK/w==" }, "@babel/helpers": { - "version": "7.6.0", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.6.0.tgz", - "integrity": "sha512-W9kao7OBleOjfXtFGgArGRX6eCP0UEcA2ZWEWNkJdRZnHhW4eEbeswbG3EwaRsnQUAEGWYgMq1HsIXuNNNy2eQ==" + "version": "7.7.0", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.7.0.tgz", + "integrity": "sha512-VnNwL4YOhbejHb7x/b5F39Zdg5vIQpUUNzJwx0ww1EcVRt41bbGRZWhAURrfY32T5zTT3qwNOQFWpn+P0i0a2g==" }, "@babel/highlight": { "version": "7.5.0", @@ -139,19 +144,19 @@ "integrity": "sha512-7dV4eu9gBxoM0dAnj/BCFDW9LFU0zvTrkq0ugM7pnHEgguOEeOz1so2ZghEdzviYzQEED0r4EAgpsBChKy1TRQ==" }, "@babel/parser": { - "version": "7.6.0", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.6.0.tgz", - "integrity": "sha512-+o2q111WEx4srBs7L9eJmcwi655eD8sXniLqMB93TBK9GrNzGrxDWSjiqz2hLU0Ha8MTXFIP0yd9fNdP+m43ZQ==" + "version": "7.7.0", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.7.0.tgz", + "integrity": "sha512-GqL+Z0d7B7ADlQBMXlJgvXEbtt5qlqd1YQ5fr12hTSfh7O/vgrEIvJxU2e7aSVrEUn75zTZ6Nd0s8tthrlZnrQ==" }, "@babel/plugin-proposal-async-generator-functions": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.2.0.tgz", - "integrity": "sha512-+Dfo/SCQqrwx48ptLVGLdE39YtWRuKc/Y9I5Fy0P1DDBB9lsAHpjcEJQt+4IifuSOSTLBKJObJqMvaO1pIE8LQ==" + "version": "7.7.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.7.0.tgz", + "integrity": "sha512-ot/EZVvf3mXtZq0Pd0+tSOfGWMizqmOohXmNZg6LNFjHOV+wOPv7BvVYh8oPR8LhpIP3ye8nNooKL50YRWxpYA==" }, "@babel/plugin-proposal-class-properties": { - "version": "7.5.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.5.5.tgz", - "integrity": "sha512-AF79FsnWFxjlaosgdi421vmYG6/jg79bVD0dpD44QdgobzHKuLZ6S3vl8la9qIeSwGi8i1fS0O1mfuDAAdo1/A==" + "version": "7.7.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.7.0.tgz", + "integrity": "sha512-tufDcFA1Vj+eWvwHN+jvMN6QsV5o+vUlytNKrbMiCeDL0F2j92RURzUsUMWE5EJkLyWxjdUslCsMQa9FWth16A==" }, "@babel/plugin-proposal-nullish-coalescing-operator": { "version": "7.4.4", @@ -159,9 +164,9 @@ "integrity": "sha512-Amph7Epui1Dh/xxUxS2+K22/MUi6+6JVTvy3P58tja3B6yKTSjwwx0/d83rF7551D6PVSSoplQb8GCwqec7HRw==" }, "@babel/plugin-proposal-object-rest-spread": { - "version": "7.5.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.5.5.tgz", - "integrity": "sha512-F2DxJJSQ7f64FyTVl5cw/9MWn6naXGdk3Q3UhDbFEEHv+EilCPoeRD3Zh/Utx1CJz4uyKlQ4uH+bJPbEhMV7Zw==" + "version": "7.6.2", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.6.2.tgz", + "integrity": "sha512-LDBXlmADCsMZV1Y9OQwMc0MyGZ8Ta/zlD9N67BfQT8uYwkRswiu2hU6nJKrjrt/58aH/vqfQlR/9yId/7A2gWw==" }, "@babel/plugin-proposal-optional-catch-binding": { "version": "7.2.0", @@ -189,9 +194,9 @@ "integrity": "sha512-mVxuJ0YroI/h/tbFTPGZR8cv6ai+STMKNBq0f8hFxsxWjl94qqhsb+wXbpNMDPU3cfR1TIsVFzU3nXyZMqyK4w==" }, "@babel/plugin-syntax-flow": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-flow/-/plugin-syntax-flow-7.2.0.tgz", - "integrity": "sha512-r6YMuZDWLtLlu0kqIim5o/3TNRAlWb073HwT3e2nKf9I8IIvOggPrnILYPsrrKilmn/mYEMCf/Z07w3yQJF6dg==" + "version": "7.7.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-flow/-/plugin-syntax-flow-7.7.0.tgz", + "integrity": "sha512-vQMV07p+L+jZeUnvX3pEJ9EiXGCjB5CTTvsirFD9rpEuATnoAvLBLoYbw1v5tyn3d2XxSuvEKi8cV3KqYUa0vQ==" }, "@babel/plugin-syntax-jsx": { "version": "7.2.0", @@ -224,9 +229,9 @@ "integrity": "sha512-ER77Cax1+8/8jCB9fo4Ud161OZzWN5qawi4GusDuRLcDbDG+bIGYY20zb2dfAFdTRGzrfq2xZPvF0R64EHnimg==" }, "@babel/plugin-transform-async-to-generator": { - "version": "7.5.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.5.0.tgz", - "integrity": "sha512-mqvkzwIGkq0bEF1zLRRiTdjfomZJDV33AH3oQzHVGkI2VzEmXLpKKOBvEVaFZBJdN0XTyH38s9j/Kiqr68dggg==" + "version": "7.7.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.7.0.tgz", + "integrity": "sha512-vLI2EFLVvRBL3d8roAMqtVY0Bm9C1QzLkdS57hiKrjUBSqsQYrBsMCeOg/0KK7B0eK9V71J5mWcha9yyoI2tZw==" }, "@babel/plugin-transform-block-scoped-functions": { "version": "7.2.0", @@ -234,14 +239,14 @@ "integrity": "sha512-ntQPR6q1/NKuphly49+QiQiTN0O63uOwjdD6dhIjSWBI5xlrbUFh720TIpzBhpnrLfv2tNH/BXvLIab1+BAI0w==" }, "@babel/plugin-transform-block-scoping": { - "version": "7.6.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.6.0.tgz", - "integrity": "sha512-tIt4E23+kw6TgL/edACZwP1OUKrjOTyMrFMLoT5IOFrfMRabCgekjqFd5o6PaAMildBu46oFkekIdMuGkkPEpA==" + "version": "7.6.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.6.3.tgz", + "integrity": "sha512-7hvrg75dubcO3ZI2rjYTzUrEuh1E9IyDEhhB6qfcooxhDA33xx2MasuLVgdxzcP6R/lipAC6n9ub9maNW6RKdw==" }, "@babel/plugin-transform-classes": { - "version": "7.5.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.5.5.tgz", - "integrity": "sha512-U2htCNK/6e9K7jGyJ++1p5XRU+LJjrwtoiVn9SzRlDT2KubcZ11OOwy3s24TjHxPgxNwonCYP7U2K51uVYCMDg==" + "version": "7.7.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.7.0.tgz", + "integrity": "sha512-/b3cKIZwGeUesZheU9jNYcwrEA7f/Bo4IdPmvp7oHgvks2majB5BoT5byAql44fiNQYOPzhk2w8DbgfuafkMoA==" }, "@babel/plugin-transform-computed-properties": { "version": "7.2.0", @@ -259,9 +264,9 @@ "integrity": "sha512-umh4hR6N7mu4Elq9GG8TOu9M0bakvlsREEC+ialrQN6ABS4oDQ69qJv1VtR3uxlKMCQMCvzk7vr17RHKcjx68A==" }, "@babel/plugin-transform-flow-strip-types": { - "version": "7.4.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-flow-strip-types/-/plugin-transform-flow-strip-types-7.4.4.tgz", - "integrity": "sha512-WyVedfeEIILYEaWGAUWzVNyqG4sfsNooMhXWsu/YzOvVGcsnPb5PguysjJqI3t3qiaYj0BR8T2f5njdjTGe44Q==" + "version": "7.6.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-flow-strip-types/-/plugin-transform-flow-strip-types-7.6.3.tgz", + "integrity": "sha512-l0ETkyEofkqFJ9LS6HChNIKtVJw2ylKbhYMlJ5C6df+ldxxaLIyXY4yOdDQQspfFpV8/vDiaWoJlvflstlYNxg==" }, "@babel/plugin-transform-for-of": { "version": "7.4.4", @@ -274,9 +279,9 @@ "integrity": "sha512-2ThDhm4lI4oV7fVQ6pNNK+sx+c/GM5/SaML0w/r4ZB7sAneD/piDJtwdKlNckXeyGK7wlwg2E2w33C/Hh+VFCg==" }, "@babel/plugin-transform-modules-commonjs": { - "version": "7.6.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.6.0.tgz", - "integrity": "sha512-Ma93Ix95PNSEngqomy5LSBMAQvYKVe3dy+JlVJSHEXZR5ASL9lQBedMiCyVtmTLraIDVRE3ZjTZvmXXD2Ozw3g==" + "version": "7.7.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.7.0.tgz", + "integrity": "sha512-KEMyWNNWnjOom8vR/1+d+Ocz/mILZG/eyHHO06OuBQ2aNhxT62fr4y6fGOplRx+CxCSp3IFwesL8WdINfY/3kg==" }, "@babel/plugin-transform-object-super": { "version": "7.5.5", @@ -299,9 +304,9 @@ "integrity": "sha512-Htf/tPa5haZvRMiNSQSFifK12gtr/8vwfr+A9y69uF0QcU77AVu4K7MiHEkTxF7lQoHOL0F9ErqgfNEAKgXj7A==" }, "@babel/plugin-transform-react-jsx": { - "version": "7.3.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx/-/plugin-transform-react-jsx-7.3.0.tgz", - "integrity": "sha512-a/+aRb7R06WcKvQLOu4/TpjKOdvVEKRLWFpKcNuHhiREPgGRB4TQJxq07+EZLS8LFVYpfq1a5lDUnuMdcCpBKg==" + "version": "7.7.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx/-/plugin-transform-react-jsx-7.7.0.tgz", + "integrity": "sha512-mXhBtyVB1Ujfy+0L6934jeJcSXj/VCg6whZzEcgiiZHNS0PGC7vUCsZDQCxxztkpIdF+dY1fUMcjAgEOC3ZOMQ==" }, "@babel/plugin-transform-react-jsx-self": { "version": "7.2.0", @@ -314,14 +319,14 @@ "integrity": "sha512-58Q+Jsy4IDCZx7kqEZuSDdam/1oW8OdDX8f+Loo6xyxdfg1yF0GE2XNJQSTZCaMol93+FBzpWiPEwtbMloAcPg==" }, "@babel/plugin-transform-regenerator": { - "version": "7.4.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.4.5.tgz", - "integrity": "sha512-gBKRh5qAaCWntnd09S8QC7r3auLCqq5DI6O0DlfoyDjslSBVqBibrMdsqO+Uhmx3+BlOmE/Kw1HFxmGbv0N9dA==" + "version": "7.7.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.7.0.tgz", + "integrity": "sha512-AXmvnC+0wuj/cFkkS/HFHIojxH3ffSXE+ttulrqWjZZRaUOonfJc60e1wSNT4rV8tIunvu/R3wCp71/tLAa9xg==" }, "@babel/plugin-transform-runtime": { - "version": "7.6.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-runtime/-/plugin-transform-runtime-7.6.0.tgz", - "integrity": "sha512-Da8tMf7uClzwUm/pnJ1S93m/aRXmoYNDD7TkHua8xBDdaAs54uZpTWvEt6NGwmoVMb9mZbntfTqmG2oSzN/7Vg==" + "version": "7.6.2", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-runtime/-/plugin-transform-runtime-7.6.2.tgz", + "integrity": "sha512-cqULw/QB4yl73cS5Y0TZlQSjDvNkzDbu0FurTZyHlJpWE5T3PCMdnyV+xXoH1opr1ldyHODe3QAX3OMAii5NxA==" }, "@babel/plugin-transform-shorthand-properties": { "version": "7.2.0", @@ -329,9 +334,9 @@ "integrity": "sha512-QP4eUM83ha9zmYtpbnyjTLAGKQritA5XW/iG9cjtuOI8s1RuL/3V6a3DeSHfKutJQ+ayUfeZJPcnCYEQzaPQqg==" }, "@babel/plugin-transform-spread": { - "version": "7.2.2", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-spread/-/plugin-transform-spread-7.2.2.tgz", - "integrity": "sha512-KWfky/58vubwtS0hLqEnrWJjsMGaOeSBn90Ezn5Jeg9Z8KKHmELbP1yGylMlm5N6TPKeY9A2+UaSYLdxahg01w==" + "version": "7.6.2", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-spread/-/plugin-transform-spread-7.6.2.tgz", + "integrity": "sha512-DpSvPFryKdK1x+EDJYCy28nmAaIMdxmhot62jAXF/o99iA33Zj2Lmcp3vDmz+MUh0LNYVPvfj5iC3feb3/+PFg==" }, "@babel/plugin-transform-sticky-regex": { "version": "7.2.0", @@ -349,34 +354,34 @@ "integrity": "sha512-2LNhETWYxiYysBtrBTqL8+La0jIoQQnIScUJc74OYvUGRmkskNY4EzLCnjHBzdmb38wqtTaixpo1NctEcvMDZw==" }, "@babel/plugin-transform-unicode-regex": { - "version": "7.4.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.4.4.tgz", - "integrity": "sha512-il+/XdNw01i93+M9J9u4T7/e/Ue/vWfNZE4IRUQjplu2Mqb/AFTDimkw2tdEdSH50wuQXZAbXSql0UphQke+vA==" + "version": "7.7.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.7.0.tgz", + "integrity": "sha512-RrThb0gdrNwFAqEAAx9OWgtx6ICK69x7i9tCnMdVrxQwSDp/Abu9DXFU5Hh16VP33Rmxh04+NGW28NsIkFvFKA==" }, "@babel/preset-react": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/@babel/preset-react/-/preset-react-7.0.0.tgz", - "integrity": "sha512-oayxyPS4Zj+hF6Et11BwuBkmpgT/zMxyuZgFrMeZID6Hdh3dGlk4sHCAhdBCpuCKW2ppBfl2uCCetlrUIJRY3w==" + "version": "7.7.0", + "resolved": "https://registry.npmjs.org/@babel/preset-react/-/preset-react-7.7.0.tgz", + "integrity": "sha512-IXXgSUYBPHUGhUkH+89TR6faMcBtuMW0h5OHbMuVbL3/5wK2g6a2M2BBpkLa+Kw0sAHiZ9dNVgqJMDP/O4GRBA==" }, "@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.7.1", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.7.1.tgz", + "integrity": "sha512-SQ0sS7KUJDvgCI2cpZG0nJygO6002oTbhgSuw4WcocsnbxLwL5Q8I3fqbJdyBAc3uFrWZiR2JomseuxSuci3SQ==" }, "@babel/template": { - "version": "7.6.0", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.6.0.tgz", - "integrity": "sha512-5AEH2EXD8euCk446b7edmgFdub/qfH1SN6Nii3+fyXP807QRx9Q73A2N5hNwRRslC2H9sNzaFhsPubkS4L8oNQ==" + "version": "7.7.0", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.7.0.tgz", + "integrity": "sha512-OKcwSYOW1mhWbnTBgQY5lvg1Fxg+VyfQGjcBduZFljfc044J5iDlnDSfhQ867O17XHiSCxYHUxHg2b7ryitbUQ==" }, "@babel/traverse": { - "version": "7.6.0", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.6.0.tgz", - "integrity": "sha512-93t52SaOBgml/xY74lsmt7xOR4ufYvhb5c5qiM6lu4J/dWGMAfAh6eKw4PjLes6DI6nQgearoxnFJk60YchpvQ==" + "version": "7.7.0", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.7.0.tgz", + "integrity": "sha512-ea/3wRZc//e/uwCpuBX2itrhI0U9l7+FsrKWyKGNyvWbuMcCG7ATKY2VI4wlg2b2TA39HHwIxnvmXvtiKsyn7w==" }, "@babel/types": { - "version": "7.6.1", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.6.1.tgz", - "integrity": "sha512-X7gdiuaCmA0uRjCmRtYJNAVCc/q+5xSgsfKJHqMN4iNLILX39677fJE1O40arPMh0TTtS9ItH67yre6c7k6t0g==" + "version": "7.7.1", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.7.1.tgz", + "integrity": "sha512-kN/XdANDab9x1z5gcjDc9ePpxexkt+1EQ2MQUiM4XnMvQfvp87/+6kY4Ko2maLXH+tei/DgJ/ybFITeqqRwDiA==" }, "acorn": { "version": "6.3.0", @@ -544,9 +549,9 @@ "integrity": "sha1-viQcqBQEAwZ4t0hxcyK4nQyP4oA=" }, "babel-preset-meteor": { - "version": "7.6.1", - "resolved": "https://registry.npmjs.org/babel-preset-meteor/-/babel-preset-meteor-7.6.1.tgz", - "integrity": "sha512-MtFTa3g7cF+lepxY+XraKMTXBKdY5iNrSC2vcnp/cSC3rLwhWfc8WCxIS+qFU7dTen0u2IB3GIWI8cjqCIMOsA==" + "version": "7.7.0", + "resolved": "https://registry.npmjs.org/babel-preset-meteor/-/babel-preset-meteor-7.7.0.tgz", + "integrity": "sha512-py66HMF3uQygzGDGcvV6MPiwrSFheeylabzFPXOb5gegjVze+37roJ86bedBX70NNR68qXe3y8f85EdD98OYQg==" }, "babel-preset-minify": { "version": "0.5.1", @@ -634,14 +639,14 @@ "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==" }, "magic-string": { - "version": "0.25.3", - "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.25.3.tgz", - "integrity": "sha512-6QK0OpF/phMz0Q2AxILkX2mFhi7m+WMwTRg0LQKq/WBB0cDP4rYH3Wp4/d3OTXlrPLVJT/RFqj8tFeAR4nk8AA==" + "version": "0.25.4", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.25.4.tgz", + "integrity": "sha512-oycWO9nEVAP2RVPbIoDoA4Y7LFIJ3xRYov93gAyJhZkET1tNuB0u7uWkZS2LpBWTJUWnmau/To8ECWRC+jKNfw==" }, "meteor-babel": { - "version": "7.6.1", - "resolved": "https://registry.npmjs.org/meteor-babel/-/meteor-babel-7.6.1.tgz", - "integrity": "sha512-3gINjMYXgbBvkWs9x/rD4MInU2hOUTJ5dREEVcKQh48kvLa7WMKl28dkPFARTr0GmGVLqrlP8a01QCgEqk8+9A==" + "version": "7.7.0", + "resolved": "https://registry.npmjs.org/meteor-babel/-/meteor-babel-7.7.0.tgz", + "integrity": "sha512-cadxrIynIfMPYrqQFEebE8iuzy3Qnm1PLEgeJncD7hLSYq/sX03eBJIewTinbNpZRO+CmnTh3APax9BAn2/GOQ==" }, "meteor-babel-helpers": { "version": "0.0.3", @@ -704,9 +709,9 @@ "integrity": "sha512-YlVaefl8P5BnFYOITTNzDvan1ulLOiXJzCNZxduTIosN17b87h3bvG9yHMoHaRuo88H4mQ06Aodj5VtYGGGiTg==" }, "regjsgen": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/regjsgen/-/regjsgen-0.5.0.tgz", - "integrity": "sha512-RnIrLhrXCX5ow/E5/Mh2O4e/oa1/jW0eaBKTSy3LaCj+M3Bqvm97GWDp2yUtzIs4LEn65zR2yiYGFqb2ApnzDA==" + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/regjsgen/-/regjsgen-0.5.1.tgz", + "integrity": "sha512-5qxzGZjDs9w4tzT3TPhCJqWdCc3RLYwy9J2NB0nm5Lz+S273lvWcpjaTGHsT1dc6Hhfq41uSEOw8wBmxrKOuyg==" }, "regjsparser": { "version": "0.6.0", @@ -760,15 +765,10 @@ "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", "integrity": "sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=" }, - "trim-right": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/trim-right/-/trim-right-1.0.1.tgz", - "integrity": "sha1-yy4SAwZ+DI3h9hQJS5/kVwTqYAM=" - }, "typescript": { - "version": "3.6.3", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.6.3.tgz", - "integrity": "sha512-N7bceJL1CtRQ2RiG0AQME13ksR7DiuQh/QehubYcghzv20tnh+MQnQIuJddTmsbqYj+dztchykemz0zFzlvdQw==" + "version": "3.7.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.7.2.tgz", + "integrity": "sha512-ml7V7JfiN2Xwvcer+XAf2csGO1bPBdRbFCkYBczNZggrBZ9c7G3riSUeJmqEU5uOtXNPMhE3n+R4FA/3YOAWOQ==" }, "unicode-canonical-property-names-ecmascript": { "version": "1.0.4", diff --git a/packages/babel-compiler/package.js b/packages/babel-compiler/package.js index 158e43fd51..bd866fd7cf 100644 --- a/packages/babel-compiler/package.js +++ b/packages/babel-compiler/package.js @@ -10,7 +10,7 @@ Package.describe({ }); Npm.depends({ - 'meteor-babel': '7.6.1', + 'meteor-babel': '7.7.0', 'json5': '2.1.0' }); diff --git a/scripts/dev-bundle-server-package.js b/scripts/dev-bundle-server-package.js index 49d97c2d21..3909264631 100644 --- a/scripts/dev-bundle-server-package.js +++ b/scripts/dev-bundle-server-package.js @@ -14,7 +14,7 @@ var packageJson = { "meteor-promise": "0.8.7", promise: "8.0.2", reify: "0.20.12", - "@babel/parser": "7.6.0", + "@babel/parser": "7.7.0", "@types/underscore": "1.9.2", underscore: "1.9.1", "source-map-support": "https://github.com/meteor/node-source-map-support/tarball/1912478769d76e5df4c365e147f25896aee6375e", diff --git a/scripts/dev-bundle-tool-package.js b/scripts/dev-bundle-tool-package.js index 5836478c58..7f866d1552 100644 --- a/scripts/dev-bundle-tool-package.js +++ b/scripts/dev-bundle-tool-package.js @@ -14,15 +14,15 @@ var packageJson = { pacote: "https://github.com/meteor/pacote/tarball/00b3b094e6074e45fc221d5bd96419d07ea34c6a", "node-gyp": "5.0.1", "node-pre-gyp": "0.13.0", - typescript: "3.6.3", - "meteor-babel": "7.6.1", + typescript: "3.7.2", + "meteor-babel": "7.7.0", // Keep the versions of these packages consistent with the versions // found in dev-bundle-server-package.js. "meteor-promise": "0.8.7", reify: "0.20.12", fibers: "3.1.1", // So that Babel can emit require("@babel/runtime/helpers/...") calls. - "@babel/runtime": "7.6.0", + "@babel/runtime": "7.7.0", // For backwards compatibility with isopackets that still depend on // babel-runtime rather than @babel/runtime. "babel-runtime": "7.0.0-beta.3", From 8129af601502dab3e349897f1d2a0c8c8031a8a2 Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Tue, 5 Nov 2019 15:23:52 -0500 Subject: [PATCH 261/327] Avoid using console.error on success in Windows dev bundle scripts. The scripts/generate-dev-bundle.ps1 script fails if any external command logs to STDERR instead of STDOUT, apparently. --- scripts/windows/link-npm-bin-commands.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/windows/link-npm-bin-commands.js b/scripts/windows/link-npm-bin-commands.js index 70dc9a3893..197aa97600 100644 --- a/scripts/windows/link-npm-bin-commands.js +++ b/scripts/windows/link-npm-bin-commands.js @@ -32,7 +32,7 @@ Object.keys(npmPkgBin).forEach(cmd => { }); Promise.all(promises).then(items => { - console.error("Linked npm bin commands: " + items.join(", ")); + console.log("Linked npm bin commands: " + items.join(", ")); }, error => { console.error("Failed to link bin commands: " + error); }); From 8fb3396e2e160c55e6892b83c0f2d7ec91e88c51 Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Tue, 5 Nov 2019 15:38:06 -0500 Subject: [PATCH 262/327] Invert double and single quotes in Windows symlink operation. --- scripts/generate-dev-bundle.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/generate-dev-bundle.ps1 b/scripts/generate-dev-bundle.ps1 index 1bc4075a6f..0e7d7f52e9 100644 --- a/scripts/generate-dev-bundle.ps1 +++ b/scripts/generate-dev-bundle.ps1 @@ -330,7 +330,7 @@ Function Add-NpmModulesFromJsBundleFile { if ((Test-Path "@babel\runtime\helpers") -And !(Test-Path "@babel\runtime\helpers\builtin")) { cd @babel\runtime\helpers - & "$($Commands.node)" -e 'require("fs").symlinkSync(".", "builtin", "junction")' + & "$($Commands.node)" -e "require('fs').symlinkSync('.', 'builtin', 'junction')" cd ..\..\.. } From 9aebc580b7a4f4451b1a4463b9dcaeea4c9d5e58 Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Tue, 5 Nov 2019 15:53:23 -0500 Subject: [PATCH 263/327] Stop creating @babel/runtime/helpers/builtin junction on Windows. Although I managed to make this work somewhat better in my previous commit, we still have to create a .tar.gz archive of the dev bundle, and 7z appears not to handle junction points very well. I think it will be much simpler to avoid the helpers/builtin symlinking hack on Windows. --- scripts/generate-dev-bundle.ps1 | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/scripts/generate-dev-bundle.ps1 b/scripts/generate-dev-bundle.ps1 index 0e7d7f52e9..3a5a0b2a33 100644 --- a/scripts/generate-dev-bundle.ps1 +++ b/scripts/generate-dev-bundle.ps1 @@ -327,12 +327,12 @@ Function Add-NpmModulesFromJsBundleFile { # plugins might still refer to the old directory layout (at least for the # time being), but we can accommodate that by symlinking to the parent # directory, since all the module names are the same. - if ((Test-Path "@babel\runtime\helpers") -And - !(Test-Path "@babel\runtime\helpers\builtin")) { - cd @babel\runtime\helpers - & "$($Commands.node)" -e "require('fs').symlinkSync('.', 'builtin', 'junction')" - cd ..\..\.. - } + # if ((Test-Path "@babel\runtime\helpers") -And + # !(Test-Path "@babel\runtime\helpers\builtin")) { + # cd @babel\runtime\helpers + # & "$($Commands.node)" -e "require('fs').symlinkSync('.', 'builtin', 'junction')" + # cd ..\..\.. + # } # Since we install a patched version of pacote in $Destination\lib\node_modules, # we need to remove npm's bundled version to make it use the new one. From 766fa0296b1b1be9da327ac4de4c5efcb6ab9afc Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Tue, 5 Nov 2019 16:52:43 -0500 Subject: [PATCH 264/327] Bump $BUNDLE_VERSION to 8.16.2.1 before rebuilding dev bundle. --- meteor | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meteor b/meteor index b52709e73f..aed56b5e6f 100755 --- a/meteor +++ b/meteor @@ -1,6 +1,6 @@ #!/usr/bin/env bash -BUNDLE_VERSION=8.16.2.0 +BUNDLE_VERSION=8.16.2.1 # OS Check. Put here because here is where we download the precompiled # bundles that are arch specific. From 00564ac2ad9417f7dd9a354e86ce17c89260fe0c Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Tue, 5 Nov 2019 17:14:24 -0500 Subject: [PATCH 265/327] Bump package versions for 1.8.2-rc.6 release. I made a small mistake publishing rc.5 (forgot to bump meteor-release-experimental.json), so it seemed simpler to skip straight to rc.6. --- packages/babel-compiler/package.js | 2 +- packages/babel-runtime/package.js | 2 +- packages/context/package.js | 2 +- packages/ecmascript-runtime-client/package.js | 2 +- packages/ecmascript-runtime-server/package.js | 2 +- packages/ecmascript/package.js | 2 +- packages/meteor-tool/package.js | 2 +- packages/minifier-css/package.js | 2 +- packages/minifier-js/package.js | 2 +- packages/modules-runtime/package.js | 2 +- packages/modules/package.js | 2 +- packages/mongo/package.js | 2 +- packages/npm-mongo/package.js | 2 +- packages/standard-minifier-css/package.js | 2 +- packages/standard-minifier-js/package.js | 2 +- packages/typescript/package.js | 2 +- packages/webapp/package.js | 2 +- scripts/admin/meteor-release-experimental.json | 2 +- 18 files changed, 18 insertions(+), 18 deletions(-) diff --git a/packages/babel-compiler/package.js b/packages/babel-compiler/package.js index bd866fd7cf..c27e246f7a 100644 --- a/packages/babel-compiler/package.js +++ b/packages/babel-compiler/package.js @@ -6,7 +6,7 @@ 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.4.0-rc182.4' + version: '7.4.0-rc182.6' }); Npm.depends({ diff --git a/packages/babel-runtime/package.js b/packages/babel-runtime/package.js index 464af08075..6d796aa26b 100644 --- a/packages/babel-runtime/package.js +++ b/packages/babel-runtime/package.js @@ -1,7 +1,7 @@ Package.describe({ name: "babel-runtime", summary: "Runtime support for output of Babel transpiler", - version: '1.4.0-rc182.4', + version: '1.4.0-rc182.6', documentation: 'README.md' }); diff --git a/packages/context/package.js b/packages/context/package.js index 69cd6aace8..640b90e26d 100644 --- a/packages/context/package.js +++ b/packages/context/package.js @@ -1,6 +1,6 @@ Package.describe({ name: "context", - version: "0.4.0-rc182.4", + version: "0.4.0-rc182.6", summary: "Manage contextual information without passing objects around", documentation: "README.md" }); diff --git a/packages/ecmascript-runtime-client/package.js b/packages/ecmascript-runtime-client/package.js index 55be73b3e6..4dac25e664 100644 --- a/packages/ecmascript-runtime-client/package.js +++ b/packages/ecmascript-runtime-client/package.js @@ -1,6 +1,6 @@ Package.describe({ name: "ecmascript-runtime-client", - version: "0.9.0-rc182.4", + version: "0.9.0-rc182.6", summary: "Polyfills for new ECMAScript 2015 APIs like Map and Set", git: "https://github.com/meteor/meteor/tree/devel/packages/ecmascript-runtime-client", documentation: "README.md" diff --git a/packages/ecmascript-runtime-server/package.js b/packages/ecmascript-runtime-server/package.js index 395787b76f..8bfc76918d 100644 --- a/packages/ecmascript-runtime-server/package.js +++ b/packages/ecmascript-runtime-server/package.js @@ -1,6 +1,6 @@ Package.describe({ name: "ecmascript-runtime-server", - version: "0.8.0-rc182.4", + version: "0.8.0-rc182.6", summary: "Polyfills for new ECMAScript 2015 APIs like Map and Set", git: "https://github.com/meteor/meteor/tree/devel/packages/ecmascript-runtime-client", documentation: "README.md" diff --git a/packages/ecmascript/package.js b/packages/ecmascript/package.js index fb2a8dde88..dad7dbe2e4 100644 --- a/packages/ecmascript/package.js +++ b/packages/ecmascript/package.js @@ -1,6 +1,6 @@ Package.describe({ name: 'ecmascript', - version: '0.13.0-rc182.4', + version: '0.13.0-rc182.6', summary: 'Compiler plugin that supports ES2015+ in all .js files', documentation: 'README.md' }); diff --git a/packages/meteor-tool/package.js b/packages/meteor-tool/package.js index 5a290df025..e26bbcf6e4 100644 --- a/packages/meteor-tool/package.js +++ b/packages/meteor-tool/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "The Meteor command-line tool", - version: '1.8.2-rc.4' + version: '1.8.2-rc.6' }); Package.includeTool(); diff --git a/packages/minifier-css/package.js b/packages/minifier-css/package.js index 341026d2e1..9f21cc937f 100644 --- a/packages/minifier-css/package.js +++ b/packages/minifier-css/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: 'CSS minifier', - version: '1.4.3-rc182.4' + version: '1.4.3-rc182.6' }); Npm.depends({ diff --git a/packages/minifier-js/package.js b/packages/minifier-js/package.js index 6349599f78..2d0ae924ff 100644 --- a/packages/minifier-js/package.js +++ b/packages/minifier-js/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "JavaScript minifier", - version: "2.5.0-rc182.4" + version: "2.5.0-rc182.6" }); Npm.depends({ diff --git a/packages/modules-runtime/package.js b/packages/modules-runtime/package.js index da67b2b307..51032861b2 100644 --- a/packages/modules-runtime/package.js +++ b/packages/modules-runtime/package.js @@ -1,6 +1,6 @@ Package.describe({ name: "modules-runtime", - version: "0.11.0-rc182.4", + version: "0.11.0-rc182.6", summary: "CommonJS module system", git: "https://github.com/benjamn/install", documentation: "README.md" diff --git a/packages/modules/package.js b/packages/modules/package.js index ee11680085..e1c9d49290 100644 --- a/packages/modules/package.js +++ b/packages/modules/package.js @@ -1,6 +1,6 @@ Package.describe({ name: "modules", - version: "0.14.0-rc182.4", + version: "0.14.0-rc182.6", summary: "CommonJS module system", documentation: "README.md" }); diff --git a/packages/mongo/package.js b/packages/mongo/package.js index b5a71ef7a1..2c0fb0fd45 100644 --- a/packages/mongo/package.js +++ b/packages/mongo/package.js @@ -9,7 +9,7 @@ Package.describe({ summary: "Adaptor for using MongoDB and Minimongo over DDP", - version: '1.7.0-rc182.4' + version: '1.7.0-rc182.6' }); Npm.depends({ diff --git a/packages/npm-mongo/package.js b/packages/npm-mongo/package.js index 53e6333b27..545e694867 100644 --- a/packages/npm-mongo/package.js +++ b/packages/npm-mongo/package.js @@ -3,7 +3,7 @@ Package.describe({ summary: "Wrapper around the mongo npm package", - version: "3.2.0-rc182.4", + version: "3.2.0-rc182.6", documentation: null }); diff --git a/packages/standard-minifier-css/package.js b/packages/standard-minifier-css/package.js index 0a7650084a..03a37a12e2 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.5.4-rc182.4', + version: '1.5.4-rc182.6', summary: 'Standard css minifier used with Meteor apps by default.', documentation: 'README.md' }); diff --git a/packages/standard-minifier-js/package.js b/packages/standard-minifier-js/package.js index 5540319183..8760b90398 100644 --- a/packages/standard-minifier-js/package.js +++ b/packages/standard-minifier-js/package.js @@ -1,6 +1,6 @@ Package.describe({ name: 'standard-minifier-js', - version: '2.5.0-rc182.4', + version: '2.5.0-rc182.6', summary: 'Standard javascript minifiers used with Meteor apps by default.', documentation: 'README.md', }); diff --git a/packages/typescript/package.js b/packages/typescript/package.js index de153be4d7..b61f2fc8ea 100644 --- a/packages/typescript/package.js +++ b/packages/typescript/package.js @@ -1,6 +1,6 @@ Package.describe({ name: "typescript", - version: "3.6.3-rc182.4", + version: "3.7.0-rc182.6", summary: "Compiler plugin that compiles TypeScript and ECMAScript in .ts and .tsx files", documentation: "README.md" }); diff --git a/packages/webapp/package.js b/packages/webapp/package.js index 9272c04e5e..9553768739 100644 --- a/packages/webapp/package.js +++ b/packages/webapp/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Serves a Meteor app over HTTP", - version: '1.7.5-rc182.4' + version: '1.7.5-rc182.6' }); Npm.depends({"basic-auth-connect": "1.0.0", diff --git a/scripts/admin/meteor-release-experimental.json b/scripts/admin/meteor-release-experimental.json index 624066c366..c8683f380d 100644 --- a/scripts/admin/meteor-release-experimental.json +++ b/scripts/admin/meteor-release-experimental.json @@ -1,6 +1,6 @@ { "track": "METEOR", - "version": "1.8.2-rc.4", + "version": "1.8.2-rc.6", "recommended": false, "official": false, "description": "Meteor" From e17b52afacff2770a3728d09c511e4ce3e033799 Mon Sep 17 00:00:00 2001 From: brucejo Date: Thu, 2 May 2019 18:54:55 -0700 Subject: [PATCH 266/327] Call onLogin callbacks during registration if already logged in. Fixes #10157. --- packages/accounts-base/accounts_client.js | 19 ++++++++++++++++++- packages/accounts-base/accounts_common.js | 8 +++++++- 2 files changed, 25 insertions(+), 2 deletions(-) diff --git a/packages/accounts-base/accounts_client.js b/packages/accounts-base/accounts_client.js index 17c1e38a28..9de56ad2cc 100644 --- a/packages/accounts-base/accounts_client.js +++ b/packages/accounts-base/accounts_client.js @@ -435,7 +435,24 @@ export class AccountsClient extends AccountsCommon { this._pageLoadLoginCallbacks.forEach(callback => callback(attemptInfo)); this._pageLoadLoginCallbacks = []; this._pageLoadLoginAttemptInfo = attemptInfo; - }; + } + + // _startupCallback executes on onLogin callbacks + // at registration time if already logged in + // this can happen when new AccountsClient is created + // before callbacks are registered see #10157 + _startupCallback(callbackId) { + // Are we already logged in? + if (this.connection._userId) { + // Then go ahead and call the callback that we just registered. + const cb = this._onLoginHook.callbacks[callbackId]; + // If already logged in before handler is registered, it's safe to + // assume type is a 'resume', and execute the callback at the end of + // the queue so that Meteor.startup can complete before any embedded + // onLogin callbacks would execute. + Meteor.setTimeout(() => cb({ type: 'resume' }), 0); + } + } /// /// LOGIN TOKENS diff --git a/packages/accounts-base/accounts_common.js b/packages/accounts-base/accounts_common.js index d89ed40fa1..30af2a5c36 100644 --- a/packages/accounts-base/accounts_common.js +++ b/packages/accounts-base/accounts_common.js @@ -196,7 +196,10 @@ export class AccountsCommon { * as user details, connection information, etc. */ onLogin(func) { - return this._onLoginHook.register(func); + let ret = this._onLoginHook.register(func); + // call the just registered callback if already logged in + this._startupCallback(this._onLoginHook.nextCallbackId - 1); + return ret; } /** @@ -285,6 +288,9 @@ export class AccountsCommon { } return new Date() > (new Date(when) - minLifetimeMs); } + + // noop on the server overridden on the client + _startupCallback(callbackId) {} } // Note that Accounts is defined separately in accounts_client.js and From ec0ed4dec988874c4c85fe18d9d2b5d26b553d55 Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Wed, 6 Nov 2019 10:23:16 -0500 Subject: [PATCH 267/327] Simplify _startupCallback by passing callback rather than ID. --- packages/accounts-base/accounts_client.js | 12 +++++------- packages/accounts-base/accounts_common.js | 6 +++--- packages/accounts-base/package.js | 2 +- packages/callback-hook/hook.js | 1 + packages/callback-hook/package.js | 2 +- 5 files changed, 11 insertions(+), 12 deletions(-) diff --git a/packages/accounts-base/accounts_client.js b/packages/accounts-base/accounts_client.js index 9de56ad2cc..92ad0303dd 100644 --- a/packages/accounts-base/accounts_client.js +++ b/packages/accounts-base/accounts_client.js @@ -441,16 +441,14 @@ export class AccountsClient extends AccountsCommon { // at registration time if already logged in // this can happen when new AccountsClient is created // before callbacks are registered see #10157 - _startupCallback(callbackId) { + _startupCallback(callback) { // Are we already logged in? if (this.connection._userId) { - // Then go ahead and call the callback that we just registered. - const cb = this._onLoginHook.callbacks[callbackId]; // If already logged in before handler is registered, it's safe to - // assume type is a 'resume', and execute the callback at the end of - // the queue so that Meteor.startup can complete before any embedded - // onLogin callbacks would execute. - Meteor.setTimeout(() => cb({ type: 'resume' }), 0); + // assume type is a 'resume', so we execute the callback at the end + // of the queue so that Meteor.startup can complete before any + // embedded onLogin callbacks would execute. + Meteor.setTimeout(() => callback({ type: 'resume' }), 0); } } diff --git a/packages/accounts-base/accounts_common.js b/packages/accounts-base/accounts_common.js index 30af2a5c36..65bafb18c3 100644 --- a/packages/accounts-base/accounts_common.js +++ b/packages/accounts-base/accounts_common.js @@ -198,7 +198,7 @@ export class AccountsCommon { onLogin(func) { let ret = this._onLoginHook.register(func); // call the just registered callback if already logged in - this._startupCallback(this._onLoginHook.nextCallbackId - 1); + this._startupCallback(ret.callback); return ret; } @@ -289,8 +289,8 @@ export class AccountsCommon { return new Date() > (new Date(when) - minLifetimeMs); } - // noop on the server overridden on the client - _startupCallback(callbackId) {} + // No-op on the server, overridden on the client. + _startupCallback(callback) {} } // Note that Accounts is defined separately in accounts_client.js and diff --git a/packages/accounts-base/package.js b/packages/accounts-base/package.js index 53566bf72f..57af7da5db 100644 --- a/packages/accounts-base/package.js +++ b/packages/accounts-base/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "A user account system", - version: "1.4.4", + version: "1.4.5", }); Package.onUse(api => { diff --git a/packages/callback-hook/hook.js b/packages/callback-hook/hook.js index d44ebd54df..eb1a7a7bff 100644 --- a/packages/callback-hook/hook.js +++ b/packages/callback-hook/hook.js @@ -77,6 +77,7 @@ export class Hook { this.callbacks[id] = callback; return { + callback, stop: () => { delete this.callbacks[id]; } diff --git a/packages/callback-hook/package.js b/packages/callback-hook/package.js index 4e6711df0f..57d482db1e 100644 --- a/packages/callback-hook/package.js +++ b/packages/callback-hook/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Register callbacks on a hook", - version: '1.1.0' + version: '1.2.0' }); Package.onUse(function (api) { From f290eef63128ec8932a202a9cdf32ef7ca203ba8 Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Fri, 8 Nov 2019 11:08:56 -0500 Subject: [PATCH 268/327] Simplify delayed watching of lazy modules. (#10763) * Avoid modifying unibuild.watchSet in PackageSourceBatch._watchOutputFiles. Should fix #10736 by preventing old hashes from remaining in unibuild.watchSet, which was sometimes causing isUpToDate to fail immediately upon restart. * Regression test for issue #10736. --- tools/isobuild/bundler.js | 7 ++++ tools/isobuild/compiler-plugin.js | 36 +++++++++++-------- .../tests/apps/client-refresh/imports/both.js | 1 + .../node_modules/some-package/index.js | 1 + tools/tests/client-refresh.js | 15 ++++++++ 5 files changed, 46 insertions(+), 14 deletions(-) create mode 100644 tools/tests/apps/client-refresh/imports/node_modules/some-package/index.js diff --git a/tools/isobuild/bundler.js b/tools/isobuild/bundler.js index 11a1eb6b5c..af7446bf0f 100644 --- a/tools/isobuild/bundler.js +++ b/tools/isobuild/bundler.js @@ -1146,6 +1146,13 @@ class Target { // that were used in these resources. Depend on them as well. // XXX assumes that this merges cleanly this.watchSet.merge(unibuild.pkg.pluginWatchSet); + + const entry = jsOutputFilesMap.get(unibuild.pkg.name || null); + if (entry && entry.importScannerWatchSet) { + // Populated in PackageSourceBatch._watchOutputFiles, based on the + // ImportScanner's knowledge of which modules are really imported. + this.watchSet.merge(entry.importScannerWatchSet); + } }); if (buildmessage.jobHasMessages()) { diff --git a/tools/isobuild/compiler-plugin.js b/tools/isobuild/compiler-plugin.js index b29adce44c..12aa20d1fd 100644 --- a/tools/isobuild/compiler-plugin.js +++ b/tools/isobuild/compiler-plugin.js @@ -9,7 +9,11 @@ var util = require('util'); var _ = require('underscore'); var Profile = require('../tool-env/profile').Profile; import assert from "assert"; -import {sha1, readAndWatchFileWithHash} from '../fs/watch'; +import { + WatchSet, + sha1, + readAndWatchFileWithHash, +} from '../fs/watch'; import LRU from 'lru-cache'; import {sourceMapLength} from '../utils/utils.js'; import {Console} from '../console/console.js'; @@ -1261,6 +1265,7 @@ export class PackageSourceBatch { files: inputFiles, mainModule: _.find(inputFiles, file => file.mainModule) || null, batch, + importScannerWatchSet: new WatchSet(), }); }); @@ -1337,17 +1342,19 @@ export class PackageSourceBatch { } }); + const entry = map.get(name); + const scanner = new ImportScanner({ name, bundleArch: batch.processor.arch, extensions: batch.importExtensions, sourceRoot: batch.sourceRoot, nodeModulesPaths, - watchSet: batch.unibuild.watchSet, + watchSet: entry.importScannerWatchSet, cacheDir: batch.scannerCacheDir, }); - scanner.addInputFiles(map.get(name).files); + scanner.addInputFiles(entry.files); if (batch.useMeteorInstall) { scanner.scanImports(); @@ -1495,20 +1502,21 @@ export class PackageSourceBatch { absPath = sourcePath && files.pathJoin(entry.batch.sourceRoot, sourcePath), } = file; - const watchSet = entry.batch.unibuild.watchSet; + const { importScannerWatchSet } = entry; if ( typeof absPath === "string" && - // Blindly calling watchSet.addFile would be logically correct here, - // but we can save the cost of calling optimisticHashOrNull(absPath) - // if the watchSet already knows about the file and it was not marked - // as potentially unused. - ! watchSet.isDefinitelyUsed(absPath) + // Blindly calling importScannerWatchSet.addFile would be + // logically correct here, but we can save the cost of calling + // optimisticHashOrNull(absPath) if the importScannerWatchSet + // already knows about the file and it has not been marked as + // potentially unused. + ! importScannerWatchSet.isDefinitelyUsed(absPath) ) { - // If this file was previously added to the unibuild.watchSet using - // the addPotentiallyUnusedFile method (see compileUnibuild), calling - // addFile here will update its usage status to reflect that the - // ImportScanner did, in fact, end up "using" the file. - watchSet.addFile(absPath, optimisticHashOrNull(absPath)); + // If this file was previously added to the importScannerWatchSet + // using the addPotentiallyUnusedFile method (see compileUnibuild), + // calling addFile here will update its usage status to reflect that + // the ImportScanner did, in fact, end up "using" the file. + importScannerWatchSet.addFile(absPath, optimisticHashOrNull(absPath)); } }); }); diff --git a/tools/tests/apps/client-refresh/imports/both.js b/tools/tests/apps/client-refresh/imports/both.js index 652a4168ea..8489e56285 100644 --- a/tools/tests/apps/client-refresh/imports/both.js +++ b/tools/tests/apps/client-refresh/imports/both.js @@ -1 +1,2 @@ +import "some-package"; console.log(module.id, 0); diff --git a/tools/tests/apps/client-refresh/imports/node_modules/some-package/index.js b/tools/tests/apps/client-refresh/imports/node_modules/some-package/index.js new file mode 100644 index 0000000000..652a4168ea --- /dev/null +++ b/tools/tests/apps/client-refresh/imports/node_modules/some-package/index.js @@ -0,0 +1 @@ +console.log(module.id, 0); diff --git a/tools/tests/client-refresh.js b/tools/tests/client-refresh.js index e9958141a6..8aab53b096 100644 --- a/tools/tests/client-refresh.js +++ b/tools/tests/client-refresh.js @@ -30,6 +30,21 @@ selftest.define("client refresh for application code", () => testHelper({ }, })); +selftest.define("client refresh for non-npm node_modules", () => testHelper({ + client: { + path: "client/main.js", + id: "/client/main.js", + }, + server: { + path: "server/main.js", + id: "/server/main.js", + }, + both: { + path: "imports/node_modules/some-package/index.js", + id: "/imports/node_modules/some-package/index.js", + }, +})); + function testHelper(pathsAndIds) { const s = new selftest.Sandbox(); s.createApp("myapp", "client-refresh"); From 37b1683fbc53364ac848a4c314240b21b16eb244 Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Fri, 8 Nov 2019 10:34:16 -0500 Subject: [PATCH 269/327] Centralize legacy arch logic in tools/utils/archinfo.ts. --- tools/isobuild/import-scanner.ts | 10 ++++----- tools/isobuild/package-api.js | 30 +------------------------- tools/project-context.js | 2 +- tools/utils/archinfo.ts | 36 ++++++++++++++++++++++++++++++++ 4 files changed, 43 insertions(+), 35 deletions(-) diff --git a/tools/isobuild/import-scanner.ts b/tools/isobuild/import-scanner.ts index d73ef61b6d..5fc67fd472 100644 --- a/tools/isobuild/import-scanner.ts +++ b/tools/isobuild/import-scanner.ts @@ -5,7 +5,10 @@ import { isString, isObject, isEmpty, has, keys, each, omit, } from "underscore"; import {sha1} from "../fs/watch"; -import {matches as archMatches} from "../utils/archinfo"; +import { + matches as archMatches, + isLegacyArch, +} from "../utils/archinfo"; import {findImportedModuleIdentifiers} from "./js-analyze.js"; import {cssToCommonJS} from "./css-modules"; import buildmessage from "../utils/buildmessage.js"; @@ -71,10 +74,7 @@ const reifyCompileWithCache = Profile("reifyCompileWithCache", wrap(function ( _hash, bundleArch, ) { - const isLegacy = - bundleArch === "web.browser.legacy" || - bundleArch === "web.cordova"; - + const isLegacy = isLegacyArch(bundleArch); return reifyCompile(stripHashBang(source), { parse: reifyBabelParse, generateLetDeclarations: !isLegacy, diff --git a/tools/isobuild/package-api.js b/tools/isobuild/package-api.js index 059c83cf6d..ec6fcb401f 100644 --- a/tools/isobuild/package-api.js +++ b/tools/isobuild/package-api.js @@ -31,7 +31,7 @@ function toArchArray(arch) { arch.splice(0).forEach(where => { if (seen[where]) return; seen[where] = true; - arch.push(...mapWhereToArches(where)); + arch.push(...archinfo.mapWhereToArches(where)); }); // avoid using _.each so as to not add more frames to skip @@ -50,34 +50,6 @@ function toArchArray(arch) { return arch; } -export function mapWhereToArches(where) { - const arches = []; - - // Shorthands for common arch prefixes: - // "server" => os.* - // "client" => web.* - // "legacy" => web.browser.legacy, web.cordova - if (where === "server") { - arches.push("os"); - } else if (where === "client") { - arches.push("web"); - } else if (where === "legacy") { - arches.push( - "web.browser.legacy", - // It's important to include web.browser.legacy resources in the - // Cordova bundle, since Cordova bundles are built into the mobile - // application, rather than being downloaded from a web server at - // runtime. This means we can't distinguish between clients at - // runtime, so we have to use code that works for all clients. - "web.cordova" - ); - } else { - arches.push(where); - } - - return arches; -} - // Iterates over the list of target archs and calls f(arch) for all archs // that match an element of self.allarchs. function forAllMatchingArchs (archs, f) { diff --git a/tools/project-context.js b/tools/project-context.js index efc1d2d4f1..756041362e 100644 --- a/tools/project-context.js +++ b/tools/project-context.js @@ -24,7 +24,7 @@ import { import { mapWhereToArches, -} from "./isobuild/package-api.js"; +} from "./utils/archinfo"; import Resolver from "./isobuild/resolver"; diff --git a/tools/utils/archinfo.ts b/tools/utils/archinfo.ts index 8923f74ffd..4485030724 100644 --- a/tools/utils/archinfo.ts +++ b/tools/utils/archinfo.ts @@ -236,6 +236,42 @@ export function matches(host: string, program: string): boolean { host.substr(program.length, 1) === "."); } +const legacyArches = [ + "web.browser.legacy", + // It's important to include web.browser.legacy resources in the Cordova + // bundle, since Cordova bundles are built into the mobile application, + // rather than being downloaded from a web server at runtime. This means + // we can't distinguish between clients at runtime, so we have to use + // code that works for all clients. + "web.cordova", +]; + +export function isLegacyArch(arch: string): boolean { + return legacyArches.some(la => matches(arch, la)); +} + +export function mapWhereToArches(where: string) { + const arches: string[] = []; + + // Shorthands for common arch prefixes: + // "server" => os.* + // "client" => web.* + // "legacy" => web.browser.legacy, web.cordova + if (where === "server") { + arches.push("os"); + } else if (where === "client") { + arches.push("web"); + } else if (where === "modern") { + arches.push("web.browser"); + } else if (where === "legacy") { + arches.push(...legacyArches); + } else { + arches.push(where); + } + + return arches; +} + // Like `supports`, but instead taken an array of possible // architectures as its second argument. Returns the most specific // match, or null if none match. Throws an error if `programs` From bd9043db20c1409dafe4e421630f0b58adc781f7 Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Fri, 8 Nov 2019 10:42:44 -0500 Subject: [PATCH 270/327] Prefer "main" field of package.json over "module" in legacy bundle. https://github.com/meteor/meteor/issues/10658#issuecomment-550456095 https://github.com/meteor/meteor/issues/10658#issuecomment-551870115 As usual, changes to module resolution logic need to happen in parallel in tools/isobuild/resolver.ts and in packages/modules-runtime. However, thanks to the modern/legacy system, it's easy to make the modules-runtime package behave exactly the way(s) we want in the server, modern client, and legacy client bundles. --- packages/modules-runtime/legacy.js | 21 +++++++++++++++++++ .../modules-runtime/{client.js => modern.js} | 0 packages/modules-runtime/package.js | 3 ++- tools/isobuild/resolver.ts | 11 ++++++++-- .../packages/modules-test-package/common.js | 4 +++- tools/tests/apps/modules/tests.js | 4 ++-- 6 files changed, 37 insertions(+), 6 deletions(-) create mode 100644 packages/modules-runtime/legacy.js rename packages/modules-runtime/{client.js => modern.js} (100%) diff --git a/packages/modules-runtime/legacy.js b/packages/modules-runtime/legacy.js new file mode 100644 index 0000000000..b76f1d36b3 --- /dev/null +++ b/packages/modules-runtime/legacy.js @@ -0,0 +1,21 @@ +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, + + // The difference between legacy.js and modern.js is that this module + // prefers "main" over "module" (see issue #10658). + mainFields: ["browser", "main", "module"], + + 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; + } +}); diff --git a/packages/modules-runtime/client.js b/packages/modules-runtime/modern.js similarity index 100% rename from packages/modules-runtime/client.js rename to packages/modules-runtime/modern.js diff --git a/packages/modules-runtime/package.js b/packages/modules-runtime/package.js index 51032861b2..879426c29e 100644 --- a/packages/modules-runtime/package.js +++ b/packages/modules-runtime/package.js @@ -18,7 +18,8 @@ Package.onUse(function(api) { bare: true }); - api.addFiles("client.js", "client"); + api.addFiles("modern.js", "modern"); + api.addFiles("legacy.js", "legacy"); api.addFiles("server.js", "server"); api.addFiles("profile.js"); diff --git a/tools/isobuild/resolver.ts b/tools/isobuild/resolver.ts index 98f146bb39..9cfce1721b 100644 --- a/tools/isobuild/resolver.ts +++ b/tools/isobuild/resolver.ts @@ -4,7 +4,7 @@ import { has, } from "underscore"; -import { matches as archMatches } from "../utils/archinfo"; +import { matches as archMatches, isLegacyArch } from "../utils/archinfo"; import { pathJoin, pathRelative, @@ -107,7 +107,14 @@ export default class Resolver { path => getPkgJsonSubsetForDir.call(this, path)); if (archMatches(this.targetArch, "web")) { - this.mainFields = ["browser", "module", "main"]; + if (isLegacyArch(this.targetArch)) { + // The legacy bundle prefers the "main" field over the "module" + // field, since many npm packages ship modern syntax other than + // import/export in their "module" dependency trees. + this.mainFields = ["browser", "main", "module"]; + } else { + this.mainFields = ["browser", "module", "main"]; + } } else { this.mainFields = ["main"]; } diff --git a/tools/tests/apps/modules/packages/modules-test-package/common.js b/tools/tests/apps/modules/packages/modules-test-package/common.js index 74d3f6a1b7..7aa6c8da6f 100644 --- a/tools/tests/apps/modules/packages/modules-test-package/common.js +++ b/tools/tests/apps/modules/packages/modules-test-package/common.js @@ -12,7 +12,9 @@ assert.strictEqual(typeof Slot, "function"); const idPrefix = "/node_modules/meteor/modules-test-package/node_modules/@wry/context/lib/"; assert.strictEqual( require.resolve("@wry/context"), - idPrefix + (Meteor.isClient ? "context.esm.js" : "context.js"), + idPrefix + ( + Meteor.isClient && Meteor.isModern ? "context.esm.js" : "context.js" + ), ); import ganalytics from "ganalytics"; diff --git a/tools/tests/apps/modules/tests.js b/tools/tests/apps/modules/tests.js index 5394a52b30..70ea53de36 100644 --- a/tools/tests/apps/modules/tests.js +++ b/tools/tests/apps/modules/tests.js @@ -349,7 +349,7 @@ describe("local node_modules", () => { assert.strictEqual( require.resolve("@wry/context"), "/node_modules/@wry/context/lib/" + ( - Meteor.isClient ? "context.esm.js" : "context.js" + Meteor.isClient && Meteor.isModern ? "context.esm.js" : "context.js" ), ); @@ -363,7 +363,7 @@ describe("local node_modules", () => { assert.strictEqual( require.resolve("graphql"), "/node_modules/graphql/index." + ( - Meteor.isClient ? "mjs" : "js" + Meteor.isClient && Meteor.isModern ? "mjs" : "js" ), ); const { parse } = require("graphql"); From ecb241cab2a07ebee3f6d1f57af39da41d1b3be6 Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Fri, 8 Nov 2019 11:36:19 -0500 Subject: [PATCH 271/327] Update History.md to reflect PR #10765. --- History.md | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/History.md b/History.md index eb009c93ea..9070618550 100644 --- a/History.md +++ b/History.md @@ -44,9 +44,14 @@ (to the best of our current knowledge). [PR #10695](https://github.com/meteor/meteor/pull/10695) -* When bundling client code, the Meteor module system now prefers the - `"module"` field in `package.json`, if defined. - [PR #10541](https://github.com/meteor/meteor/pull/10541) +* When bundling modern client code, the Meteor module system now prefers + the `"module"` field in `package.json` (if defined) over the `"main"` + field, which should unlock various `import`/`export`-based optimizations + such as tree shaking in future versions of Meteor. As before, server + code uses only the `"main"` field, like Node.js, and legacy client code + prefers `"browser"`, `"main"`, and then `"module"`. + [PR #10541](https://github.com/meteor/meteor/pull/10541), + [PR #10765](https://github.com/meteor/meteor/pull/10765). * ECMAScript module syntax (`import`, `export`, and dynamic `import()`) is now supported by default everywhere, including in modules imported from From aec3bc76e33c3fb9ef8f8fd4bb378da99947cb24 Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Fri, 8 Nov 2019 15:51:43 -0500 Subject: [PATCH 272/327] Bump package versions for 1.8.2-rc.7 release. --- packages/accounts-base/package.js | 2 +- packages/babel-compiler/package.js | 2 +- packages/babel-runtime/package.js | 2 +- packages/callback-hook/package.js | 2 +- packages/context/package.js | 2 +- packages/ecmascript-runtime-client/package.js | 2 +- packages/ecmascript-runtime-server/package.js | 2 +- packages/ecmascript/package.js | 2 +- packages/meteor-tool/package.js | 2 +- packages/minifier-css/package.js | 2 +- packages/minifier-js/package.js | 2 +- packages/modules-runtime/package.js | 2 +- packages/modules/package.js | 2 +- packages/mongo/package.js | 2 +- packages/npm-mongo/package.js | 2 +- packages/standard-minifier-css/package.js | 2 +- packages/standard-minifier-js/package.js | 2 +- packages/typescript/package.js | 2 +- packages/webapp/package.js | 2 +- scripts/admin/meteor-release-experimental.json | 2 +- 20 files changed, 20 insertions(+), 20 deletions(-) diff --git a/packages/accounts-base/package.js b/packages/accounts-base/package.js index 57af7da5db..4812d6a498 100644 --- a/packages/accounts-base/package.js +++ b/packages/accounts-base/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "A user account system", - version: "1.4.5", + version: "1.4.5-rc182.7", }); Package.onUse(api => { diff --git a/packages/babel-compiler/package.js b/packages/babel-compiler/package.js index c27e246f7a..9484ef9cc7 100644 --- a/packages/babel-compiler/package.js +++ b/packages/babel-compiler/package.js @@ -6,7 +6,7 @@ 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.4.0-rc182.6' + version: '7.4.0-rc182.7' }); Npm.depends({ diff --git a/packages/babel-runtime/package.js b/packages/babel-runtime/package.js index 6d796aa26b..6a43925373 100644 --- a/packages/babel-runtime/package.js +++ b/packages/babel-runtime/package.js @@ -1,7 +1,7 @@ Package.describe({ name: "babel-runtime", summary: "Runtime support for output of Babel transpiler", - version: '1.4.0-rc182.6', + version: '1.4.0-rc182.7', documentation: 'README.md' }); diff --git a/packages/callback-hook/package.js b/packages/callback-hook/package.js index 57d482db1e..9b793ec893 100644 --- a/packages/callback-hook/package.js +++ b/packages/callback-hook/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Register callbacks on a hook", - version: '1.2.0' + version: '1.2.0-rc182.7' }); Package.onUse(function (api) { diff --git a/packages/context/package.js b/packages/context/package.js index 640b90e26d..7c510fd638 100644 --- a/packages/context/package.js +++ b/packages/context/package.js @@ -1,6 +1,6 @@ Package.describe({ name: "context", - version: "0.4.0-rc182.6", + version: "0.4.0-rc182.7", summary: "Manage contextual information without passing objects around", documentation: "README.md" }); diff --git a/packages/ecmascript-runtime-client/package.js b/packages/ecmascript-runtime-client/package.js index 4dac25e664..3367c30a03 100644 --- a/packages/ecmascript-runtime-client/package.js +++ b/packages/ecmascript-runtime-client/package.js @@ -1,6 +1,6 @@ Package.describe({ name: "ecmascript-runtime-client", - version: "0.9.0-rc182.6", + version: "0.9.0-rc182.7", summary: "Polyfills for new ECMAScript 2015 APIs like Map and Set", git: "https://github.com/meteor/meteor/tree/devel/packages/ecmascript-runtime-client", documentation: "README.md" diff --git a/packages/ecmascript-runtime-server/package.js b/packages/ecmascript-runtime-server/package.js index 8bfc76918d..89075c2cd8 100644 --- a/packages/ecmascript-runtime-server/package.js +++ b/packages/ecmascript-runtime-server/package.js @@ -1,6 +1,6 @@ Package.describe({ name: "ecmascript-runtime-server", - version: "0.8.0-rc182.6", + version: "0.8.0-rc182.7", summary: "Polyfills for new ECMAScript 2015 APIs like Map and Set", git: "https://github.com/meteor/meteor/tree/devel/packages/ecmascript-runtime-client", documentation: "README.md" diff --git a/packages/ecmascript/package.js b/packages/ecmascript/package.js index dad7dbe2e4..374567b003 100644 --- a/packages/ecmascript/package.js +++ b/packages/ecmascript/package.js @@ -1,6 +1,6 @@ Package.describe({ name: 'ecmascript', - version: '0.13.0-rc182.6', + version: '0.13.0-rc182.7', summary: 'Compiler plugin that supports ES2015+ in all .js files', documentation: 'README.md' }); diff --git a/packages/meteor-tool/package.js b/packages/meteor-tool/package.js index e26bbcf6e4..7215234772 100644 --- a/packages/meteor-tool/package.js +++ b/packages/meteor-tool/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "The Meteor command-line tool", - version: '1.8.2-rc.6' + version: '1.8.2-rc.7' }); Package.includeTool(); diff --git a/packages/minifier-css/package.js b/packages/minifier-css/package.js index 9f21cc937f..db9f1cd4e6 100644 --- a/packages/minifier-css/package.js +++ b/packages/minifier-css/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: 'CSS minifier', - version: '1.4.3-rc182.6' + version: '1.4.3-rc182.7' }); Npm.depends({ diff --git a/packages/minifier-js/package.js b/packages/minifier-js/package.js index 2d0ae924ff..4db1f1e265 100644 --- a/packages/minifier-js/package.js +++ b/packages/minifier-js/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "JavaScript minifier", - version: "2.5.0-rc182.6" + version: "2.5.0-rc182.7" }); Npm.depends({ diff --git a/packages/modules-runtime/package.js b/packages/modules-runtime/package.js index 879426c29e..4321cf8df5 100644 --- a/packages/modules-runtime/package.js +++ b/packages/modules-runtime/package.js @@ -1,6 +1,6 @@ Package.describe({ name: "modules-runtime", - version: "0.11.0-rc182.6", + version: "0.11.0-rc182.7", summary: "CommonJS module system", git: "https://github.com/benjamn/install", documentation: "README.md" diff --git a/packages/modules/package.js b/packages/modules/package.js index e1c9d49290..3aab06f529 100644 --- a/packages/modules/package.js +++ b/packages/modules/package.js @@ -1,6 +1,6 @@ Package.describe({ name: "modules", - version: "0.14.0-rc182.6", + version: "0.14.0-rc182.7", summary: "CommonJS module system", documentation: "README.md" }); diff --git a/packages/mongo/package.js b/packages/mongo/package.js index 2c0fb0fd45..ae2c7641f4 100644 --- a/packages/mongo/package.js +++ b/packages/mongo/package.js @@ -9,7 +9,7 @@ Package.describe({ summary: "Adaptor for using MongoDB and Minimongo over DDP", - version: '1.7.0-rc182.6' + version: '1.7.0-rc182.7' }); Npm.depends({ diff --git a/packages/npm-mongo/package.js b/packages/npm-mongo/package.js index 545e694867..4903b1174d 100644 --- a/packages/npm-mongo/package.js +++ b/packages/npm-mongo/package.js @@ -3,7 +3,7 @@ Package.describe({ summary: "Wrapper around the mongo npm package", - version: "3.2.0-rc182.6", + version: "3.2.0-rc182.7", documentation: null }); diff --git a/packages/standard-minifier-css/package.js b/packages/standard-minifier-css/package.js index 03a37a12e2..b73067f33c 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.5.4-rc182.6', + version: '1.5.4-rc182.7', summary: 'Standard css minifier used with Meteor apps by default.', documentation: 'README.md' }); diff --git a/packages/standard-minifier-js/package.js b/packages/standard-minifier-js/package.js index 8760b90398..c95a244f56 100644 --- a/packages/standard-minifier-js/package.js +++ b/packages/standard-minifier-js/package.js @@ -1,6 +1,6 @@ Package.describe({ name: 'standard-minifier-js', - version: '2.5.0-rc182.6', + version: '2.5.0-rc182.7', summary: 'Standard javascript minifiers used with Meteor apps by default.', documentation: 'README.md', }); diff --git a/packages/typescript/package.js b/packages/typescript/package.js index b61f2fc8ea..1fb89b8ff6 100644 --- a/packages/typescript/package.js +++ b/packages/typescript/package.js @@ -1,6 +1,6 @@ Package.describe({ name: "typescript", - version: "3.7.0-rc182.6", + version: "3.7.0-rc182.7", summary: "Compiler plugin that compiles TypeScript and ECMAScript in .ts and .tsx files", documentation: "README.md" }); diff --git a/packages/webapp/package.js b/packages/webapp/package.js index 9553768739..e0a413903b 100644 --- a/packages/webapp/package.js +++ b/packages/webapp/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Serves a Meteor app over HTTP", - version: '1.7.5-rc182.6' + version: '1.7.5-rc182.7' }); Npm.depends({"basic-auth-connect": "1.0.0", diff --git a/scripts/admin/meteor-release-experimental.json b/scripts/admin/meteor-release-experimental.json index c8683f380d..caa129486b 100644 --- a/scripts/admin/meteor-release-experimental.json +++ b/scripts/admin/meteor-release-experimental.json @@ -1,6 +1,6 @@ { "track": "METEOR", - "version": "1.8.2-rc.6", + "version": "1.8.2-rc.7", "recommended": false, "official": false, "description": "Meteor" From bbd5a12787fea6f445b401216542bf1297760752 Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Fri, 8 Nov 2019 18:56:28 -0500 Subject: [PATCH 273/327] Update npm to v6.13.0 and pacote to v9.5.9. --- History.md | 6 +++--- scripts/build-dev-bundle-common.sh | 2 +- scripts/dev-bundle-tool-package.js | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/History.md b/History.md index 9070618550..7c83f3e93d 100644 --- a/History.md +++ b/History.md @@ -27,9 +27,9 @@ * Node has been updated to version [8.16.2](https://nodejs.org/en/blog/release/v8.16.2/). -* The `npm` npm package has been updated to version 6.11.3, and our - [fork](https://github.com/meteor/pacote/tree/v9.5.8-meteor) of its - `pacote` dependency has been updated to version 9.5.8. +* The `npm` npm package has been updated to version 6.13.0, and our + [fork](https://github.com/meteor/pacote/tree/v9.5.9-meteor) of its + `pacote` dependency has been updated to version 9.5.9. * New Meteor applications now include an official `typescript` package, supporting TypeScript compilation of `.ts` and `.tsx` modules, which can diff --git a/scripts/build-dev-bundle-common.sh b/scripts/build-dev-bundle-common.sh index 8470be4568..0aa8d456a1 100644 --- a/scripts/build-dev-bundle-common.sh +++ b/scripts/build-dev-bundle-common.sh @@ -8,7 +8,7 @@ ARCH=$(uname -m) NODE_VERSION=8.16.2 MONGO_VERSION_64BIT=4.0.6 MONGO_VERSION_32BIT=3.2.22 -NPM_VERSION=6.11.3 +NPM_VERSION=6.13.0 # If we built Node from source on Jenkins, this is the build number. NODE_BUILD_NUMBER= diff --git a/scripts/dev-bundle-tool-package.js b/scripts/dev-bundle-tool-package.js index 7f866d1552..2b87329095 100644 --- a/scripts/dev-bundle-tool-package.js +++ b/scripts/dev-bundle-tool-package.js @@ -10,8 +10,8 @@ var packageJson = { dependencies: { // Explicit dependency because we are replacing it with a bundled version // and we want to make sure there are no dependencies on a higher version - npm: "6.11.3", - pacote: "https://github.com/meteor/pacote/tarball/00b3b094e6074e45fc221d5bd96419d07ea34c6a", + npm: "6.13.0", + pacote: "https://github.com/meteor/pacote/tarball/a1853763676463c458aa8ce7b91c20205c44ae6a", "node-gyp": "5.0.1", "node-pre-gyp": "0.13.0", typescript: "3.7.2", From e0ddae2cc7bb38ee75c72a8479f5e3a46fc52bd4 Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Fri, 8 Nov 2019 20:04:38 -0500 Subject: [PATCH 274/327] Bump $BUNDLE_VERSION to 8.16.2.2 before rebuilding dev bundle. --- meteor | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meteor b/meteor index aed56b5e6f..19c08c64e6 100755 --- a/meteor +++ b/meteor @@ -1,6 +1,6 @@ #!/usr/bin/env bash -BUNDLE_VERSION=8.16.2.1 +BUNDLE_VERSION=8.16.2.2 # OS Check. Put here because here is where we download the precompiled # bundles that are arch specific. From cf04e051e394d33ddd4089b198f1b57f25261077 Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Mon, 11 Nov 2019 17:00:38 -0500 Subject: [PATCH 275/327] Write files in Builder#_copyDirectory asynchronously. Using fs.writeFileSync in a serial style becomes especially costly when we're writing a lot of files. In a recent profiling exercise I did on Windows, nearly 80% of the time taken by Builder#_copyDirectory was spent just closing the written files. By using the asynchronous fs.writeFile function, we should be able to parallelize at least some of this work, and await all the promises at the very end of copying the directory. --- tools/fs/files.ts | 15 +++++++++++++++ tools/isobuild/builder.js | 14 ++++++++------ 2 files changed, 23 insertions(+), 6 deletions(-) diff --git a/tools/fs/files.ts b/tools/fs/files.ts index 24d57da570..99f97d9d89 100644 --- a/tools/fs/files.ts +++ b/tools/fs/files.ts @@ -1751,6 +1751,21 @@ export const unlink = wrapDestructiveFsFunc("unlink", fs.unlinkSync); export const write = wrapFsFunc("write", fs.writeSync, []); export const writeFile = wrapDestructiveFsFunc("writeFile", fs.writeFileSync); +// Asynchronous versions of some of the above functions. +export const promises = { + writeFile: wrapFsFunc( + "promises.writeFile", + // TODO This will be easier with the fs.promises namespace (available + // in Node.js 12, in Meteor 1.9+). + (path, data, options) => new Promise((resolve, reject) => { + fs.writeFile(path, data, options, error => { + error ? reject(error) : resolve(); + }); + }), + [0], + ), +}; + type StatListener = ( current: Stats, previous: Stats, diff --git a/tools/isobuild/builder.js b/tools/isobuild/builder.js index 04a23919ec..926e8e1e91 100644 --- a/tools/isobuild/builder.js +++ b/tools/isobuild/builder.js @@ -545,9 +545,9 @@ Previous builder: ${previousBuilder.outputPath}, this builder: ${outputPath}` ); } - // Call this._copyDirectory rather than this.copyDirectory so that the + // Call this._copyDirectoryAsync rather than this.copyDirectory so the // subBuilder hacks from Builder#enter won't apply a second time. - return this._copyDirectory(options); + return this._copyDirectoryAsync(options).await(); } _ensureAllNonPackageDirectories(absFromDir, relToDir) { @@ -598,10 +598,10 @@ Previous builder: ${previousBuilder.outputPath}, this builder: ${outputPath}` copyDirectory(options) { // TODO(benjamn) Remove this wrapper when Builder#enter is no longer // implemented using ridiculous hacks. - return this._copyDirectory(options); + return this._copyDirectoryAsync(options).await(); } - _copyDirectory({ + _copyDirectoryAsync({ from, to, ignore, specificFiles, @@ -763,7 +763,7 @@ Previous builder: ${previousBuilder.outputPath}, this builder: ${outputPath}` if (this.previousWrittenHashes[thisRelTo] !== hash) { const content = optimisticReadFile(thisAbsFrom); - files.writeFile( + writePromises.push(files.promises.writeFile( files.pathResolve(this.buildPath, thisRelTo), // The reason we call files.writeFile here instead of // files.copyFile is so that we can read the file using @@ -776,7 +776,7 @@ Previous builder: ${previousBuilder.outputPath}, this builder: ${outputPath}` // this function is used by 'meteor create' which is copying from // the read-only tools tree into a writable app." { mode: (fileStatus.mode & 0o100) ? 0o777 : 0o666 }, - ); + )); } this.writtenHashes[thisRelTo] = hash; @@ -785,7 +785,9 @@ Previous builder: ${previousBuilder.outputPath}, this builder: ${outputPath}` }); }; + const writePromises = []; walk(rootDir, to); + return Promise.all(writePromises); } // Returns a new Builder-compatible object that works just like a From c7cc817d69100aca55f6da6cb290d0afee3918e4 Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Mon, 11 Nov 2019 17:39:35 -0500 Subject: [PATCH 276/327] Use wrapDestructiveFsFunc for files.promises.writeFile. --- tools/fs/files.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tools/fs/files.ts b/tools/fs/files.ts index 99f97d9d89..e27b3cf54a 100644 --- a/tools/fs/files.ts +++ b/tools/fs/files.ts @@ -1753,7 +1753,7 @@ export const writeFile = wrapDestructiveFsFunc("writeFile", fs.writeFileSync); // Asynchronous versions of some of the above functions. export const promises = { - writeFile: wrapFsFunc( + writeFile: wrapDestructiveFsFunc( "promises.writeFile", // TODO This will be easier with the fs.promises namespace (available // in Node.js 12, in Meteor 1.9+). @@ -1762,7 +1762,6 @@ export const promises = { error ? reject(error) : resolve(); }); }), - [0], ), }; From 61b2d1710b2058bcc9fe076a80784b1cedb0dd6f Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Mon, 11 Nov 2019 18:09:55 -0500 Subject: [PATCH 277/327] Attempt to make static-html self-tests less flaky. --- .../.meteor/.finished-upgraders | 18 +++ .../.meteor/packages | 7 +- .../.meteor/release | 2 +- .../.meteor/versions | 108 +++++++++--------- .../.meteor/.finished-upgraders | 18 +++ .../.meteor/packages | 7 +- .../.meteor/release | 2 +- .../.meteor/versions | 108 +++++++++--------- tools/tests/static-html.js | 3 +- 9 files changed, 162 insertions(+), 111 deletions(-) create mode 100644 tools/tests/apps/compiler-plugin-static-html-error/.meteor/.finished-upgraders create mode 100644 tools/tests/apps/compiler-plugin-static-html/.meteor/.finished-upgraders diff --git a/tools/tests/apps/compiler-plugin-static-html-error/.meteor/.finished-upgraders b/tools/tests/apps/compiler-plugin-static-html-error/.meteor/.finished-upgraders new file mode 100644 index 0000000000..4538749ab8 --- /dev/null +++ b/tools/tests/apps/compiler-plugin-static-html-error/.meteor/.finished-upgraders @@ -0,0 +1,18 @@ +# This file contains information which helps Meteor properly upgrade your +# app when you run 'meteor update'. You should check it into version control +# with your project. + +notices-for-0.9.0 +notices-for-0.9.1 +0.9.4-platform-file +notices-for-facebook-graph-api-2 +1.2.0-standard-minifiers-package +1.2.0-meteor-platform-split +1.2.0-cordova-changes +1.2.0-breaking-changes +1.3.0-split-minifiers-package +1.4.0-remove-old-dev-bundle-link +1.4.1-add-shell-server-package +1.4.3-split-account-service-packages +1.5-add-dynamic-import-package +1.7-split-underscore-from-meteor-base diff --git a/tools/tests/apps/compiler-plugin-static-html-error/.meteor/packages b/tools/tests/apps/compiler-plugin-static-html-error/.meteor/packages index 90bb03902f..52841ee183 100644 --- a/tools/tests/apps/compiler-plugin-static-html-error/.meteor/packages +++ b/tools/tests/apps/compiler-plugin-static-html-error/.meteor/packages @@ -2,5 +2,10 @@ # # 'meteor add' and 'meteor remove' will edit this file for you, # but you can also edit it by hand. -meteor-base +meteor-base@1.4.0 static-html +standard-minifier-css +standard-minifier-js +shell-server +dynamic-import +underscore diff --git a/tools/tests/apps/compiler-plugin-static-html-error/.meteor/release b/tools/tests/apps/compiler-plugin-static-html-error/.meteor/release index 621e94f0ec..97064e1993 100644 --- a/tools/tests/apps/compiler-plugin-static-html-error/.meteor/release +++ b/tools/tests/apps/compiler-plugin-static-html-error/.meteor/release @@ -1 +1 @@ -none +METEOR@1.8.1 diff --git a/tools/tests/apps/compiler-plugin-static-html-error/.meteor/versions b/tools/tests/apps/compiler-plugin-static-html-error/.meteor/versions index 8e4831fde0..2112029aa3 100644 --- a/tools/tests/apps/compiler-plugin-static-html-error/.meteor/versions +++ b/tools/tests/apps/compiler-plugin-static-html-error/.meteor/versions @@ -1,53 +1,55 @@ -autoupdate@1.2.2-plugins.0 -babel-compiler@5.8.3-plugins.0_5 -babel-runtime@0.1.2 -base64@1.0.4-plugins.0 -binary-heap@1.0.4-plugins.0 -blaze@2.1.3-plugins.0 -blaze-tools@1.0.4-plugins.0 -boilerplate-generator@1.0.4-plugins.0 -caching-compiler@1.0.0-plugins.1 -caching-html-compiler@1.0.0 -callback-hook@1.0.4-plugins.0 -check@1.0.6-plugins.0 -ddp@1.2.0-plugins.0 -ddp-client@1.2.0-plugins.0 -ddp-common@1.2.0-plugins.0 -ddp-server@1.2.0-plugins.1 -deps@1.0.8-plugins.0 -diff-sequence@1.0.0-plugins.0 -ecmascript@0.1.3-plugins.1 -ejson@1.0.7-plugins.0 -geojson-utils@1.0.4-plugins.0 -html-tools@1.0.5-plugins.0 -htmljs@1.0.5-plugins.0 -http@1.1.1-plugins.0 -id-map@1.0.4-plugins.0 -jquery@1.11.3-plugins.0_3 -json@1.0.4-plugins.0 -logging@1.0.8-plugins.0 -meteor@1.1.7-plugins.1 -minifiers@1.1.6-plugins.0 -minimongo@1.0.9-plugins.0 -mongo@1.1.1-plugins.0 -mongo-id@1.0.0-plugins.0 -npm-mongo@1.4.32-plugins.0_1 -observe-sequence@1.0.7-plugins.0 -ordered-dict@1.0.4-plugins.0 -promise@0.4.2-plugins.0 -random@1.0.4-plugins.0 -reactive-var@1.0.6-plugins.0 -reload@1.1.4-plugins.0 -retry@1.0.4-plugins.0 -routepolicy@1.0.6-plugins.0 -spacebars@1.0.7-plugins.0 -spacebars-compiler@1.0.7-plugins.1 -static-html@1.0.12 -templating@1.1.2-plugins.1 -templating-tools@0.0.1 -tracker@1.0.8-plugins.0 -ui@1.0.7-plugins.0 -underscore@1.0.4-plugins.0 -url@1.0.5-plugins.0 -webapp@1.2.1-plugins.0 -webapp-hashing@1.0.4-plugins.0 +autoupdate@1.6.0 +babel-compiler@7.3.4 +babel-runtime@1.3.0 +base64@1.0.12 +blaze-tools@1.0.10 +boilerplate-generator@1.6.0 +caching-compiler@1.2.1 +caching-html-compiler@1.1.3 +callback-hook@1.1.0 +check@1.3.1 +ddp@1.4.0 +ddp-client@2.3.3 +ddp-common@1.4.0 +ddp-server@2.3.0 +deps@1.0.12 +diff-sequence@1.1.1 +dynamic-import@0.5.1 +ecmascript@0.12.7 +ecmascript-runtime@0.7.0 +ecmascript-runtime-client@0.8.0 +ecmascript-runtime-server@0.7.1 +ejson@1.1.0 +es5-shim@4.8.0 +fetch@0.1.1 +hot-code-push@1.0.4 +html-tools@1.0.11 +htmljs@1.0.11 +id-map@1.1.0 +inter-process-messaging@0.1.0 +livedata@1.0.18 +logging@1.1.20 +meteor@1.9.3 +meteor-base@1.4.0 +minifier-css@1.4.2 +minifier-js@2.4.1 +modern-browsers@0.1.4 +modules@0.13.0 +modules-runtime@0.10.3 +mongo-id@1.0.7 +promise@0.11.2 +random@1.1.0 +reload@1.3.0 +retry@1.1.0 +routepolicy@1.1.0 +shell-server@0.4.0 +socket-stream-client@0.2.2 +spacebars-compiler@1.1.3 +standard-minifier-css@1.5.3 +standard-minifier-js@2.4.1 +static-html@1.2.2 +templating-tools@1.1.2 +tracker@1.2.0 +underscore@1.0.10 +webapp@1.7.4 +webapp-hashing@1.0.9 diff --git a/tools/tests/apps/compiler-plugin-static-html/.meteor/.finished-upgraders b/tools/tests/apps/compiler-plugin-static-html/.meteor/.finished-upgraders new file mode 100644 index 0000000000..4538749ab8 --- /dev/null +++ b/tools/tests/apps/compiler-plugin-static-html/.meteor/.finished-upgraders @@ -0,0 +1,18 @@ +# This file contains information which helps Meteor properly upgrade your +# app when you run 'meteor update'. You should check it into version control +# with your project. + +notices-for-0.9.0 +notices-for-0.9.1 +0.9.4-platform-file +notices-for-facebook-graph-api-2 +1.2.0-standard-minifiers-package +1.2.0-meteor-platform-split +1.2.0-cordova-changes +1.2.0-breaking-changes +1.3.0-split-minifiers-package +1.4.0-remove-old-dev-bundle-link +1.4.1-add-shell-server-package +1.4.3-split-account-service-packages +1.5-add-dynamic-import-package +1.7-split-underscore-from-meteor-base diff --git a/tools/tests/apps/compiler-plugin-static-html/.meteor/packages b/tools/tests/apps/compiler-plugin-static-html/.meteor/packages index 90bb03902f..52841ee183 100644 --- a/tools/tests/apps/compiler-plugin-static-html/.meteor/packages +++ b/tools/tests/apps/compiler-plugin-static-html/.meteor/packages @@ -2,5 +2,10 @@ # # 'meteor add' and 'meteor remove' will edit this file for you, # but you can also edit it by hand. -meteor-base +meteor-base@1.4.0 static-html +standard-minifier-css +standard-minifier-js +shell-server +dynamic-import +underscore diff --git a/tools/tests/apps/compiler-plugin-static-html/.meteor/release b/tools/tests/apps/compiler-plugin-static-html/.meteor/release index 621e94f0ec..97064e1993 100644 --- a/tools/tests/apps/compiler-plugin-static-html/.meteor/release +++ b/tools/tests/apps/compiler-plugin-static-html/.meteor/release @@ -1 +1 @@ -none +METEOR@1.8.1 diff --git a/tools/tests/apps/compiler-plugin-static-html/.meteor/versions b/tools/tests/apps/compiler-plugin-static-html/.meteor/versions index 8e4831fde0..2112029aa3 100644 --- a/tools/tests/apps/compiler-plugin-static-html/.meteor/versions +++ b/tools/tests/apps/compiler-plugin-static-html/.meteor/versions @@ -1,53 +1,55 @@ -autoupdate@1.2.2-plugins.0 -babel-compiler@5.8.3-plugins.0_5 -babel-runtime@0.1.2 -base64@1.0.4-plugins.0 -binary-heap@1.0.4-plugins.0 -blaze@2.1.3-plugins.0 -blaze-tools@1.0.4-plugins.0 -boilerplate-generator@1.0.4-plugins.0 -caching-compiler@1.0.0-plugins.1 -caching-html-compiler@1.0.0 -callback-hook@1.0.4-plugins.0 -check@1.0.6-plugins.0 -ddp@1.2.0-plugins.0 -ddp-client@1.2.0-plugins.0 -ddp-common@1.2.0-plugins.0 -ddp-server@1.2.0-plugins.1 -deps@1.0.8-plugins.0 -diff-sequence@1.0.0-plugins.0 -ecmascript@0.1.3-plugins.1 -ejson@1.0.7-plugins.0 -geojson-utils@1.0.4-plugins.0 -html-tools@1.0.5-plugins.0 -htmljs@1.0.5-plugins.0 -http@1.1.1-plugins.0 -id-map@1.0.4-plugins.0 -jquery@1.11.3-plugins.0_3 -json@1.0.4-plugins.0 -logging@1.0.8-plugins.0 -meteor@1.1.7-plugins.1 -minifiers@1.1.6-plugins.0 -minimongo@1.0.9-plugins.0 -mongo@1.1.1-plugins.0 -mongo-id@1.0.0-plugins.0 -npm-mongo@1.4.32-plugins.0_1 -observe-sequence@1.0.7-plugins.0 -ordered-dict@1.0.4-plugins.0 -promise@0.4.2-plugins.0 -random@1.0.4-plugins.0 -reactive-var@1.0.6-plugins.0 -reload@1.1.4-plugins.0 -retry@1.0.4-plugins.0 -routepolicy@1.0.6-plugins.0 -spacebars@1.0.7-plugins.0 -spacebars-compiler@1.0.7-plugins.1 -static-html@1.0.12 -templating@1.1.2-plugins.1 -templating-tools@0.0.1 -tracker@1.0.8-plugins.0 -ui@1.0.7-plugins.0 -underscore@1.0.4-plugins.0 -url@1.0.5-plugins.0 -webapp@1.2.1-plugins.0 -webapp-hashing@1.0.4-plugins.0 +autoupdate@1.6.0 +babel-compiler@7.3.4 +babel-runtime@1.3.0 +base64@1.0.12 +blaze-tools@1.0.10 +boilerplate-generator@1.6.0 +caching-compiler@1.2.1 +caching-html-compiler@1.1.3 +callback-hook@1.1.0 +check@1.3.1 +ddp@1.4.0 +ddp-client@2.3.3 +ddp-common@1.4.0 +ddp-server@2.3.0 +deps@1.0.12 +diff-sequence@1.1.1 +dynamic-import@0.5.1 +ecmascript@0.12.7 +ecmascript-runtime@0.7.0 +ecmascript-runtime-client@0.8.0 +ecmascript-runtime-server@0.7.1 +ejson@1.1.0 +es5-shim@4.8.0 +fetch@0.1.1 +hot-code-push@1.0.4 +html-tools@1.0.11 +htmljs@1.0.11 +id-map@1.1.0 +inter-process-messaging@0.1.0 +livedata@1.0.18 +logging@1.1.20 +meteor@1.9.3 +meteor-base@1.4.0 +minifier-css@1.4.2 +minifier-js@2.4.1 +modern-browsers@0.1.4 +modules@0.13.0 +modules-runtime@0.10.3 +mongo-id@1.0.7 +promise@0.11.2 +random@1.1.0 +reload@1.3.0 +retry@1.1.0 +routepolicy@1.1.0 +shell-server@0.4.0 +socket-stream-client@0.2.2 +spacebars-compiler@1.1.3 +standard-minifier-css@1.5.3 +standard-minifier-js@2.4.1 +static-html@1.2.2 +templating-tools@1.1.2 +tracker@1.2.0 +underscore@1.0.10 +webapp@1.7.4 +webapp-hashing@1.0.9 diff --git a/tools/tests/static-html.js b/tools/tests/static-html.js index 870f9b67e3..5eb89b3637 100644 --- a/tools/tests/static-html.js +++ b/tools/tests/static-html.js @@ -54,7 +54,8 @@ selftest.define("static-html - throws error", () => { s.cd('myapp'); const run = startRun(s); - run.matchBeforeExit("Attributes on not supported"); + run.match("Attributes on not supported"); + run.waitSecs(30); run.stop(); }); From 16e31728e43f4c31841777c49372635541606ba7 Mon Sep 17 00:00:00 2001 From: arggh Date: Tue, 12 Nov 2019 02:04:44 +0200 Subject: [PATCH 278/327] Update license range for year 2019 (#10699) Better late than never, right? --- LICENSE | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LICENSE b/LICENSE index 10a91f042c..f68a3b7605 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2011 - 2018 Meteor Development Group, Inc. +Copyright (c) 2011 - 2019 Meteor Development Group, Inc. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal From b71ab5bec5e6477fdc7849c16a7cc6664bbaa3a4 Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Mon, 11 Nov 2019 19:10:00 -0500 Subject: [PATCH 279/327] Bump compiler.BUILT_BY and LINKER_CACHE_SALT to force rebuild. --- tools/isobuild/compiler-plugin.js | 2 +- tools/isobuild/compiler.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/isobuild/compiler-plugin.js b/tools/isobuild/compiler-plugin.js index 12aa20d1fd..f0f45270ce 100644 --- a/tools/isobuild/compiler-plugin.js +++ b/tools/isobuild/compiler-plugin.js @@ -70,7 +70,7 @@ const hasOwn = Object.prototype.hasOwnProperty; // Cache the (slightly post-processed) results of linker.fullLink. const CACHE_SIZE = process.env.METEOR_LINKER_CACHE_SIZE || 1024*1024*100; const CACHE_DEBUG = !! process.env.METEOR_TEST_PRINT_LINKER_CACHE_DEBUG; -const LINKER_CACHE_SALT = 23; // Increment this number to force relinking. +const LINKER_CACHE_SALT = 24; // Increment this number to force relinking. const LINKER_CACHE = new LRU({ max: CACHE_SIZE, // Cache is measured in bytes. We don't care about servePath. diff --git a/tools/isobuild/compiler.js b/tools/isobuild/compiler.js index c155efa8d8..3ecdb82d61 100644 --- a/tools/isobuild/compiler.js +++ b/tools/isobuild/compiler.js @@ -34,7 +34,7 @@ var compiler = exports; // dependencies. (At least for now, packages only used in target creation (eg // minifiers) don't require you to update BUILT_BY, though you will need to quit // and rerun "meteor run".) -compiler.BUILT_BY = 'meteor/33'; +compiler.BUILT_BY = 'meteor/34'; // This is a list of all possible architectures that a build can target. (Client // is expanded into 'web.browser' and 'web.cordova') From a367c9aef5896d3e92a50ea9c826380e05d5b9df Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Mon, 11 Nov 2019 19:12:13 -0500 Subject: [PATCH 280/327] Bump package versions for 1.8.2-rc.8 release. --- packages/accounts-base/package.js | 2 +- packages/babel-compiler/package.js | 2 +- packages/babel-runtime/package.js | 2 +- packages/callback-hook/package.js | 2 +- packages/context/package.js | 2 +- packages/ecmascript-runtime-client/package.js | 2 +- packages/ecmascript-runtime-server/package.js | 2 +- packages/ecmascript/package.js | 2 +- packages/meteor-tool/package.js | 2 +- packages/minifier-css/package.js | 2 +- packages/minifier-js/package.js | 2 +- packages/modules-runtime/package.js | 2 +- packages/modules/package.js | 2 +- packages/mongo/package.js | 2 +- packages/npm-mongo/package.js | 2 +- packages/standard-minifier-css/package.js | 2 +- packages/standard-minifier-js/package.js | 2 +- packages/typescript/package.js | 2 +- packages/webapp/package.js | 2 +- scripts/admin/meteor-release-experimental.json | 2 +- 20 files changed, 20 insertions(+), 20 deletions(-) diff --git a/packages/accounts-base/package.js b/packages/accounts-base/package.js index 4812d6a498..0043d33203 100644 --- a/packages/accounts-base/package.js +++ b/packages/accounts-base/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "A user account system", - version: "1.4.5-rc182.7", + version: "1.4.5-rc182.8", }); Package.onUse(api => { diff --git a/packages/babel-compiler/package.js b/packages/babel-compiler/package.js index 9484ef9cc7..cd157ebd63 100644 --- a/packages/babel-compiler/package.js +++ b/packages/babel-compiler/package.js @@ -6,7 +6,7 @@ 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.4.0-rc182.7' + version: '7.4.0-rc182.8' }); Npm.depends({ diff --git a/packages/babel-runtime/package.js b/packages/babel-runtime/package.js index 6a43925373..fdcb05e100 100644 --- a/packages/babel-runtime/package.js +++ b/packages/babel-runtime/package.js @@ -1,7 +1,7 @@ Package.describe({ name: "babel-runtime", summary: "Runtime support for output of Babel transpiler", - version: '1.4.0-rc182.7', + version: '1.4.0-rc182.8', documentation: 'README.md' }); diff --git a/packages/callback-hook/package.js b/packages/callback-hook/package.js index 9b793ec893..02573743f7 100644 --- a/packages/callback-hook/package.js +++ b/packages/callback-hook/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Register callbacks on a hook", - version: '1.2.0-rc182.7' + version: '1.2.0-rc182.8' }); Package.onUse(function (api) { diff --git a/packages/context/package.js b/packages/context/package.js index 7c510fd638..cdd1b2e37b 100644 --- a/packages/context/package.js +++ b/packages/context/package.js @@ -1,6 +1,6 @@ Package.describe({ name: "context", - version: "0.4.0-rc182.7", + version: "0.4.0-rc182.8", summary: "Manage contextual information without passing objects around", documentation: "README.md" }); diff --git a/packages/ecmascript-runtime-client/package.js b/packages/ecmascript-runtime-client/package.js index 3367c30a03..8e513e5f9e 100644 --- a/packages/ecmascript-runtime-client/package.js +++ b/packages/ecmascript-runtime-client/package.js @@ -1,6 +1,6 @@ Package.describe({ name: "ecmascript-runtime-client", - version: "0.9.0-rc182.7", + version: "0.9.0-rc182.8", summary: "Polyfills for new ECMAScript 2015 APIs like Map and Set", git: "https://github.com/meteor/meteor/tree/devel/packages/ecmascript-runtime-client", documentation: "README.md" diff --git a/packages/ecmascript-runtime-server/package.js b/packages/ecmascript-runtime-server/package.js index 89075c2cd8..95fc5b1c63 100644 --- a/packages/ecmascript-runtime-server/package.js +++ b/packages/ecmascript-runtime-server/package.js @@ -1,6 +1,6 @@ Package.describe({ name: "ecmascript-runtime-server", - version: "0.8.0-rc182.7", + version: "0.8.0-rc182.8", summary: "Polyfills for new ECMAScript 2015 APIs like Map and Set", git: "https://github.com/meteor/meteor/tree/devel/packages/ecmascript-runtime-client", documentation: "README.md" diff --git a/packages/ecmascript/package.js b/packages/ecmascript/package.js index 374567b003..0f0e195dd2 100644 --- a/packages/ecmascript/package.js +++ b/packages/ecmascript/package.js @@ -1,6 +1,6 @@ Package.describe({ name: 'ecmascript', - version: '0.13.0-rc182.7', + version: '0.13.0-rc182.8', summary: 'Compiler plugin that supports ES2015+ in all .js files', documentation: 'README.md' }); diff --git a/packages/meteor-tool/package.js b/packages/meteor-tool/package.js index 7215234772..72f2cc8bd8 100644 --- a/packages/meteor-tool/package.js +++ b/packages/meteor-tool/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "The Meteor command-line tool", - version: '1.8.2-rc.7' + version: '1.8.2-rc.8' }); Package.includeTool(); diff --git a/packages/minifier-css/package.js b/packages/minifier-css/package.js index db9f1cd4e6..a45d31050a 100644 --- a/packages/minifier-css/package.js +++ b/packages/minifier-css/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: 'CSS minifier', - version: '1.4.3-rc182.7' + version: '1.4.3-rc182.8' }); Npm.depends({ diff --git a/packages/minifier-js/package.js b/packages/minifier-js/package.js index 4db1f1e265..3aa7cd6838 100644 --- a/packages/minifier-js/package.js +++ b/packages/minifier-js/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "JavaScript minifier", - version: "2.5.0-rc182.7" + version: "2.5.0-rc182.8" }); Npm.depends({ diff --git a/packages/modules-runtime/package.js b/packages/modules-runtime/package.js index 4321cf8df5..67e9779034 100644 --- a/packages/modules-runtime/package.js +++ b/packages/modules-runtime/package.js @@ -1,6 +1,6 @@ Package.describe({ name: "modules-runtime", - version: "0.11.0-rc182.7", + version: "0.11.0-rc182.8", summary: "CommonJS module system", git: "https://github.com/benjamn/install", documentation: "README.md" diff --git a/packages/modules/package.js b/packages/modules/package.js index 3aab06f529..8084caf8ab 100644 --- a/packages/modules/package.js +++ b/packages/modules/package.js @@ -1,6 +1,6 @@ Package.describe({ name: "modules", - version: "0.14.0-rc182.7", + version: "0.14.0-rc182.8", summary: "CommonJS module system", documentation: "README.md" }); diff --git a/packages/mongo/package.js b/packages/mongo/package.js index ae2c7641f4..097273ad05 100644 --- a/packages/mongo/package.js +++ b/packages/mongo/package.js @@ -9,7 +9,7 @@ Package.describe({ summary: "Adaptor for using MongoDB and Minimongo over DDP", - version: '1.7.0-rc182.7' + version: '1.7.0-rc182.8' }); Npm.depends({ diff --git a/packages/npm-mongo/package.js b/packages/npm-mongo/package.js index 4903b1174d..8122772d54 100644 --- a/packages/npm-mongo/package.js +++ b/packages/npm-mongo/package.js @@ -3,7 +3,7 @@ Package.describe({ summary: "Wrapper around the mongo npm package", - version: "3.2.0-rc182.7", + version: "3.2.0-rc182.8", documentation: null }); diff --git a/packages/standard-minifier-css/package.js b/packages/standard-minifier-css/package.js index b73067f33c..3147496600 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.5.4-rc182.7', + version: '1.5.4-rc182.8', summary: 'Standard css minifier used with Meteor apps by default.', documentation: 'README.md' }); diff --git a/packages/standard-minifier-js/package.js b/packages/standard-minifier-js/package.js index c95a244f56..5b4afa48c1 100644 --- a/packages/standard-minifier-js/package.js +++ b/packages/standard-minifier-js/package.js @@ -1,6 +1,6 @@ Package.describe({ name: 'standard-minifier-js', - version: '2.5.0-rc182.7', + version: '2.5.0-rc182.8', summary: 'Standard javascript minifiers used with Meteor apps by default.', documentation: 'README.md', }); diff --git a/packages/typescript/package.js b/packages/typescript/package.js index 1fb89b8ff6..b8418c3a7f 100644 --- a/packages/typescript/package.js +++ b/packages/typescript/package.js @@ -1,6 +1,6 @@ Package.describe({ name: "typescript", - version: "3.7.0-rc182.7", + version: "3.7.0-rc182.8", summary: "Compiler plugin that compiles TypeScript and ECMAScript in .ts and .tsx files", documentation: "README.md" }); diff --git a/packages/webapp/package.js b/packages/webapp/package.js index e0a413903b..a4ac9a8563 100644 --- a/packages/webapp/package.js +++ b/packages/webapp/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Serves a Meteor app over HTTP", - version: '1.7.5-rc182.7' + version: '1.7.5-rc182.8' }); Npm.depends({"basic-auth-connect": "1.0.0", diff --git a/scripts/admin/meteor-release-experimental.json b/scripts/admin/meteor-release-experimental.json index caa129486b..2936863839 100644 --- a/scripts/admin/meteor-release-experimental.json +++ b/scripts/admin/meteor-release-experimental.json @@ -1,6 +1,6 @@ { "track": "METEOR", - "version": "1.8.2-rc.7", + "version": "1.8.2-rc.8", "recommended": false, "official": false, "description": "Meteor" From 926cba9a77ed74a2746b9d6d80dcd6b25d75d281 Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Mon, 11 Nov 2019 19:35:16 -0500 Subject: [PATCH 281/327] Revert "Merge pull request #10771 from meteor/copy-directories-asynchronously" This reverts commit 77a9784929039be671d1835e74c9130891394bf9, reversing changes made to e0ddae2cc7bb38ee75c72a8479f5e3a46fc52bd4. --- tools/fs/files.ts | 14 --- tools/isobuild/builder.js | 14 +-- .../.meteor/.finished-upgraders | 18 --- .../.meteor/packages | 7 +- .../.meteor/release | 2 +- .../.meteor/versions | 108 +++++++++--------- .../.meteor/.finished-upgraders | 18 --- .../.meteor/packages | 7 +- .../.meteor/release | 2 +- .../.meteor/versions | 108 +++++++++--------- tools/tests/static-html.js | 3 +- 11 files changed, 117 insertions(+), 184 deletions(-) delete mode 100644 tools/tests/apps/compiler-plugin-static-html-error/.meteor/.finished-upgraders delete mode 100644 tools/tests/apps/compiler-plugin-static-html/.meteor/.finished-upgraders diff --git a/tools/fs/files.ts b/tools/fs/files.ts index e27b3cf54a..24d57da570 100644 --- a/tools/fs/files.ts +++ b/tools/fs/files.ts @@ -1751,20 +1751,6 @@ export const unlink = wrapDestructiveFsFunc("unlink", fs.unlinkSync); export const write = wrapFsFunc("write", fs.writeSync, []); export const writeFile = wrapDestructiveFsFunc("writeFile", fs.writeFileSync); -// Asynchronous versions of some of the above functions. -export const promises = { - writeFile: wrapDestructiveFsFunc( - "promises.writeFile", - // TODO This will be easier with the fs.promises namespace (available - // in Node.js 12, in Meteor 1.9+). - (path, data, options) => new Promise((resolve, reject) => { - fs.writeFile(path, data, options, error => { - error ? reject(error) : resolve(); - }); - }), - ), -}; - type StatListener = ( current: Stats, previous: Stats, diff --git a/tools/isobuild/builder.js b/tools/isobuild/builder.js index 926e8e1e91..04a23919ec 100644 --- a/tools/isobuild/builder.js +++ b/tools/isobuild/builder.js @@ -545,9 +545,9 @@ Previous builder: ${previousBuilder.outputPath}, this builder: ${outputPath}` ); } - // Call this._copyDirectoryAsync rather than this.copyDirectory so the + // Call this._copyDirectory rather than this.copyDirectory so that the // subBuilder hacks from Builder#enter won't apply a second time. - return this._copyDirectoryAsync(options).await(); + return this._copyDirectory(options); } _ensureAllNonPackageDirectories(absFromDir, relToDir) { @@ -598,10 +598,10 @@ Previous builder: ${previousBuilder.outputPath}, this builder: ${outputPath}` copyDirectory(options) { // TODO(benjamn) Remove this wrapper when Builder#enter is no longer // implemented using ridiculous hacks. - return this._copyDirectoryAsync(options).await(); + return this._copyDirectory(options); } - _copyDirectoryAsync({ + _copyDirectory({ from, to, ignore, specificFiles, @@ -763,7 +763,7 @@ Previous builder: ${previousBuilder.outputPath}, this builder: ${outputPath}` if (this.previousWrittenHashes[thisRelTo] !== hash) { const content = optimisticReadFile(thisAbsFrom); - writePromises.push(files.promises.writeFile( + files.writeFile( files.pathResolve(this.buildPath, thisRelTo), // The reason we call files.writeFile here instead of // files.copyFile is so that we can read the file using @@ -776,7 +776,7 @@ Previous builder: ${previousBuilder.outputPath}, this builder: ${outputPath}` // this function is used by 'meteor create' which is copying from // the read-only tools tree into a writable app." { mode: (fileStatus.mode & 0o100) ? 0o777 : 0o666 }, - )); + ); } this.writtenHashes[thisRelTo] = hash; @@ -785,9 +785,7 @@ Previous builder: ${previousBuilder.outputPath}, this builder: ${outputPath}` }); }; - const writePromises = []; walk(rootDir, to); - return Promise.all(writePromises); } // Returns a new Builder-compatible object that works just like a diff --git a/tools/tests/apps/compiler-plugin-static-html-error/.meteor/.finished-upgraders b/tools/tests/apps/compiler-plugin-static-html-error/.meteor/.finished-upgraders deleted file mode 100644 index 4538749ab8..0000000000 --- a/tools/tests/apps/compiler-plugin-static-html-error/.meteor/.finished-upgraders +++ /dev/null @@ -1,18 +0,0 @@ -# This file contains information which helps Meteor properly upgrade your -# app when you run 'meteor update'. You should check it into version control -# with your project. - -notices-for-0.9.0 -notices-for-0.9.1 -0.9.4-platform-file -notices-for-facebook-graph-api-2 -1.2.0-standard-minifiers-package -1.2.0-meteor-platform-split -1.2.0-cordova-changes -1.2.0-breaking-changes -1.3.0-split-minifiers-package -1.4.0-remove-old-dev-bundle-link -1.4.1-add-shell-server-package -1.4.3-split-account-service-packages -1.5-add-dynamic-import-package -1.7-split-underscore-from-meteor-base diff --git a/tools/tests/apps/compiler-plugin-static-html-error/.meteor/packages b/tools/tests/apps/compiler-plugin-static-html-error/.meteor/packages index 52841ee183..90bb03902f 100644 --- a/tools/tests/apps/compiler-plugin-static-html-error/.meteor/packages +++ b/tools/tests/apps/compiler-plugin-static-html-error/.meteor/packages @@ -2,10 +2,5 @@ # # 'meteor add' and 'meteor remove' will edit this file for you, # but you can also edit it by hand. -meteor-base@1.4.0 +meteor-base static-html -standard-minifier-css -standard-minifier-js -shell-server -dynamic-import -underscore diff --git a/tools/tests/apps/compiler-plugin-static-html-error/.meteor/release b/tools/tests/apps/compiler-plugin-static-html-error/.meteor/release index 97064e1993..621e94f0ec 100644 --- a/tools/tests/apps/compiler-plugin-static-html-error/.meteor/release +++ b/tools/tests/apps/compiler-plugin-static-html-error/.meteor/release @@ -1 +1 @@ -METEOR@1.8.1 +none diff --git a/tools/tests/apps/compiler-plugin-static-html-error/.meteor/versions b/tools/tests/apps/compiler-plugin-static-html-error/.meteor/versions index 2112029aa3..8e4831fde0 100644 --- a/tools/tests/apps/compiler-plugin-static-html-error/.meteor/versions +++ b/tools/tests/apps/compiler-plugin-static-html-error/.meteor/versions @@ -1,55 +1,53 @@ -autoupdate@1.6.0 -babel-compiler@7.3.4 -babel-runtime@1.3.0 -base64@1.0.12 -blaze-tools@1.0.10 -boilerplate-generator@1.6.0 -caching-compiler@1.2.1 -caching-html-compiler@1.1.3 -callback-hook@1.1.0 -check@1.3.1 -ddp@1.4.0 -ddp-client@2.3.3 -ddp-common@1.4.0 -ddp-server@2.3.0 -deps@1.0.12 -diff-sequence@1.1.1 -dynamic-import@0.5.1 -ecmascript@0.12.7 -ecmascript-runtime@0.7.0 -ecmascript-runtime-client@0.8.0 -ecmascript-runtime-server@0.7.1 -ejson@1.1.0 -es5-shim@4.8.0 -fetch@0.1.1 -hot-code-push@1.0.4 -html-tools@1.0.11 -htmljs@1.0.11 -id-map@1.1.0 -inter-process-messaging@0.1.0 -livedata@1.0.18 -logging@1.1.20 -meteor@1.9.3 -meteor-base@1.4.0 -minifier-css@1.4.2 -minifier-js@2.4.1 -modern-browsers@0.1.4 -modules@0.13.0 -modules-runtime@0.10.3 -mongo-id@1.0.7 -promise@0.11.2 -random@1.1.0 -reload@1.3.0 -retry@1.1.0 -routepolicy@1.1.0 -shell-server@0.4.0 -socket-stream-client@0.2.2 -spacebars-compiler@1.1.3 -standard-minifier-css@1.5.3 -standard-minifier-js@2.4.1 -static-html@1.2.2 -templating-tools@1.1.2 -tracker@1.2.0 -underscore@1.0.10 -webapp@1.7.4 -webapp-hashing@1.0.9 +autoupdate@1.2.2-plugins.0 +babel-compiler@5.8.3-plugins.0_5 +babel-runtime@0.1.2 +base64@1.0.4-plugins.0 +binary-heap@1.0.4-plugins.0 +blaze@2.1.3-plugins.0 +blaze-tools@1.0.4-plugins.0 +boilerplate-generator@1.0.4-plugins.0 +caching-compiler@1.0.0-plugins.1 +caching-html-compiler@1.0.0 +callback-hook@1.0.4-plugins.0 +check@1.0.6-plugins.0 +ddp@1.2.0-plugins.0 +ddp-client@1.2.0-plugins.0 +ddp-common@1.2.0-plugins.0 +ddp-server@1.2.0-plugins.1 +deps@1.0.8-plugins.0 +diff-sequence@1.0.0-plugins.0 +ecmascript@0.1.3-plugins.1 +ejson@1.0.7-plugins.0 +geojson-utils@1.0.4-plugins.0 +html-tools@1.0.5-plugins.0 +htmljs@1.0.5-plugins.0 +http@1.1.1-plugins.0 +id-map@1.0.4-plugins.0 +jquery@1.11.3-plugins.0_3 +json@1.0.4-plugins.0 +logging@1.0.8-plugins.0 +meteor@1.1.7-plugins.1 +minifiers@1.1.6-plugins.0 +minimongo@1.0.9-plugins.0 +mongo@1.1.1-plugins.0 +mongo-id@1.0.0-plugins.0 +npm-mongo@1.4.32-plugins.0_1 +observe-sequence@1.0.7-plugins.0 +ordered-dict@1.0.4-plugins.0 +promise@0.4.2-plugins.0 +random@1.0.4-plugins.0 +reactive-var@1.0.6-plugins.0 +reload@1.1.4-plugins.0 +retry@1.0.4-plugins.0 +routepolicy@1.0.6-plugins.0 +spacebars@1.0.7-plugins.0 +spacebars-compiler@1.0.7-plugins.1 +static-html@1.0.12 +templating@1.1.2-plugins.1 +templating-tools@0.0.1 +tracker@1.0.8-plugins.0 +ui@1.0.7-plugins.0 +underscore@1.0.4-plugins.0 +url@1.0.5-plugins.0 +webapp@1.2.1-plugins.0 +webapp-hashing@1.0.4-plugins.0 diff --git a/tools/tests/apps/compiler-plugin-static-html/.meteor/.finished-upgraders b/tools/tests/apps/compiler-plugin-static-html/.meteor/.finished-upgraders deleted file mode 100644 index 4538749ab8..0000000000 --- a/tools/tests/apps/compiler-plugin-static-html/.meteor/.finished-upgraders +++ /dev/null @@ -1,18 +0,0 @@ -# This file contains information which helps Meteor properly upgrade your -# app when you run 'meteor update'. You should check it into version control -# with your project. - -notices-for-0.9.0 -notices-for-0.9.1 -0.9.4-platform-file -notices-for-facebook-graph-api-2 -1.2.0-standard-minifiers-package -1.2.0-meteor-platform-split -1.2.0-cordova-changes -1.2.0-breaking-changes -1.3.0-split-minifiers-package -1.4.0-remove-old-dev-bundle-link -1.4.1-add-shell-server-package -1.4.3-split-account-service-packages -1.5-add-dynamic-import-package -1.7-split-underscore-from-meteor-base diff --git a/tools/tests/apps/compiler-plugin-static-html/.meteor/packages b/tools/tests/apps/compiler-plugin-static-html/.meteor/packages index 52841ee183..90bb03902f 100644 --- a/tools/tests/apps/compiler-plugin-static-html/.meteor/packages +++ b/tools/tests/apps/compiler-plugin-static-html/.meteor/packages @@ -2,10 +2,5 @@ # # 'meteor add' and 'meteor remove' will edit this file for you, # but you can also edit it by hand. -meteor-base@1.4.0 +meteor-base static-html -standard-minifier-css -standard-minifier-js -shell-server -dynamic-import -underscore diff --git a/tools/tests/apps/compiler-plugin-static-html/.meteor/release b/tools/tests/apps/compiler-plugin-static-html/.meteor/release index 97064e1993..621e94f0ec 100644 --- a/tools/tests/apps/compiler-plugin-static-html/.meteor/release +++ b/tools/tests/apps/compiler-plugin-static-html/.meteor/release @@ -1 +1 @@ -METEOR@1.8.1 +none diff --git a/tools/tests/apps/compiler-plugin-static-html/.meteor/versions b/tools/tests/apps/compiler-plugin-static-html/.meteor/versions index 2112029aa3..8e4831fde0 100644 --- a/tools/tests/apps/compiler-plugin-static-html/.meteor/versions +++ b/tools/tests/apps/compiler-plugin-static-html/.meteor/versions @@ -1,55 +1,53 @@ -autoupdate@1.6.0 -babel-compiler@7.3.4 -babel-runtime@1.3.0 -base64@1.0.12 -blaze-tools@1.0.10 -boilerplate-generator@1.6.0 -caching-compiler@1.2.1 -caching-html-compiler@1.1.3 -callback-hook@1.1.0 -check@1.3.1 -ddp@1.4.0 -ddp-client@2.3.3 -ddp-common@1.4.0 -ddp-server@2.3.0 -deps@1.0.12 -diff-sequence@1.1.1 -dynamic-import@0.5.1 -ecmascript@0.12.7 -ecmascript-runtime@0.7.0 -ecmascript-runtime-client@0.8.0 -ecmascript-runtime-server@0.7.1 -ejson@1.1.0 -es5-shim@4.8.0 -fetch@0.1.1 -hot-code-push@1.0.4 -html-tools@1.0.11 -htmljs@1.0.11 -id-map@1.1.0 -inter-process-messaging@0.1.0 -livedata@1.0.18 -logging@1.1.20 -meteor@1.9.3 -meteor-base@1.4.0 -minifier-css@1.4.2 -minifier-js@2.4.1 -modern-browsers@0.1.4 -modules@0.13.0 -modules-runtime@0.10.3 -mongo-id@1.0.7 -promise@0.11.2 -random@1.1.0 -reload@1.3.0 -retry@1.1.0 -routepolicy@1.1.0 -shell-server@0.4.0 -socket-stream-client@0.2.2 -spacebars-compiler@1.1.3 -standard-minifier-css@1.5.3 -standard-minifier-js@2.4.1 -static-html@1.2.2 -templating-tools@1.1.2 -tracker@1.2.0 -underscore@1.0.10 -webapp@1.7.4 -webapp-hashing@1.0.9 +autoupdate@1.2.2-plugins.0 +babel-compiler@5.8.3-plugins.0_5 +babel-runtime@0.1.2 +base64@1.0.4-plugins.0 +binary-heap@1.0.4-plugins.0 +blaze@2.1.3-plugins.0 +blaze-tools@1.0.4-plugins.0 +boilerplate-generator@1.0.4-plugins.0 +caching-compiler@1.0.0-plugins.1 +caching-html-compiler@1.0.0 +callback-hook@1.0.4-plugins.0 +check@1.0.6-plugins.0 +ddp@1.2.0-plugins.0 +ddp-client@1.2.0-plugins.0 +ddp-common@1.2.0-plugins.0 +ddp-server@1.2.0-plugins.1 +deps@1.0.8-plugins.0 +diff-sequence@1.0.0-plugins.0 +ecmascript@0.1.3-plugins.1 +ejson@1.0.7-plugins.0 +geojson-utils@1.0.4-plugins.0 +html-tools@1.0.5-plugins.0 +htmljs@1.0.5-plugins.0 +http@1.1.1-plugins.0 +id-map@1.0.4-plugins.0 +jquery@1.11.3-plugins.0_3 +json@1.0.4-plugins.0 +logging@1.0.8-plugins.0 +meteor@1.1.7-plugins.1 +minifiers@1.1.6-plugins.0 +minimongo@1.0.9-plugins.0 +mongo@1.1.1-plugins.0 +mongo-id@1.0.0-plugins.0 +npm-mongo@1.4.32-plugins.0_1 +observe-sequence@1.0.7-plugins.0 +ordered-dict@1.0.4-plugins.0 +promise@0.4.2-plugins.0 +random@1.0.4-plugins.0 +reactive-var@1.0.6-plugins.0 +reload@1.1.4-plugins.0 +retry@1.0.4-plugins.0 +routepolicy@1.0.6-plugins.0 +spacebars@1.0.7-plugins.0 +spacebars-compiler@1.0.7-plugins.1 +static-html@1.0.12 +templating@1.1.2-plugins.1 +templating-tools@0.0.1 +tracker@1.0.8-plugins.0 +ui@1.0.7-plugins.0 +underscore@1.0.4-plugins.0 +url@1.0.5-plugins.0 +webapp@1.2.1-plugins.0 +webapp-hashing@1.0.4-plugins.0 diff --git a/tools/tests/static-html.js b/tools/tests/static-html.js index 5eb89b3637..870f9b67e3 100644 --- a/tools/tests/static-html.js +++ b/tools/tests/static-html.js @@ -54,8 +54,7 @@ selftest.define("static-html - throws error", () => { s.cd('myapp'); const run = startRun(s); - run.match("Attributes on not supported"); - run.waitSecs(30); + run.matchBeforeExit("Attributes on not supported"); run.stop(); }); From 41868fa16586d27a59eac07ec00578785421570a Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Mon, 11 Nov 2019 18:09:55 -0500 Subject: [PATCH 282/327] Attempt to make static-html self-tests less flaky. Salvaged from PR #10771, which I had to revert because it caused EMFILE (too many open files) errors on Windows. --- .../.meteor/.finished-upgraders | 18 +++ .../.meteor/packages | 7 +- .../.meteor/release | 2 +- .../.meteor/versions | 108 +++++++++--------- .../.meteor/.finished-upgraders | 18 +++ .../.meteor/packages | 7 +- .../.meteor/release | 2 +- .../.meteor/versions | 108 +++++++++--------- tools/tests/static-html.js | 3 +- 9 files changed, 162 insertions(+), 111 deletions(-) create mode 100644 tools/tests/apps/compiler-plugin-static-html-error/.meteor/.finished-upgraders create mode 100644 tools/tests/apps/compiler-plugin-static-html/.meteor/.finished-upgraders diff --git a/tools/tests/apps/compiler-plugin-static-html-error/.meteor/.finished-upgraders b/tools/tests/apps/compiler-plugin-static-html-error/.meteor/.finished-upgraders new file mode 100644 index 0000000000..4538749ab8 --- /dev/null +++ b/tools/tests/apps/compiler-plugin-static-html-error/.meteor/.finished-upgraders @@ -0,0 +1,18 @@ +# This file contains information which helps Meteor properly upgrade your +# app when you run 'meteor update'. You should check it into version control +# with your project. + +notices-for-0.9.0 +notices-for-0.9.1 +0.9.4-platform-file +notices-for-facebook-graph-api-2 +1.2.0-standard-minifiers-package +1.2.0-meteor-platform-split +1.2.0-cordova-changes +1.2.0-breaking-changes +1.3.0-split-minifiers-package +1.4.0-remove-old-dev-bundle-link +1.4.1-add-shell-server-package +1.4.3-split-account-service-packages +1.5-add-dynamic-import-package +1.7-split-underscore-from-meteor-base diff --git a/tools/tests/apps/compiler-plugin-static-html-error/.meteor/packages b/tools/tests/apps/compiler-plugin-static-html-error/.meteor/packages index 90bb03902f..52841ee183 100644 --- a/tools/tests/apps/compiler-plugin-static-html-error/.meteor/packages +++ b/tools/tests/apps/compiler-plugin-static-html-error/.meteor/packages @@ -2,5 +2,10 @@ # # 'meteor add' and 'meteor remove' will edit this file for you, # but you can also edit it by hand. -meteor-base +meteor-base@1.4.0 static-html +standard-minifier-css +standard-minifier-js +shell-server +dynamic-import +underscore diff --git a/tools/tests/apps/compiler-plugin-static-html-error/.meteor/release b/tools/tests/apps/compiler-plugin-static-html-error/.meteor/release index 621e94f0ec..97064e1993 100644 --- a/tools/tests/apps/compiler-plugin-static-html-error/.meteor/release +++ b/tools/tests/apps/compiler-plugin-static-html-error/.meteor/release @@ -1 +1 @@ -none +METEOR@1.8.1 diff --git a/tools/tests/apps/compiler-plugin-static-html-error/.meteor/versions b/tools/tests/apps/compiler-plugin-static-html-error/.meteor/versions index 8e4831fde0..2112029aa3 100644 --- a/tools/tests/apps/compiler-plugin-static-html-error/.meteor/versions +++ b/tools/tests/apps/compiler-plugin-static-html-error/.meteor/versions @@ -1,53 +1,55 @@ -autoupdate@1.2.2-plugins.0 -babel-compiler@5.8.3-plugins.0_5 -babel-runtime@0.1.2 -base64@1.0.4-plugins.0 -binary-heap@1.0.4-plugins.0 -blaze@2.1.3-plugins.0 -blaze-tools@1.0.4-plugins.0 -boilerplate-generator@1.0.4-plugins.0 -caching-compiler@1.0.0-plugins.1 -caching-html-compiler@1.0.0 -callback-hook@1.0.4-plugins.0 -check@1.0.6-plugins.0 -ddp@1.2.0-plugins.0 -ddp-client@1.2.0-plugins.0 -ddp-common@1.2.0-plugins.0 -ddp-server@1.2.0-plugins.1 -deps@1.0.8-plugins.0 -diff-sequence@1.0.0-plugins.0 -ecmascript@0.1.3-plugins.1 -ejson@1.0.7-plugins.0 -geojson-utils@1.0.4-plugins.0 -html-tools@1.0.5-plugins.0 -htmljs@1.0.5-plugins.0 -http@1.1.1-plugins.0 -id-map@1.0.4-plugins.0 -jquery@1.11.3-plugins.0_3 -json@1.0.4-plugins.0 -logging@1.0.8-plugins.0 -meteor@1.1.7-plugins.1 -minifiers@1.1.6-plugins.0 -minimongo@1.0.9-plugins.0 -mongo@1.1.1-plugins.0 -mongo-id@1.0.0-plugins.0 -npm-mongo@1.4.32-plugins.0_1 -observe-sequence@1.0.7-plugins.0 -ordered-dict@1.0.4-plugins.0 -promise@0.4.2-plugins.0 -random@1.0.4-plugins.0 -reactive-var@1.0.6-plugins.0 -reload@1.1.4-plugins.0 -retry@1.0.4-plugins.0 -routepolicy@1.0.6-plugins.0 -spacebars@1.0.7-plugins.0 -spacebars-compiler@1.0.7-plugins.1 -static-html@1.0.12 -templating@1.1.2-plugins.1 -templating-tools@0.0.1 -tracker@1.0.8-plugins.0 -ui@1.0.7-plugins.0 -underscore@1.0.4-plugins.0 -url@1.0.5-plugins.0 -webapp@1.2.1-plugins.0 -webapp-hashing@1.0.4-plugins.0 +autoupdate@1.6.0 +babel-compiler@7.3.4 +babel-runtime@1.3.0 +base64@1.0.12 +blaze-tools@1.0.10 +boilerplate-generator@1.6.0 +caching-compiler@1.2.1 +caching-html-compiler@1.1.3 +callback-hook@1.1.0 +check@1.3.1 +ddp@1.4.0 +ddp-client@2.3.3 +ddp-common@1.4.0 +ddp-server@2.3.0 +deps@1.0.12 +diff-sequence@1.1.1 +dynamic-import@0.5.1 +ecmascript@0.12.7 +ecmascript-runtime@0.7.0 +ecmascript-runtime-client@0.8.0 +ecmascript-runtime-server@0.7.1 +ejson@1.1.0 +es5-shim@4.8.0 +fetch@0.1.1 +hot-code-push@1.0.4 +html-tools@1.0.11 +htmljs@1.0.11 +id-map@1.1.0 +inter-process-messaging@0.1.0 +livedata@1.0.18 +logging@1.1.20 +meteor@1.9.3 +meteor-base@1.4.0 +minifier-css@1.4.2 +minifier-js@2.4.1 +modern-browsers@0.1.4 +modules@0.13.0 +modules-runtime@0.10.3 +mongo-id@1.0.7 +promise@0.11.2 +random@1.1.0 +reload@1.3.0 +retry@1.1.0 +routepolicy@1.1.0 +shell-server@0.4.0 +socket-stream-client@0.2.2 +spacebars-compiler@1.1.3 +standard-minifier-css@1.5.3 +standard-minifier-js@2.4.1 +static-html@1.2.2 +templating-tools@1.1.2 +tracker@1.2.0 +underscore@1.0.10 +webapp@1.7.4 +webapp-hashing@1.0.9 diff --git a/tools/tests/apps/compiler-plugin-static-html/.meteor/.finished-upgraders b/tools/tests/apps/compiler-plugin-static-html/.meteor/.finished-upgraders new file mode 100644 index 0000000000..4538749ab8 --- /dev/null +++ b/tools/tests/apps/compiler-plugin-static-html/.meteor/.finished-upgraders @@ -0,0 +1,18 @@ +# This file contains information which helps Meteor properly upgrade your +# app when you run 'meteor update'. You should check it into version control +# with your project. + +notices-for-0.9.0 +notices-for-0.9.1 +0.9.4-platform-file +notices-for-facebook-graph-api-2 +1.2.0-standard-minifiers-package +1.2.0-meteor-platform-split +1.2.0-cordova-changes +1.2.0-breaking-changes +1.3.0-split-minifiers-package +1.4.0-remove-old-dev-bundle-link +1.4.1-add-shell-server-package +1.4.3-split-account-service-packages +1.5-add-dynamic-import-package +1.7-split-underscore-from-meteor-base diff --git a/tools/tests/apps/compiler-plugin-static-html/.meteor/packages b/tools/tests/apps/compiler-plugin-static-html/.meteor/packages index 90bb03902f..52841ee183 100644 --- a/tools/tests/apps/compiler-plugin-static-html/.meteor/packages +++ b/tools/tests/apps/compiler-plugin-static-html/.meteor/packages @@ -2,5 +2,10 @@ # # 'meteor add' and 'meteor remove' will edit this file for you, # but you can also edit it by hand. -meteor-base +meteor-base@1.4.0 static-html +standard-minifier-css +standard-minifier-js +shell-server +dynamic-import +underscore diff --git a/tools/tests/apps/compiler-plugin-static-html/.meteor/release b/tools/tests/apps/compiler-plugin-static-html/.meteor/release index 621e94f0ec..97064e1993 100644 --- a/tools/tests/apps/compiler-plugin-static-html/.meteor/release +++ b/tools/tests/apps/compiler-plugin-static-html/.meteor/release @@ -1 +1 @@ -none +METEOR@1.8.1 diff --git a/tools/tests/apps/compiler-plugin-static-html/.meteor/versions b/tools/tests/apps/compiler-plugin-static-html/.meteor/versions index 8e4831fde0..2112029aa3 100644 --- a/tools/tests/apps/compiler-plugin-static-html/.meteor/versions +++ b/tools/tests/apps/compiler-plugin-static-html/.meteor/versions @@ -1,53 +1,55 @@ -autoupdate@1.2.2-plugins.0 -babel-compiler@5.8.3-plugins.0_5 -babel-runtime@0.1.2 -base64@1.0.4-plugins.0 -binary-heap@1.0.4-plugins.0 -blaze@2.1.3-plugins.0 -blaze-tools@1.0.4-plugins.0 -boilerplate-generator@1.0.4-plugins.0 -caching-compiler@1.0.0-plugins.1 -caching-html-compiler@1.0.0 -callback-hook@1.0.4-plugins.0 -check@1.0.6-plugins.0 -ddp@1.2.0-plugins.0 -ddp-client@1.2.0-plugins.0 -ddp-common@1.2.0-plugins.0 -ddp-server@1.2.0-plugins.1 -deps@1.0.8-plugins.0 -diff-sequence@1.0.0-plugins.0 -ecmascript@0.1.3-plugins.1 -ejson@1.0.7-plugins.0 -geojson-utils@1.0.4-plugins.0 -html-tools@1.0.5-plugins.0 -htmljs@1.0.5-plugins.0 -http@1.1.1-plugins.0 -id-map@1.0.4-plugins.0 -jquery@1.11.3-plugins.0_3 -json@1.0.4-plugins.0 -logging@1.0.8-plugins.0 -meteor@1.1.7-plugins.1 -minifiers@1.1.6-plugins.0 -minimongo@1.0.9-plugins.0 -mongo@1.1.1-plugins.0 -mongo-id@1.0.0-plugins.0 -npm-mongo@1.4.32-plugins.0_1 -observe-sequence@1.0.7-plugins.0 -ordered-dict@1.0.4-plugins.0 -promise@0.4.2-plugins.0 -random@1.0.4-plugins.0 -reactive-var@1.0.6-plugins.0 -reload@1.1.4-plugins.0 -retry@1.0.4-plugins.0 -routepolicy@1.0.6-plugins.0 -spacebars@1.0.7-plugins.0 -spacebars-compiler@1.0.7-plugins.1 -static-html@1.0.12 -templating@1.1.2-plugins.1 -templating-tools@0.0.1 -tracker@1.0.8-plugins.0 -ui@1.0.7-plugins.0 -underscore@1.0.4-plugins.0 -url@1.0.5-plugins.0 -webapp@1.2.1-plugins.0 -webapp-hashing@1.0.4-plugins.0 +autoupdate@1.6.0 +babel-compiler@7.3.4 +babel-runtime@1.3.0 +base64@1.0.12 +blaze-tools@1.0.10 +boilerplate-generator@1.6.0 +caching-compiler@1.2.1 +caching-html-compiler@1.1.3 +callback-hook@1.1.0 +check@1.3.1 +ddp@1.4.0 +ddp-client@2.3.3 +ddp-common@1.4.0 +ddp-server@2.3.0 +deps@1.0.12 +diff-sequence@1.1.1 +dynamic-import@0.5.1 +ecmascript@0.12.7 +ecmascript-runtime@0.7.0 +ecmascript-runtime-client@0.8.0 +ecmascript-runtime-server@0.7.1 +ejson@1.1.0 +es5-shim@4.8.0 +fetch@0.1.1 +hot-code-push@1.0.4 +html-tools@1.0.11 +htmljs@1.0.11 +id-map@1.1.0 +inter-process-messaging@0.1.0 +livedata@1.0.18 +logging@1.1.20 +meteor@1.9.3 +meteor-base@1.4.0 +minifier-css@1.4.2 +minifier-js@2.4.1 +modern-browsers@0.1.4 +modules@0.13.0 +modules-runtime@0.10.3 +mongo-id@1.0.7 +promise@0.11.2 +random@1.1.0 +reload@1.3.0 +retry@1.1.0 +routepolicy@1.1.0 +shell-server@0.4.0 +socket-stream-client@0.2.2 +spacebars-compiler@1.1.3 +standard-minifier-css@1.5.3 +standard-minifier-js@2.4.1 +static-html@1.2.2 +templating-tools@1.1.2 +tracker@1.2.0 +underscore@1.0.10 +webapp@1.7.4 +webapp-hashing@1.0.9 diff --git a/tools/tests/static-html.js b/tools/tests/static-html.js index 870f9b67e3..5eb89b3637 100644 --- a/tools/tests/static-html.js +++ b/tools/tests/static-html.js @@ -54,7 +54,8 @@ selftest.define("static-html - throws error", () => { s.cd('myapp'); const run = startRun(s); - run.matchBeforeExit("Attributes on not supported"); + run.match("Attributes on not supported"); + run.waitSecs(30); run.stop(); }); From c9904c3ed7bb51af066ab7047ccc2e69d9dce11f Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Mon, 11 Nov 2019 19:38:24 -0500 Subject: [PATCH 283/327] Bump package versions for 1.8.2-rc.9 release. Note that publishing 1.8.2-rc.8 failed on all platforms due to EMFILE (too many open files) errors, which necessitated reverting PR #10771. --- packages/accounts-base/package.js | 2 +- packages/babel-compiler/package.js | 2 +- packages/babel-runtime/package.js | 2 +- packages/callback-hook/package.js | 2 +- packages/context/package.js | 2 +- packages/ecmascript-runtime-client/package.js | 2 +- packages/ecmascript-runtime-server/package.js | 2 +- packages/ecmascript/package.js | 2 +- packages/meteor-tool/package.js | 2 +- packages/minifier-css/package.js | 2 +- packages/minifier-js/package.js | 2 +- packages/modules-runtime/package.js | 2 +- packages/modules/package.js | 2 +- packages/mongo/package.js | 2 +- packages/npm-mongo/package.js | 2 +- packages/standard-minifier-css/package.js | 2 +- packages/standard-minifier-js/package.js | 2 +- packages/typescript/package.js | 2 +- packages/webapp/package.js | 2 +- scripts/admin/meteor-release-experimental.json | 2 +- 20 files changed, 20 insertions(+), 20 deletions(-) diff --git a/packages/accounts-base/package.js b/packages/accounts-base/package.js index 0043d33203..89a4155727 100644 --- a/packages/accounts-base/package.js +++ b/packages/accounts-base/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "A user account system", - version: "1.4.5-rc182.8", + version: "1.4.5-rc182.9", }); Package.onUse(api => { diff --git a/packages/babel-compiler/package.js b/packages/babel-compiler/package.js index cd157ebd63..abc8390146 100644 --- a/packages/babel-compiler/package.js +++ b/packages/babel-compiler/package.js @@ -6,7 +6,7 @@ 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.4.0-rc182.8' + version: '7.4.0-rc182.9' }); Npm.depends({ diff --git a/packages/babel-runtime/package.js b/packages/babel-runtime/package.js index fdcb05e100..1a10235d69 100644 --- a/packages/babel-runtime/package.js +++ b/packages/babel-runtime/package.js @@ -1,7 +1,7 @@ Package.describe({ name: "babel-runtime", summary: "Runtime support for output of Babel transpiler", - version: '1.4.0-rc182.8', + version: '1.4.0-rc182.9', documentation: 'README.md' }); diff --git a/packages/callback-hook/package.js b/packages/callback-hook/package.js index 02573743f7..535a6d819f 100644 --- a/packages/callback-hook/package.js +++ b/packages/callback-hook/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Register callbacks on a hook", - version: '1.2.0-rc182.8' + version: '1.2.0-rc182.9' }); Package.onUse(function (api) { diff --git a/packages/context/package.js b/packages/context/package.js index cdd1b2e37b..be399f7e64 100644 --- a/packages/context/package.js +++ b/packages/context/package.js @@ -1,6 +1,6 @@ Package.describe({ name: "context", - version: "0.4.0-rc182.8", + version: "0.4.0-rc182.9", summary: "Manage contextual information without passing objects around", documentation: "README.md" }); diff --git a/packages/ecmascript-runtime-client/package.js b/packages/ecmascript-runtime-client/package.js index 8e513e5f9e..17272fa007 100644 --- a/packages/ecmascript-runtime-client/package.js +++ b/packages/ecmascript-runtime-client/package.js @@ -1,6 +1,6 @@ Package.describe({ name: "ecmascript-runtime-client", - version: "0.9.0-rc182.8", + version: "0.9.0-rc182.9", summary: "Polyfills for new ECMAScript 2015 APIs like Map and Set", git: "https://github.com/meteor/meteor/tree/devel/packages/ecmascript-runtime-client", documentation: "README.md" diff --git a/packages/ecmascript-runtime-server/package.js b/packages/ecmascript-runtime-server/package.js index 95fc5b1c63..75ae0eb162 100644 --- a/packages/ecmascript-runtime-server/package.js +++ b/packages/ecmascript-runtime-server/package.js @@ -1,6 +1,6 @@ Package.describe({ name: "ecmascript-runtime-server", - version: "0.8.0-rc182.8", + version: "0.8.0-rc182.9", summary: "Polyfills for new ECMAScript 2015 APIs like Map and Set", git: "https://github.com/meteor/meteor/tree/devel/packages/ecmascript-runtime-client", documentation: "README.md" diff --git a/packages/ecmascript/package.js b/packages/ecmascript/package.js index 0f0e195dd2..953fc06137 100644 --- a/packages/ecmascript/package.js +++ b/packages/ecmascript/package.js @@ -1,6 +1,6 @@ Package.describe({ name: 'ecmascript', - version: '0.13.0-rc182.8', + version: '0.13.0-rc182.9', summary: 'Compiler plugin that supports ES2015+ in all .js files', documentation: 'README.md' }); diff --git a/packages/meteor-tool/package.js b/packages/meteor-tool/package.js index 72f2cc8bd8..defb469b6c 100644 --- a/packages/meteor-tool/package.js +++ b/packages/meteor-tool/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "The Meteor command-line tool", - version: '1.8.2-rc.8' + version: '1.8.2-rc.9' }); Package.includeTool(); diff --git a/packages/minifier-css/package.js b/packages/minifier-css/package.js index a45d31050a..18f8121449 100644 --- a/packages/minifier-css/package.js +++ b/packages/minifier-css/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: 'CSS minifier', - version: '1.4.3-rc182.8' + version: '1.4.3-rc182.9' }); Npm.depends({ diff --git a/packages/minifier-js/package.js b/packages/minifier-js/package.js index 3aa7cd6838..a3d5ad7aaa 100644 --- a/packages/minifier-js/package.js +++ b/packages/minifier-js/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "JavaScript minifier", - version: "2.5.0-rc182.8" + version: "2.5.0-rc182.9" }); Npm.depends({ diff --git a/packages/modules-runtime/package.js b/packages/modules-runtime/package.js index 67e9779034..bd5f903a87 100644 --- a/packages/modules-runtime/package.js +++ b/packages/modules-runtime/package.js @@ -1,6 +1,6 @@ Package.describe({ name: "modules-runtime", - version: "0.11.0-rc182.8", + version: "0.11.0-rc182.9", summary: "CommonJS module system", git: "https://github.com/benjamn/install", documentation: "README.md" diff --git a/packages/modules/package.js b/packages/modules/package.js index 8084caf8ab..65b0359d29 100644 --- a/packages/modules/package.js +++ b/packages/modules/package.js @@ -1,6 +1,6 @@ Package.describe({ name: "modules", - version: "0.14.0-rc182.8", + version: "0.14.0-rc182.9", summary: "CommonJS module system", documentation: "README.md" }); diff --git a/packages/mongo/package.js b/packages/mongo/package.js index 097273ad05..8d117950be 100644 --- a/packages/mongo/package.js +++ b/packages/mongo/package.js @@ -9,7 +9,7 @@ Package.describe({ summary: "Adaptor for using MongoDB and Minimongo over DDP", - version: '1.7.0-rc182.8' + version: '1.7.0-rc182.9' }); Npm.depends({ diff --git a/packages/npm-mongo/package.js b/packages/npm-mongo/package.js index 8122772d54..ddce4d4824 100644 --- a/packages/npm-mongo/package.js +++ b/packages/npm-mongo/package.js @@ -3,7 +3,7 @@ Package.describe({ summary: "Wrapper around the mongo npm package", - version: "3.2.0-rc182.8", + version: "3.2.0-rc182.9", documentation: null }); diff --git a/packages/standard-minifier-css/package.js b/packages/standard-minifier-css/package.js index 3147496600..7a3ce09835 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.5.4-rc182.8', + version: '1.5.4-rc182.9', summary: 'Standard css minifier used with Meteor apps by default.', documentation: 'README.md' }); diff --git a/packages/standard-minifier-js/package.js b/packages/standard-minifier-js/package.js index 5b4afa48c1..e4037cff53 100644 --- a/packages/standard-minifier-js/package.js +++ b/packages/standard-minifier-js/package.js @@ -1,6 +1,6 @@ Package.describe({ name: 'standard-minifier-js', - version: '2.5.0-rc182.8', + version: '2.5.0-rc182.9', summary: 'Standard javascript minifiers used with Meteor apps by default.', documentation: 'README.md', }); diff --git a/packages/typescript/package.js b/packages/typescript/package.js index b8418c3a7f..6f2d669f36 100644 --- a/packages/typescript/package.js +++ b/packages/typescript/package.js @@ -1,6 +1,6 @@ Package.describe({ name: "typescript", - version: "3.7.0-rc182.8", + version: "3.7.0-rc182.9", summary: "Compiler plugin that compiles TypeScript and ECMAScript in .ts and .tsx files", documentation: "README.md" }); diff --git a/packages/webapp/package.js b/packages/webapp/package.js index a4ac9a8563..e666db20f9 100644 --- a/packages/webapp/package.js +++ b/packages/webapp/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Serves a Meteor app over HTTP", - version: '1.7.5-rc182.8' + version: '1.7.5-rc182.9' }); Npm.depends({"basic-auth-connect": "1.0.0", diff --git a/scripts/admin/meteor-release-experimental.json b/scripts/admin/meteor-release-experimental.json index 2936863839..da83f77204 100644 --- a/scripts/admin/meteor-release-experimental.json +++ b/scripts/admin/meteor-release-experimental.json @@ -1,6 +1,6 @@ { "track": "METEOR", - "version": "1.8.2-rc.8", + "version": "1.8.2-rc.9", "recommended": false, "official": false, "description": "Meteor" From 1b9fec3f8de417d28e685c87bf047130fc86f3d4 Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Tue, 12 Nov 2019 12:52:25 -0500 Subject: [PATCH 284/327] Tolerate variable startup message order in static-html self-test. --- tools/tests/static-html.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tools/tests/static-html.js b/tools/tests/static-html.js index 5eb89b3637..c728f75e9d 100644 --- a/tools/tests/static-html.js +++ b/tools/tests/static-html.js @@ -15,7 +15,10 @@ function startRun(sandbox) { run.match("myapp"); run.match("proxy"); run.tellMongo(MONGO_LISTENING); - run.match("MongoDB"); + // Since the "=> Started MongoDB" message can appear after the + // "Attributes on are not supported" message, we should not + // enforce the opposite order here: + // run.match("MongoDB"); return run; }; From c4e05dfffe532122a2c35c326f31b34c5a43ea57 Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Tue, 12 Nov 2019 14:48:53 -0500 Subject: [PATCH 285/327] Rewrite files.rename on Windows to retry after 50ms intervals. Falling back to a full recursive copy was MUCH more expensive than waiting a short amount of time before retrying the rename. This aligns with the way graceful-fs handles EPERM and EACCES errors on Windows: https://www.npmjs.com/package/graceful-fs#improvements-over-fs-module --- tools/fs/files.ts | 49 +++++++++++++++++++++++++++++------------------ 1 file changed, 30 insertions(+), 19 deletions(-) diff --git a/tools/fs/files.ts b/tools/fs/files.ts index 24d57da570..5df5b6eb16 100644 --- a/tools/fs/files.ts +++ b/tools/fs/files.ts @@ -1694,29 +1694,40 @@ const wrappedRename = wrapDestructiveFsFunc("rename", fs.renameSync, [0, 1]); export const rename = isWindowsLikeFilesystem() ? function (from: string, to: string) { // Retries are necessary only on Windows, because the rename call can // fail with EBUSY, which means the file is in use. - let maxTries = 10; - let success = false; const osTo = convertToOSPath(to); + const startTimeMs = Date.now(); + const intervalMs = 50; + const timeLimitMs = 1000; - while (! success && maxTries-- > 0) { - try { - // Despite previous failures, the top-level destination directory - // may have been successfully created, so we must remove it to - // avoid moving the source file *into* the destination directory. - rimraf.sync(osTo); - wrappedRename(from, to); - success = true; - } catch (err) { - if (err.code !== 'EPERM' && err.code !== 'EACCES') { - throw err; + return new Promise((resolve, reject) => { + function attempt() { + try { + // Despite previous failures, the top-level destination directory + // may have been successfully created, so we must remove it to + // avoid moving the source file *into* the destination directory. + rimraf.sync(osTo); + wrappedRename(from, to); + resolve(); + } catch (err) { + if (err.code !== 'EPERM' && err.code !== 'EACCES') { + reject(err); + } else if (Date.now() - startTimeMs < timeLimitMs) { + setTimeout(attempt, intervalMs); + } else { + reject(err); + } } } - } - - if (! success) { - cp_r(from, to, { preserveSymlinks: true }); - rm_recursive(from); - } + attempt(); + }).catch(error => { + if (error.code === 'EPERM' || + error.code === 'EACCESS') { + cp_r(from, to, { preserveSymlinks: true }); + rm_recursive(from); + } else { + throw error; + } + }).await(); } : wrappedRename; // Warning: doesn't convert slashes in the second 'cache' arg From 8567390e7e24e08053dcb0df1975619daec560e6 Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Tue, 12 Nov 2019 16:29:36 -0500 Subject: [PATCH 286/327] Fix error stack trace parsing during Windows self-tests. --- tools/tool-testing/run.js | 33 ++++++++++++++++++++++++++++++--- tools/tool-testing/sandbox.js | 2 +- 2 files changed, 31 insertions(+), 4 deletions(-) diff --git a/tools/tool-testing/run.js b/tools/tool-testing/run.js index d457ffbd03..0f45f73cea 100644 --- a/tools/tool-testing/run.js +++ b/tools/tool-testing/run.js @@ -461,10 +461,37 @@ export default class Run { if (failure instanceof TestFailure) { const frames = parseStackParse(failure).outsideFiber; - const relpath = files.pathRelative(files.getCurrentToolsDir(), - frames[0].file); + const toolsDir = files.getCurrentToolsDir(); + let pathWithLineNumber; + frames.some(frame => { + // The parsed stack trace will typically include frame.file + // strings of the form "/tools/tests/whatever.js", which can be + // made absolute by joining them with toolsDir. If the resulting + // absPath exists, then we know we interpreted the frame.file + // correctly, and we can normalize away the leading '/' + // character to get a safe relative path. + const absPath = files.pathJoin(toolsDir, frame.file); + if (files.exists(absPath)) { + const relPath = files.pathRelative(toolsDir, absPath); + const parts = relPath.split("/"); + if (parts[0] === "tools" && + parts[1] === "tool-testing") { + // Ignore frames inside the /tools/tool-testing directory, + // like run.js and selftest.js. + return false; + } + pathWithLineNumber = `${relPath}:${frame.line}`; + return true; + } + // If frame.file was not joinable with toolsDir to obtain an + // absolute path that exists, show it to the user without trying + // to interpret what it means. + pathWithLineNumber = `${frame.file}:${frame.line}`; + return true; + }); + Console.rawError( - ` => ${failure.reason} at ${relpath}:${frames[0].line}\n`); + ` => ${failure.reason} at ${pathWithLineNumber}\n`); if (failure.reason === 'no-match' || failure.reason === 'junk-before' || failure.reason === 'match-timeout') { Console.arrowError(`Pattern: ${failure.details.pattern}`, 2); diff --git a/tools/tool-testing/sandbox.js b/tools/tool-testing/sandbox.js index d7b34ad820..88e753f84a 100644 --- a/tools/tool-testing/sandbox.js +++ b/tools/tool-testing/sandbox.js @@ -368,7 +368,7 @@ export default class Sandbox { // Allow user to set TOOL_NODE_FLAGS for self-test app. if (process.env.TOOL_NODE_FLAGS && ! process.env.SELF_TEST_TOOL_NODE_FLAGS) console.log('Consider setting SELF_TEST_TOOL_NODE_FLAGS to configure ' + - 'self-test test applicaion spawns'); + 'self-test test application spawns'); env.TOOL_NODE_FLAGS = process.env.SELF_TEST_TOOL_NODE_FLAGS || ''; return env; From d52c9cc82fd70d1e080aa14de5c85fe80d3e57be Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Tue, 12 Nov 2019 16:58:05 -0500 Subject: [PATCH 287/327] Avoid calling writeFileAtomically outside Fiber. --- tools/isobuild/import-scanner.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tools/isobuild/import-scanner.ts b/tools/isobuild/import-scanner.ts index 5fc67fd472..b4377f95dc 100644 --- a/tools/isobuild/import-scanner.ts +++ b/tools/isobuild/import-scanner.ts @@ -142,7 +142,9 @@ class DefaultHandlers { file.hash, this.bundleArch, ); - process.nextTick(writeFileAtomically, cacheFileName, code); + Promise.resolve().then( + () => writeFileAtomically(cacheFileName, code), + ); return code; } } else { From 52d4809aeb77cb636332297b0256a9bac1476858 Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Tue, 12 Nov 2019 17:03:13 -0500 Subject: [PATCH 288/327] Temporarily wrap files.rename on non-Windows platforms to validate safety. Now that files.rename uses Promise.prototype.await on Windows, it's important to be sure it never gets called outside of a Fiber. Though we don't run our full test suite on Windows, we can validate this expectation by wrapping files.rename on all platforms. This commit should be reverted once the validation is complete. --- tools/fs/files.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/tools/fs/files.ts b/tools/fs/files.ts index 5df5b6eb16..3fbc8ee1ec 100644 --- a/tools/fs/files.ts +++ b/tools/fs/files.ts @@ -35,7 +35,6 @@ import { convertToStandardLineEndings, convertToStandardPath, convertToWindowsPath, - isWindowsLikeFilesystem, pathBasename, pathDirname, pathJoin, @@ -1691,7 +1690,7 @@ export function copyFile(from: string, to: string, flags = 0) { } const wrappedRename = wrapDestructiveFsFunc("rename", fs.renameSync, [0, 1]); -export const rename = isWindowsLikeFilesystem() ? function (from: string, to: string) { +export function rename(from: string, to: string) { // Retries are necessary only on Windows, because the rename call can // fail with EBUSY, which means the file is in use. const osTo = convertToOSPath(to); @@ -1728,7 +1727,7 @@ export const rename = isWindowsLikeFilesystem() ? function (from: string, to: st throw error; } }).await(); -} : wrappedRename; +} // Warning: doesn't convert slashes in the second 'cache' arg export const realpath = From faeab6c7d49be7f4c6ecc6006937fd62edf9bcb8 Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Tue, 12 Nov 2019 17:22:33 -0500 Subject: [PATCH 289/327] Revert "Temporarily wrap files.rename on non-Windows platforms to validate safety." This reverts commit 52d4809aeb77cb636332297b0256a9bac1476858, as promised in the previous commit message. --- tools/fs/files.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tools/fs/files.ts b/tools/fs/files.ts index 3fbc8ee1ec..5df5b6eb16 100644 --- a/tools/fs/files.ts +++ b/tools/fs/files.ts @@ -35,6 +35,7 @@ import { convertToStandardLineEndings, convertToStandardPath, convertToWindowsPath, + isWindowsLikeFilesystem, pathBasename, pathDirname, pathJoin, @@ -1690,7 +1691,7 @@ export function copyFile(from: string, to: string, flags = 0) { } const wrappedRename = wrapDestructiveFsFunc("rename", fs.renameSync, [0, 1]); -export function rename(from: string, to: string) { +export const rename = isWindowsLikeFilesystem() ? function (from: string, to: string) { // Retries are necessary only on Windows, because the rename call can // fail with EBUSY, which means the file is in use. const osTo = convertToOSPath(to); @@ -1727,7 +1728,7 @@ export function rename(from: string, to: string) { throw error; } }).await(); -} +} : wrappedRename; // Warning: doesn't convert slashes in the second 'cache' arg export const realpath = From 44d0f1f408838b94fe0fd1a161506a231a7faa55 Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Tue, 12 Nov 2019 18:06:25 -0500 Subject: [PATCH 290/327] Bump package versions for 1.8.2-rc.10 release. --- packages/accounts-base/package.js | 2 +- packages/babel-compiler/package.js | 2 +- packages/babel-runtime/package.js | 2 +- packages/callback-hook/package.js | 2 +- packages/context/package.js | 2 +- packages/ecmascript-runtime-client/package.js | 2 +- packages/ecmascript-runtime-server/package.js | 2 +- packages/ecmascript/package.js | 2 +- packages/meteor-tool/package.js | 2 +- packages/minifier-css/package.js | 2 +- packages/minifier-js/package.js | 2 +- packages/modules-runtime/package.js | 2 +- packages/modules/package.js | 2 +- packages/mongo/package.js | 2 +- packages/npm-mongo/package.js | 2 +- packages/standard-minifier-css/package.js | 2 +- packages/standard-minifier-js/package.js | 2 +- packages/typescript/package.js | 2 +- packages/webapp/package.js | 2 +- scripts/admin/meteor-release-experimental.json | 2 +- 20 files changed, 20 insertions(+), 20 deletions(-) diff --git a/packages/accounts-base/package.js b/packages/accounts-base/package.js index 89a4155727..42cf86bc2c 100644 --- a/packages/accounts-base/package.js +++ b/packages/accounts-base/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "A user account system", - version: "1.4.5-rc182.9", + version: "1.4.5-rc182.10", }); Package.onUse(api => { diff --git a/packages/babel-compiler/package.js b/packages/babel-compiler/package.js index abc8390146..4d67a5be5d 100644 --- a/packages/babel-compiler/package.js +++ b/packages/babel-compiler/package.js @@ -6,7 +6,7 @@ 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.4.0-rc182.9' + version: '7.4.0-rc182.10' }); Npm.depends({ diff --git a/packages/babel-runtime/package.js b/packages/babel-runtime/package.js index 1a10235d69..8d98860b9a 100644 --- a/packages/babel-runtime/package.js +++ b/packages/babel-runtime/package.js @@ -1,7 +1,7 @@ Package.describe({ name: "babel-runtime", summary: "Runtime support for output of Babel transpiler", - version: '1.4.0-rc182.9', + version: '1.4.0-rc182.10', documentation: 'README.md' }); diff --git a/packages/callback-hook/package.js b/packages/callback-hook/package.js index 535a6d819f..582f4a8b9c 100644 --- a/packages/callback-hook/package.js +++ b/packages/callback-hook/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Register callbacks on a hook", - version: '1.2.0-rc182.9' + version: '1.2.0-rc182.10' }); Package.onUse(function (api) { diff --git a/packages/context/package.js b/packages/context/package.js index be399f7e64..114ea5de3e 100644 --- a/packages/context/package.js +++ b/packages/context/package.js @@ -1,6 +1,6 @@ Package.describe({ name: "context", - version: "0.4.0-rc182.9", + version: "0.4.0-rc182.10", summary: "Manage contextual information without passing objects around", documentation: "README.md" }); diff --git a/packages/ecmascript-runtime-client/package.js b/packages/ecmascript-runtime-client/package.js index 17272fa007..92814f7f57 100644 --- a/packages/ecmascript-runtime-client/package.js +++ b/packages/ecmascript-runtime-client/package.js @@ -1,6 +1,6 @@ Package.describe({ name: "ecmascript-runtime-client", - version: "0.9.0-rc182.9", + version: "0.9.0-rc182.10", summary: "Polyfills for new ECMAScript 2015 APIs like Map and Set", git: "https://github.com/meteor/meteor/tree/devel/packages/ecmascript-runtime-client", documentation: "README.md" diff --git a/packages/ecmascript-runtime-server/package.js b/packages/ecmascript-runtime-server/package.js index 75ae0eb162..b811c21ad6 100644 --- a/packages/ecmascript-runtime-server/package.js +++ b/packages/ecmascript-runtime-server/package.js @@ -1,6 +1,6 @@ Package.describe({ name: "ecmascript-runtime-server", - version: "0.8.0-rc182.9", + version: "0.8.0-rc182.10", summary: "Polyfills for new ECMAScript 2015 APIs like Map and Set", git: "https://github.com/meteor/meteor/tree/devel/packages/ecmascript-runtime-client", documentation: "README.md" diff --git a/packages/ecmascript/package.js b/packages/ecmascript/package.js index 953fc06137..cf2d78d070 100644 --- a/packages/ecmascript/package.js +++ b/packages/ecmascript/package.js @@ -1,6 +1,6 @@ Package.describe({ name: 'ecmascript', - version: '0.13.0-rc182.9', + version: '0.13.0-rc182.10', summary: 'Compiler plugin that supports ES2015+ in all .js files', documentation: 'README.md' }); diff --git a/packages/meteor-tool/package.js b/packages/meteor-tool/package.js index defb469b6c..6d3cd8660e 100644 --- a/packages/meteor-tool/package.js +++ b/packages/meteor-tool/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "The Meteor command-line tool", - version: '1.8.2-rc.9' + version: '1.8.2-rc.10' }); Package.includeTool(); diff --git a/packages/minifier-css/package.js b/packages/minifier-css/package.js index 18f8121449..3e463f64d2 100644 --- a/packages/minifier-css/package.js +++ b/packages/minifier-css/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: 'CSS minifier', - version: '1.4.3-rc182.9' + version: '1.4.3-rc182.10' }); Npm.depends({ diff --git a/packages/minifier-js/package.js b/packages/minifier-js/package.js index a3d5ad7aaa..445d22802f 100644 --- a/packages/minifier-js/package.js +++ b/packages/minifier-js/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "JavaScript minifier", - version: "2.5.0-rc182.9" + version: "2.5.0-rc182.10" }); Npm.depends({ diff --git a/packages/modules-runtime/package.js b/packages/modules-runtime/package.js index bd5f903a87..5210ac37af 100644 --- a/packages/modules-runtime/package.js +++ b/packages/modules-runtime/package.js @@ -1,6 +1,6 @@ Package.describe({ name: "modules-runtime", - version: "0.11.0-rc182.9", + version: "0.11.0-rc182.10", summary: "CommonJS module system", git: "https://github.com/benjamn/install", documentation: "README.md" diff --git a/packages/modules/package.js b/packages/modules/package.js index 65b0359d29..60c27e844d 100644 --- a/packages/modules/package.js +++ b/packages/modules/package.js @@ -1,6 +1,6 @@ Package.describe({ name: "modules", - version: "0.14.0-rc182.9", + version: "0.14.0-rc182.10", summary: "CommonJS module system", documentation: "README.md" }); diff --git a/packages/mongo/package.js b/packages/mongo/package.js index 8d117950be..7d7dca8b4c 100644 --- a/packages/mongo/package.js +++ b/packages/mongo/package.js @@ -9,7 +9,7 @@ Package.describe({ summary: "Adaptor for using MongoDB and Minimongo over DDP", - version: '1.7.0-rc182.9' + version: '1.7.0-rc182.10' }); Npm.depends({ diff --git a/packages/npm-mongo/package.js b/packages/npm-mongo/package.js index ddce4d4824..3f0b28fa2a 100644 --- a/packages/npm-mongo/package.js +++ b/packages/npm-mongo/package.js @@ -3,7 +3,7 @@ Package.describe({ summary: "Wrapper around the mongo npm package", - version: "3.2.0-rc182.9", + version: "3.2.0-rc182.10", documentation: null }); diff --git a/packages/standard-minifier-css/package.js b/packages/standard-minifier-css/package.js index 7a3ce09835..3cd9989a09 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.5.4-rc182.9', + version: '1.5.4-rc182.10', summary: 'Standard css minifier used with Meteor apps by default.', documentation: 'README.md' }); diff --git a/packages/standard-minifier-js/package.js b/packages/standard-minifier-js/package.js index e4037cff53..9376f69a2d 100644 --- a/packages/standard-minifier-js/package.js +++ b/packages/standard-minifier-js/package.js @@ -1,6 +1,6 @@ Package.describe({ name: 'standard-minifier-js', - version: '2.5.0-rc182.9', + version: '2.5.0-rc182.10', summary: 'Standard javascript minifiers used with Meteor apps by default.', documentation: 'README.md', }); diff --git a/packages/typescript/package.js b/packages/typescript/package.js index 6f2d669f36..67fc5a71e9 100644 --- a/packages/typescript/package.js +++ b/packages/typescript/package.js @@ -1,6 +1,6 @@ Package.describe({ name: "typescript", - version: "3.7.0-rc182.9", + version: "3.7.0-rc182.10", summary: "Compiler plugin that compiles TypeScript and ECMAScript in .ts and .tsx files", documentation: "README.md" }); diff --git a/packages/webapp/package.js b/packages/webapp/package.js index e666db20f9..ccd664ccbb 100644 --- a/packages/webapp/package.js +++ b/packages/webapp/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Serves a Meteor app over HTTP", - version: '1.7.5-rc182.9' + version: '1.7.5-rc182.10' }); Npm.depends({"basic-auth-connect": "1.0.0", diff --git a/scripts/admin/meteor-release-experimental.json b/scripts/admin/meteor-release-experimental.json index da83f77204..1ca61b5307 100644 --- a/scripts/admin/meteor-release-experimental.json +++ b/scripts/admin/meteor-release-experimental.json @@ -1,6 +1,6 @@ { "track": "METEOR", - "version": "1.8.2-rc.9", + "version": "1.8.2-rc.10", "recommended": false, "official": false, "description": "Meteor" From c24077e65f869a3d69295c2d9219a0a2887207f5 Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Wed, 13 Nov 2019 12:31:36 -0500 Subject: [PATCH 291/327] Allow relative --test-app-path arguments when running test-packages. https://github.com/meteor/meteor/pull/10772#issuecomment-553517459 The assertion in tools/fs/optimistic.ts was failing if I passed a relative path for --test-app-path, and passing the path as a second argument when calling assert made it easier to tell what was going on, so I decided to keep that change. --- History.md | 3 +++ tools/cli/commands.js | 5 +++-- tools/fs/optimistic.ts | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/History.md b/History.md index 7c83f3e93d..f081146c3a 100644 --- a/History.md +++ b/History.md @@ -111,6 +111,9 @@ from the same application source code, since by default the port is generated using the ID from the application's `.meteor/.id` file. +* The `--test-app-path ` option for `meteor test-packages` and + `meteor test` now accepts relative paths as well as absolute paths. + ## v1.8.1, 2019-04-03 ### Breaking changes diff --git a/tools/cli/commands.js b/tools/cli/commands.js index 2b4d2f5599..75831b5584 100644 --- a/tools/cli/commands.js +++ b/tools/cli/commands.js @@ -1676,9 +1676,10 @@ function doTestCommand(options) { let testRunnerAppDir; const testAppPath = options['test-app-path']; if (testAppPath) { + const absTestAppPath = files.pathResolve(testAppPath); try { - if (files.mkdir_p(testAppPath, 0o700)) { - testRunnerAppDir = testAppPath; + if (files.mkdir_p(absTestAppPath, 0o700)) { + testRunnerAppDir = absTestAppPath; } else { Console.error( 'The specified --test-app-path directory could not be used, as ' + diff --git a/tools/fs/optimistic.ts b/tools/fs/optimistic.ts index e351092178..86eb79ee1f 100644 --- a/tools/fs/optimistic.ts +++ b/tools/fs/optimistic.ts @@ -211,7 +211,7 @@ function dependOnParentDirectory(path: string) { // of this node_modules directory, but that's ok because the use case we // care about is adding or removing npm packages. function dependOnNodeModules(nodeModulesDir: string) { - assert(pathIsAbsolute(nodeModulesDir)); + assert(pathIsAbsolute(nodeModulesDir), nodeModulesDir); assert(nodeModulesDir.endsWith(pathSep + "node_modules")); dependOnDirectory(nodeModulesDir); } From f29c0561ced7e6a9a525c9320534fb537e75250e Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Thu, 14 Nov 2019 10:15:35 -0500 Subject: [PATCH 292/327] Final History.md updates before official Meteor 1.8.2 release. --- History.md | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/History.md b/History.md index f081146c3a..01dba88d23 100644 --- a/History.md +++ b/History.md @@ -1,17 +1,20 @@ ## v.NEXT -## v1.8.2, TBD +## v1.8.2, 2019-11-14 ### Breaking changes -* Be sure you are not using variables named `exports` otherwise you will get - this error `Uncaught SyntaxError: Identifier 'exports' has already been - declared`. [Comment #535535056](https://github.com/meteor/meteor/pull/10522#issuecomment-535535056) - Thanks [@SimonSimCity](https://github.com/SimonSimCity) + +* Module-level variable declarations named `require` or `exports` are no + longer automatically renamed, so they may collide with module function + parameters of the same name, leading to errors like + `Uncaught SyntaxError: Identifier 'exports' has already been declared`. + See [this comment](https://github.com/meteor/meteor/pull/10522#issuecomment-535535056) + by [@SimonSimCity](https://github.com/SimonSimCity). ### Migration Steps * Be sure to update the `@babel/runtime` npm package to its latest version - (currently 7.7.0): + (currently 7.7.2): ```sh meteor npm install @babel/runtime@latest ``` @@ -69,7 +72,8 @@ development were actually used by the server bundle, so that a full server restart can be avoided when no files used by the server bundle have changed. Client-only refreshes are typically much faster than - server restarts. + server restarts. Run `meteor add autoupdate` to enable client refreshes, + if you are not already using the `autoupdate` package. [Issue #10449](https://github.com/meteor/meteor/issues/10449) [PR #10686](https://github.com/meteor/meteor/pull/10686) From 97e1bba384cbe517a2219c6c9d7220da08d47e79 Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Thu, 14 Nov 2019 15:12:21 -0500 Subject: [PATCH 293/327] Bump package versions for the official 1.8.2 release. --- packages/accounts-base/package.js | 2 +- packages/babel-compiler/package.js | 2 +- packages/babel-runtime/package.js | 2 +- packages/callback-hook/package.js | 2 +- packages/context/package.js | 2 +- packages/ecmascript-runtime-client/package.js | 2 +- packages/ecmascript-runtime-server/package.js | 2 +- packages/ecmascript/package.js | 2 +- packages/meteor-tool/package.js | 2 +- packages/minifier-css/package.js | 2 +- packages/minifier-js/package.js | 2 +- packages/modules-runtime/package.js | 2 +- packages/modules/package.js | 2 +- packages/mongo/package.js | 2 +- packages/npm-mongo/package.js | 2 +- packages/standard-minifier-css/package.js | 2 +- packages/standard-minifier-js/package.js | 2 +- packages/typescript/package.js | 2 +- packages/webapp/package.js | 2 +- scripts/admin/meteor-release-official.json | 7 +------ 20 files changed, 20 insertions(+), 25 deletions(-) diff --git a/packages/accounts-base/package.js b/packages/accounts-base/package.js index 42cf86bc2c..57af7da5db 100644 --- a/packages/accounts-base/package.js +++ b/packages/accounts-base/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "A user account system", - version: "1.4.5-rc182.10", + version: "1.4.5", }); Package.onUse(api => { diff --git a/packages/babel-compiler/package.js b/packages/babel-compiler/package.js index 4d67a5be5d..5faf5feeac 100644 --- a/packages/babel-compiler/package.js +++ b/packages/babel-compiler/package.js @@ -6,7 +6,7 @@ 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.4.0-rc182.10' + version: '7.4.0' }); Npm.depends({ diff --git a/packages/babel-runtime/package.js b/packages/babel-runtime/package.js index 8d98860b9a..be812b2034 100644 --- a/packages/babel-runtime/package.js +++ b/packages/babel-runtime/package.js @@ -1,7 +1,7 @@ Package.describe({ name: "babel-runtime", summary: "Runtime support for output of Babel transpiler", - version: '1.4.0-rc182.10', + version: '1.4.0', documentation: 'README.md' }); diff --git a/packages/callback-hook/package.js b/packages/callback-hook/package.js index 582f4a8b9c..57d482db1e 100644 --- a/packages/callback-hook/package.js +++ b/packages/callback-hook/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Register callbacks on a hook", - version: '1.2.0-rc182.10' + version: '1.2.0' }); Package.onUse(function (api) { diff --git a/packages/context/package.js b/packages/context/package.js index 114ea5de3e..823bd481cf 100644 --- a/packages/context/package.js +++ b/packages/context/package.js @@ -1,6 +1,6 @@ Package.describe({ name: "context", - version: "0.4.0-rc182.10", + version: "0.4.0", summary: "Manage contextual information without passing objects around", documentation: "README.md" }); diff --git a/packages/ecmascript-runtime-client/package.js b/packages/ecmascript-runtime-client/package.js index 92814f7f57..69123ed83c 100644 --- a/packages/ecmascript-runtime-client/package.js +++ b/packages/ecmascript-runtime-client/package.js @@ -1,6 +1,6 @@ Package.describe({ name: "ecmascript-runtime-client", - version: "0.9.0-rc182.10", + version: "0.9.0", summary: "Polyfills for new ECMAScript 2015 APIs like Map and Set", git: "https://github.com/meteor/meteor/tree/devel/packages/ecmascript-runtime-client", documentation: "README.md" diff --git a/packages/ecmascript-runtime-server/package.js b/packages/ecmascript-runtime-server/package.js index b811c21ad6..66b54bcb75 100644 --- a/packages/ecmascript-runtime-server/package.js +++ b/packages/ecmascript-runtime-server/package.js @@ -1,6 +1,6 @@ Package.describe({ name: "ecmascript-runtime-server", - version: "0.8.0-rc182.10", + version: "0.8.0", summary: "Polyfills for new ECMAScript 2015 APIs like Map and Set", git: "https://github.com/meteor/meteor/tree/devel/packages/ecmascript-runtime-client", documentation: "README.md" diff --git a/packages/ecmascript/package.js b/packages/ecmascript/package.js index cf2d78d070..5faccec9e6 100644 --- a/packages/ecmascript/package.js +++ b/packages/ecmascript/package.js @@ -1,6 +1,6 @@ Package.describe({ name: 'ecmascript', - version: '0.13.0-rc182.10', + version: '0.13.0', summary: 'Compiler plugin that supports ES2015+ in all .js files', documentation: 'README.md' }); diff --git a/packages/meteor-tool/package.js b/packages/meteor-tool/package.js index 6d3cd8660e..89b5ab8b5a 100644 --- a/packages/meteor-tool/package.js +++ b/packages/meteor-tool/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "The Meteor command-line tool", - version: '1.8.2-rc.10' + version: '1.8.2' }); Package.includeTool(); diff --git a/packages/minifier-css/package.js b/packages/minifier-css/package.js index 3e463f64d2..0542dc191d 100644 --- a/packages/minifier-css/package.js +++ b/packages/minifier-css/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: 'CSS minifier', - version: '1.4.3-rc182.10' + version: '1.4.3' }); Npm.depends({ diff --git a/packages/minifier-js/package.js b/packages/minifier-js/package.js index 445d22802f..1f7721c178 100644 --- a/packages/minifier-js/package.js +++ b/packages/minifier-js/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "JavaScript minifier", - version: "2.5.0-rc182.10" + version: "2.5.0" }); Npm.depends({ diff --git a/packages/modules-runtime/package.js b/packages/modules-runtime/package.js index 5210ac37af..2adb83a12c 100644 --- a/packages/modules-runtime/package.js +++ b/packages/modules-runtime/package.js @@ -1,6 +1,6 @@ Package.describe({ name: "modules-runtime", - version: "0.11.0-rc182.10", + version: "0.11.0", summary: "CommonJS module system", git: "https://github.com/benjamn/install", documentation: "README.md" diff --git a/packages/modules/package.js b/packages/modules/package.js index 60c27e844d..792a3e260e 100644 --- a/packages/modules/package.js +++ b/packages/modules/package.js @@ -1,6 +1,6 @@ Package.describe({ name: "modules", - version: "0.14.0-rc182.10", + version: "0.14.0", summary: "CommonJS module system", documentation: "README.md" }); diff --git a/packages/mongo/package.js b/packages/mongo/package.js index 7d7dca8b4c..9a1ef5274d 100644 --- a/packages/mongo/package.js +++ b/packages/mongo/package.js @@ -9,7 +9,7 @@ Package.describe({ summary: "Adaptor for using MongoDB and Minimongo over DDP", - version: '1.7.0-rc182.10' + version: '1.7.0' }); Npm.depends({ diff --git a/packages/npm-mongo/package.js b/packages/npm-mongo/package.js index 3f0b28fa2a..8893ec2bf5 100644 --- a/packages/npm-mongo/package.js +++ b/packages/npm-mongo/package.js @@ -3,7 +3,7 @@ Package.describe({ summary: "Wrapper around the mongo npm package", - version: "3.2.0-rc182.10", + version: "3.2.0", documentation: null }); diff --git a/packages/standard-minifier-css/package.js b/packages/standard-minifier-css/package.js index 3cd9989a09..1ae8621ddf 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.5.4-rc182.10', + version: '1.5.4', summary: 'Standard css minifier used with Meteor apps by default.', documentation: 'README.md' }); diff --git a/packages/standard-minifier-js/package.js b/packages/standard-minifier-js/package.js index 9376f69a2d..336f3f6c59 100644 --- a/packages/standard-minifier-js/package.js +++ b/packages/standard-minifier-js/package.js @@ -1,6 +1,6 @@ Package.describe({ name: 'standard-minifier-js', - version: '2.5.0-rc182.10', + version: '2.5.0', summary: 'Standard javascript minifiers used with Meteor apps by default.', documentation: 'README.md', }); diff --git a/packages/typescript/package.js b/packages/typescript/package.js index 67fc5a71e9..e873ee2ad1 100644 --- a/packages/typescript/package.js +++ b/packages/typescript/package.js @@ -1,6 +1,6 @@ Package.describe({ name: "typescript", - version: "3.7.0-rc182.10", + version: "3.7.0", summary: "Compiler plugin that compiles TypeScript and ECMAScript in .ts and .tsx files", documentation: "README.md" }); diff --git a/packages/webapp/package.js b/packages/webapp/package.js index ccd664ccbb..c651bcf3d8 100644 --- a/packages/webapp/package.js +++ b/packages/webapp/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Serves a Meteor app over HTTP", - version: '1.7.5-rc182.10' + version: '1.7.5' }); Npm.depends({"basic-auth-connect": "1.0.0", diff --git a/scripts/admin/meteor-release-official.json b/scripts/admin/meteor-release-official.json index fe8a051929..5d0e1f3f5d 100644 --- a/scripts/admin/meteor-release-official.json +++ b/scripts/admin/meteor-release-official.json @@ -1,12 +1,7 @@ { "track": "METEOR", - "version": "1.8.1", + "version": "1.8.2", "recommended": false, "official": true, - "patchFrom": [ - "1.8", - "1.8.0.1", - "1.8.0.2" - ], "description": "The Official Meteor Distribution" } From 0af5c64bd107ead4f039c2585947332699cdf2cd Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Thu, 14 Nov 2019 16:06:59 -0500 Subject: [PATCH 294/327] Update modules test app to Meteor 1.8.2. --- tools/tests/apps/modules/.meteor/packages | 10 +- tools/tests/apps/modules/.meteor/release | 2 +- tools/tests/apps/modules/imports/.babelrc | 2 - tools/tests/apps/modules/package-lock.json | 560 ++++++++++++--------- tools/tests/apps/modules/package.json | 7 +- 5 files changed, 334 insertions(+), 247 deletions(-) diff --git a/tools/tests/apps/modules/.meteor/packages b/tools/tests/apps/modules/.meteor/packages index b39115f075..848693b6e5 100644 --- a/tools/tests/apps/modules/.meteor/packages +++ b/tools/tests/apps/modules/.meteor/packages @@ -6,19 +6,19 @@ meteor-base@1.4.0 # Packages every Meteor app needs to have mobile-experience@1.0.5 # Packages for a great mobile UX -mongo@1.6.2 # The database Meteor supports right now +mongo@1.7.0 # The database Meteor supports right now blaze-html-templates # Compile .html files into Meteor Blaze views session@1.2.0 # Client-side reactive dictionary for your app jquery@1.11.10 # Helpful client-side library tracker@1.2.0 # Meteor's client-side reactive programming library es5-shim@4.8.0 # ECMAScript 5 compatibility for older browsers. -ecmascript@0.12.4 # Enable ECMAScript2015+ syntax in app code +ecmascript@0.13.0 # Enable ECMAScript2015+ syntax in app code coffeescript modules-test-package -standard-minifier-css@1.5.3 -standard-minifier-js@2.4.1 +standard-minifier-css@1.5.4 +standard-minifier-js@2.5.0 client-only-ecmascript modules-test-plugin shell-server@0.4.0 @@ -27,4 +27,4 @@ underscore@1.0.10 import-local-json-module akryum:vue-component dummy-compiler -typescript +typescript@3.7.0 diff --git a/tools/tests/apps/modules/.meteor/release b/tools/tests/apps/modules/.meteor/release index 97064e1993..250a263bce 100644 --- a/tools/tests/apps/modules/.meteor/release +++ b/tools/tests/apps/modules/.meteor/release @@ -1 +1 @@ -METEOR@1.8.1 +METEOR@1.8.2 diff --git a/tools/tests/apps/modules/imports/.babelrc b/tools/tests/apps/modules/imports/.babelrc index e99cbde580..b18c977ecb 100644 --- a/tools/tests/apps/modules/imports/.babelrc +++ b/tools/tests/apps/modules/imports/.babelrc @@ -3,13 +3,11 @@ "development": { "plugins": [ "proposal-do-expressions", - "proposal-optional-chaining" ] }, "production": { "plugins": [ "proposal-do-expressions", - "proposal-optional-chaining" ] } } diff --git a/tools/tests/apps/modules/package-lock.json b/tools/tests/apps/modules/package-lock.json index 275ab1032b..80920ee909 100644 --- a/tools/tests/apps/modules/package-lock.json +++ b/tools/tests/apps/modules/package-lock.json @@ -4,78 +4,77 @@ "lockfileVersion": 1, "dependencies": { "@babel/code-frame": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.0.0.tgz", - "integrity": "sha512-OfC2uemaknXr87bdLUkWog7nYuliM9Ij5HUcajsVcMCpQrcLmtxRbVFTIqmcSkSeYRBFBRxs2FiUqFJDLdiebA==", + "version": "7.5.5", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.5.5.tgz", + "integrity": "sha512-27d4lZoomVyo51VegxI20xZPuSHusqbQag/ztrBC7wegWoQ1nLREPVSKSW8byhTlzTKyNE4ifaTA6lCp7JjpFw==", "requires": { "@babel/highlight": "^7.0.0" } }, "@babel/core": { - "version": "7.5.0", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.5.0.tgz", - "integrity": "sha512-6Isr4X98pwXqHvtigw71CKgmhL1etZjPs5A67jL/w0TkLM9eqmFR40YrnJvEc1WnMZFsskjsmid8bHZyxKEAnw==", + "version": "7.7.2", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.7.2.tgz", + "integrity": "sha512-eeD7VEZKfhK1KUXGiyPFettgF3m513f8FoBSWiQ1xTvl1RAopLs42Wp9+Ze911I6H0N9lNqJMDgoZT7gHsipeQ==", "requires": { - "@babel/code-frame": "^7.0.0", - "@babel/generator": "^7.5.0", - "@babel/helpers": "^7.5.0", - "@babel/parser": "^7.5.0", - "@babel/template": "^7.4.4", - "@babel/traverse": "^7.5.0", - "@babel/types": "^7.5.0", - "convert-source-map": "^1.1.0", + "@babel/code-frame": "^7.5.5", + "@babel/generator": "^7.7.2", + "@babel/helpers": "^7.7.0", + "@babel/parser": "^7.7.2", + "@babel/template": "^7.7.0", + "@babel/traverse": "^7.7.2", + "@babel/types": "^7.7.2", + "convert-source-map": "^1.7.0", "debug": "^4.1.0", "json5": "^2.1.0", - "lodash": "^4.17.11", + "lodash": "^4.17.13", "resolve": "^1.3.2", "semver": "^5.4.1", "source-map": "^0.5.0" } }, "@babel/generator": { - "version": "7.5.0", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.5.0.tgz", - "integrity": "sha512-1TTVrt7J9rcG5PMjvO7VEG3FrEoEJNHxumRq66GemPmzboLWtIjjcJgk8rokuAS7IiRSpgVSu5Vb9lc99iJkOA==", + "version": "7.7.2", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.7.2.tgz", + "integrity": "sha512-WthSArvAjYLz4TcbKOi88me+KmDJdKSlfwwN8CnUYn9jBkzhq0ZEPuBfkAWIvjJ3AdEV1Cf/+eSQTnp3IDJKlQ==", "requires": { - "@babel/types": "^7.5.0", + "@babel/types": "^7.7.2", "jsesc": "^2.5.1", - "lodash": "^4.17.11", - "source-map": "^0.5.0", - "trim-right": "^1.0.1" + "lodash": "^4.17.13", + "source-map": "^0.5.0" } }, "@babel/helper-annotate-as-pure": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.0.0.tgz", - "integrity": "sha512-3UYcJUj9kvSLbLbUIfQTqzcy5VX7GRZ/CCDrnOaZorFFM01aXp1+GJwuFGV4NDDoAS+mOUyHcO6UD/RfqOks3Q==", + "version": "7.7.0", + "resolved": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.7.0.tgz", + "integrity": "sha512-k50CQxMlYTYo+GGyUGFwpxKVtxVJi9yh61sXZji3zYHccK9RYliZGSTOgci85T+r+0VFN2nWbGM04PIqwfrpMg==", "requires": { - "@babel/types": "^7.0.0" + "@babel/types": "^7.7.0" } }, "@babel/helper-function-name": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.1.0.tgz", - "integrity": "sha512-A95XEoCpb3TO+KZzJ4S/5uW5fNe26DjBGqf1o9ucyLyCmi1dXq/B3c8iaWTfBk3VvetUxl16e8tIrd5teOCfGw==", + "version": "7.7.0", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.7.0.tgz", + "integrity": "sha512-tDsJgMUAP00Ugv8O2aGEua5I2apkaQO7lBGUq1ocwN3G23JE5Dcq0uh3GvFTChPa4b40AWiAsLvCZOA2rdnQ7Q==", "requires": { - "@babel/helper-get-function-arity": "^7.0.0", - "@babel/template": "^7.1.0", - "@babel/types": "^7.0.0" + "@babel/helper-get-function-arity": "^7.7.0", + "@babel/template": "^7.7.0", + "@babel/types": "^7.7.0" } }, "@babel/helper-get-function-arity": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.0.0.tgz", - "integrity": "sha512-r2DbJeg4svYvt3HOS74U4eWKsUAMRH01Z1ds1zx8KNTPtpTL5JAsdFv8BNyOpVqdFhHkkRDIg5B4AsxmkjAlmQ==", + "version": "7.7.0", + "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.7.0.tgz", + "integrity": "sha512-tLdojOTz4vWcEnHWHCuPN5P85JLZWbm5Fx5ZsMEMPhF3Uoe3O7awrbM2nQ04bDOUToH/2tH/ezKEOR8zEYzqyw==", "requires": { - "@babel/types": "^7.0.0" + "@babel/types": "^7.7.0" } }, "@babel/helper-module-imports": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.0.0.tgz", - "integrity": "sha512-aP/hlLq01DWNEiDg4Jn23i+CXxW/owM4WpDLFUbpjxe4NS3BhLVZQ5i7E0ZrxuQ/vwekIeciyamgB1UIYxxM6A==", + "version": "7.7.0", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.7.0.tgz", + "integrity": "sha512-Dv3hLKIC1jyfTkClvyEkYP2OlkzNvWs5+Q8WgPbxM5LMeorons7iPP91JM+DU7tRbhqA1ZeooPaMFvQrn23RHw==", "requires": { - "@babel/types": "^7.0.0" + "@babel/types": "^7.7.0" } }, "@babel/helper-plugin-utils": { @@ -84,21 +83,21 @@ "integrity": "sha512-CYAOUCARwExnEixLdB6sDm2dIJ/YgEAKDM1MOeMeZu9Ld/bDgVo8aiWrXwcY7OBh+1Ea2uUcVRcxKk0GJvW7QA==" }, "@babel/helper-split-export-declaration": { - "version": "7.4.4", - "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.4.4.tgz", - "integrity": "sha512-Ro/XkzLf3JFITkW6b+hNxzZ1n5OQ80NvIUdmHspih1XAhtN3vPTuUFT4eQnela+2MaZ5ulH+iyP513KJrxbN7Q==", + "version": "7.7.0", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.7.0.tgz", + "integrity": "sha512-HgYSI8rH08neWlAH3CcdkFg9qX9YsZysZI5GD8LjhQib/mM0jGOZOVkoUiiV2Hu978fRtjtsGsW6w0pKHUWtqA==", "requires": { - "@babel/types": "^7.4.4" + "@babel/types": "^7.7.0" } }, "@babel/helpers": { - "version": "7.5.0", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.5.0.tgz", - "integrity": "sha512-EgCUEa8cNwuMrwo87l2d7i2oShi8m2Q58H7h3t4TWtqATZalJYFwfL9DulRe02f3KdqM9xmMCw3v/7Ll+EiaWg==", + "version": "7.7.0", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.7.0.tgz", + "integrity": "sha512-VnNwL4YOhbejHb7x/b5F39Zdg5vIQpUUNzJwx0ww1EcVRt41bbGRZWhAURrfY32T5zTT3qwNOQFWpn+P0i0a2g==", "requires": { - "@babel/template": "^7.4.4", - "@babel/traverse": "^7.5.0", - "@babel/types": "^7.5.0" + "@babel/template": "^7.7.0", + "@babel/traverse": "^7.7.0", + "@babel/types": "^7.7.0" } }, "@babel/highlight": { @@ -112,28 +111,19 @@ } }, "@babel/parser": { - "version": "7.5.0", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.5.0.tgz", - "integrity": "sha512-I5nW8AhGpOXGCCNYGc+p7ExQIBxRFnS2fd/d862bNOKvmoEPjYPcfIjsfdy0ujagYOIYPczKgD9l3FsgTkAzKA==" + "version": "7.7.3", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.7.3.tgz", + "integrity": "sha512-bqv+iCo9i+uLVbI0ILzKkvMorqxouI+GbV13ivcARXn9NNEabi2IEz912IgNpT/60BNXac5dgcfjb94NjsF33A==" }, "@babel/plugin-proposal-do-expressions": { - "version": "7.5.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-do-expressions/-/plugin-proposal-do-expressions-7.5.0.tgz", - "integrity": "sha512-xe0QQrhm+DGj6H23a6XtwkJNimy1fo71O/YVBfrfvfSl0fsq9T9dfoQBIY4QceEIdUo7u9s7OPEdsWEuizfGeg==", + "version": "7.6.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-do-expressions/-/plugin-proposal-do-expressions-7.6.0.tgz", + "integrity": "sha512-qJDaoBDbLySwU1tG0jbAomOwz8W1PEiiiK0iLQAnHLr4PYIMVX4ltDGkj3uAKx4HDs1WJ0tozGW1zAQjuTIiWg==", "requires": { "@babel/helper-plugin-utils": "^7.0.0", "@babel/plugin-syntax-do-expressions": "^7.2.0" } }, - "@babel/plugin-proposal-optional-chaining": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-chaining/-/plugin-proposal-optional-chaining-7.2.0.tgz", - "integrity": "sha512-ea3Q6edZC/55wEBVZAEz42v528VulyO0eir+7uky/sT4XRcdkWJcFi1aPtitTlwUzGnECWJNExWww1SStt+yWw==", - "requires": { - "@babel/helper-plugin-utils": "^7.0.0", - "@babel/plugin-syntax-optional-chaining": "^7.2.0" - } - }, "@babel/plugin-syntax-do-expressions": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-do-expressions/-/plugin-syntax-do-expressions-7.2.0.tgz", @@ -142,77 +132,69 @@ "@babel/helper-plugin-utils": "^7.0.0" } }, - "@babel/plugin-syntax-optional-chaining": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-chaining/-/plugin-syntax-optional-chaining-7.2.0.tgz", - "integrity": "sha512-HtGCtvp5Uq/jH/WNUPkK6b7rufnCPLLlDAFN7cmACoIjaOOiXxUt3SswU5loHqrhtqTsa/WoLQ1OQ1AGuZqaWA==", - "requires": { - "@babel/helper-plugin-utils": "^7.0.0" - } - }, "@babel/runtime": { - "version": "7.5.0", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.5.0.tgz", - "integrity": "sha512-2xsuyZ0R0RBFwjgae5NpXk8FcfH4qovj5cEM5VEeB7KXnKqzaisIu2HSV/mCEISolJJuR4wkViUGYujA8MH9tw==", + "version": "7.7.2", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.7.2.tgz", + "integrity": "sha512-JONRbXbTXc9WQE2mAZd1p0Z3DZ/6vaQIkgYMSTP3KjRCyd7rCZCcfhCyX+YjwcKxcZ82UrxbRD358bpExNgrjw==", "requires": { "regenerator-runtime": "^0.13.2" }, "dependencies": { "regenerator-runtime": { - "version": "0.13.2", - "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.2.tgz", - "integrity": "sha512-S/TQAZJO+D3m9xeN1WTI8dLKBBiRgXBlTJvbWjCThHWZj9EvHK70Ff50/tYj2J/fvBY6JtFVwRuazHN2E7M9BA==" + "version": "0.13.3", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.3.tgz", + "integrity": "sha512-naKIZz2GQ8JWh///G7L3X6LaQUAMp2lvb1rvwwsURe/VXwD6VMfr+/1NuNw3ag8v2kY1aQ/go5SNn79O9JU7yw==" } } }, "@babel/template": { - "version": "7.4.4", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.4.4.tgz", - "integrity": "sha512-CiGzLN9KgAvgZsnivND7rkA+AeJ9JB0ciPOD4U59GKbQP2iQl+olF1l76kJOupqidozfZ32ghwBEJDhnk9MEcw==", + "version": "7.7.0", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.7.0.tgz", + "integrity": "sha512-OKcwSYOW1mhWbnTBgQY5lvg1Fxg+VyfQGjcBduZFljfc044J5iDlnDSfhQ867O17XHiSCxYHUxHg2b7ryitbUQ==", "requires": { "@babel/code-frame": "^7.0.0", - "@babel/parser": "^7.4.4", - "@babel/types": "^7.4.4" + "@babel/parser": "^7.7.0", + "@babel/types": "^7.7.0" } }, "@babel/traverse": { - "version": "7.5.0", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.5.0.tgz", - "integrity": "sha512-SnA9aLbyOCcnnbQEGwdfBggnc142h/rbqqsXcaATj2hZcegCl903pUD/lfpsNBlBSuWow/YDfRyJuWi2EPR5cg==", + "version": "7.7.2", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.7.2.tgz", + "integrity": "sha512-TM01cXib2+rgIZrGJOLaHV/iZUAxf4A0dt5auY6KNZ+cm6aschuJGqKJM3ROTt3raPUdIDk9siAufIFEleRwtw==", "requires": { - "@babel/code-frame": "^7.0.0", - "@babel/generator": "^7.5.0", - "@babel/helper-function-name": "^7.1.0", - "@babel/helper-split-export-declaration": "^7.4.4", - "@babel/parser": "^7.5.0", - "@babel/types": "^7.5.0", + "@babel/code-frame": "^7.5.5", + "@babel/generator": "^7.7.2", + "@babel/helper-function-name": "^7.7.0", + "@babel/helper-split-export-declaration": "^7.7.0", + "@babel/parser": "^7.7.2", + "@babel/types": "^7.7.2", "debug": "^4.1.0", "globals": "^11.1.0", - "lodash": "^4.17.11" + "lodash": "^4.17.13" } }, "@babel/types": { - "version": "7.5.0", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.5.0.tgz", - "integrity": "sha512-UFpDVqRABKsW01bvw7/wSUe56uy6RXM5+VJibVVAybDGxEW25jdwiFJEf7ASvSaC7sN7rbE/l3cLp2izav+CtQ==", + "version": "7.7.2", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.7.2.tgz", + "integrity": "sha512-YTf6PXoh3+eZgRCBzzP25Bugd2ngmpQVrk7kXX0i5N9BO7TFBtIgZYs7WtxtOGs8e6A4ZI7ECkbBCEHeXocvOA==", "requires": { "esutils": "^2.0.2", - "lodash": "^4.17.11", + "lodash": "^4.17.13", "to-fast-properties": "^2.0.0" } }, "@emotion/is-prop-valid": { - "version": "0.8.2", - "resolved": "https://registry.npmjs.org/@emotion/is-prop-valid/-/is-prop-valid-0.8.2.tgz", - "integrity": "sha512-ZQIMAA2kLUWiUeMZNJDTeCwYRx1l8SQL0kHktze4COT22occKpDML1GDUXP5/sxhOMrZO8vZw773ni4H5Snrsg==", + "version": "0.8.5", + "resolved": "https://registry.npmjs.org/@emotion/is-prop-valid/-/is-prop-valid-0.8.5.tgz", + "integrity": "sha512-6ZODuZSFofbxSbcxwsFz+6ioPjb0ISJRRPLZ+WIbjcU2IMU0Io+RGQjjaTgOvNQl007KICBm7zXQaYQEC1r6Bg==", "requires": { - "@emotion/memoize": "0.7.2" + "@emotion/memoize": "0.7.3" } }, "@emotion/memoize": { - "version": "0.7.2", - "resolved": "https://registry.npmjs.org/@emotion/memoize/-/memoize-0.7.2.tgz", - "integrity": "sha512-hnHhwQzvPCW1QjBWFyBtsETdllOM92BfrKWbUTmh9aeOlcVOiXvlPsK4104xH8NsaKfg86PTFsWkueQeUfMA/w==" + "version": "0.7.3", + "resolved": "https://registry.npmjs.org/@emotion/memoize/-/memoize-0.7.3.tgz", + "integrity": "sha512-2Md9mH6mvo+ygq1trTeVp2uzAKwE2P7In0cRpD/M9Q70aH8L+rxMLbb3JCN2JoSWsV2O+DdFjfbbXoMoLBczow==" }, "@emotion/unitless": { "version": "0.7.4", @@ -233,9 +215,9 @@ "integrity": "sha1-RqRgUqiJ1CNkbaoQV7uweHnRmQg=" }, "@types/node": { - "version": "12.0.12", - "resolved": "https://registry.npmjs.org/@types/node/-/node-12.0.12.tgz", - "integrity": "sha512-Uy0PN4R5vgBUXFoJrKryf5aTk3kJ8Rv3PdlHjl6UaX+Cqp1QE0yPQ68MPXGrZOfG7gZVNDIJZYyot0B9ubXUrQ==" + "version": "12.12.7", + "resolved": "https://registry.npmjs.org/@types/node/-/node-12.12.7.tgz", + "integrity": "sha512-E6Zn0rffhgd130zbCbAr/JdXfXkoOUFAKNs/rF8qnafSJ8KYaA/j3oz7dcwal+lYjLA7xvdd5J4wdYpCTlP8+w==" }, "@wry/context": { "version": "0.4.4", @@ -276,24 +258,24 @@ "integrity": "sha1-+PwEyjoTeErenhZBr5hXjPvWR6k=" }, "async-limiter": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/async-limiter/-/async-limiter-1.0.0.tgz", - "integrity": "sha512-jp/uFnooOiO+L211eZOoSyzpOITMXx1rBITauYykG3BRYPu8h0UcxsPNB04RR5vo4Tyz3+ay17tR6JVf9qzYWg==" + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/async-limiter/-/async-limiter-1.0.1.tgz", + "integrity": "sha512-csOlWGAcRFJaI6m+F2WKdnMKr4HhdhFVBk0H/QbJFMCr+uO2kwohwXQPxw/9OCxp05r5ghVBFSyioixx3gfkNQ==" }, "aws-sdk": { - "version": "2.488.0", - "resolved": "https://registry.npmjs.org/aws-sdk/-/aws-sdk-2.488.0.tgz", - "integrity": "sha512-9AP48tyF1E5+x1CKeiRlj0Sv1YF7KI0BdSW9JP8x3ClhPWNUHjDYNH2OwsALuG1BloeY2ZigYqfI2fB7g3rNHQ==", + "version": "2.572.0", + "resolved": "https://registry.npmjs.org/aws-sdk/-/aws-sdk-2.572.0.tgz", + "integrity": "sha512-sE9SdbnJoQTr2+rLjLlHQTfSunayhi0FuI18MmrJVgbzBu54UZoHhD9MNTYhhZqU8/vBa25Ji99BWStIwuu5Vw==", "requires": { - "buffer": "4.9.1", - "events": "1.1.1", - "ieee754": "1.1.8", - "jmespath": "0.15.0", - "querystring": "0.2.0", - "sax": "1.2.1", - "url": "0.10.3", - "uuid": "3.3.2", - "xml2js": "0.4.19" + "buffer": "^4.9.1", + "events": "^1.1.1", + "ieee754": "^1.1.13", + "jmespath": "^0.15.0", + "querystring": "^0.2.0", + "sax": "^1.2.1", + "url": "^0.10.3", + "uuid": "^3.3.2", + "xml2js": "^0.4.19" } }, "babel-plugin-styled-components": { @@ -331,9 +313,9 @@ "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=" }, "base64-js": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.3.0.tgz", - "integrity": "sha512-ccav/yGvoa80BQDljCxsmmQ3Xvx60/UpBIij5QN21W3wBi/hhIC9OoO+KLpu9IJTS9j4DRVJ3aDDF9cMSoa2lw==" + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.3.1.tgz", + "integrity": "sha512-mLQ4i2QO1ytvGWFWmcngKO//JXAQueZvwEKtjgQFM4jIK0kU+ytMfplL8j+n5mspOfjHwoAg+9yhb7BwAHm36g==" }, "big-number": { "version": "0.3.1", @@ -369,9 +351,9 @@ } }, "buffer": { - "version": "4.9.1", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-4.9.1.tgz", - "integrity": "sha1-bRu2AbB6TvztlwlBMgkwJ8lbwpg=", + "version": "4.9.2", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-4.9.2.tgz", + "integrity": "sha512-xq+q3SRMOxGivLhBNaUdC64hDTQwejJ+H0T/NB1XMtTVEwNTrfFF3gAxiyW0Bu/xWEGhjVKgUcMhCrUy2+uCWg==", "requires": { "base64-js": "^1.0.2", "ieee754": "^1.1.4", @@ -467,9 +449,9 @@ } }, "convert-source-map": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.6.0.tgz", - "integrity": "sha512-eFu7XigvxdZ1ETfbgPBohgyQ/Z++C0eEhTor0qRwBw9unw+L0/6V8wkSuGgzdThkiS5lSpdptOQPD8Ak40a+7A==", + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.7.0.tgz", + "integrity": "sha512-4FJkXzKXEDB1snCFZlLP4gpC3JILicCpGbzG9f9G7tGqGCzETQ2hWPrcinA9oU4wtf2biUaEH5065UnMeR33oA==", "requires": { "safe-buffer": "~5.1.1" } @@ -490,9 +472,9 @@ "integrity": "sha1-/qJhbcZ2spYmhrOvjb2+GAskTgU=" }, "css-to-react-native": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/css-to-react-native/-/css-to-react-native-2.3.1.tgz", - "integrity": "sha512-yO+oEx1Lf+hDKasqQRVrAvzMCz825Huh1VMlEEDlRWyAhFb/FWb6I0KpEF1PkyKQ7NEdcx9d5M2ZEWgJAsgPvQ==", + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/css-to-react-native/-/css-to-react-native-2.3.2.tgz", + "integrity": "sha512-VOFaeZA053BqvvvqIA8c9n0+9vFppVBAHCp6JgFTtTMU3Mzi+XnelJ9XC9ul3BqFzZyQ5N+H0SnwsWT2Ebchxw==", "requires": { "camelize": "^1.0.0", "css-color-keywords": "^1.0.0", @@ -517,6 +499,14 @@ "resolved": "https://registry.npmjs.org/deep-diff/-/deep-diff-0.3.8.tgz", "integrity": "sha1-wB3mPvsO7JeYgB1Ax+Da4ltYLIQ=" }, + "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==", + "requires": { + "object-keys": "^1.0.12" + } + }, "encoding": { "version": "0.1.12", "resolved": "https://registry.npmjs.org/encoding/-/encoding-0.1.12.tgz", @@ -525,6 +515,33 @@ "iconv-lite": "~0.4.13" } }, + "es-abstract": { + "version": "1.16.0", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.16.0.tgz", + "integrity": "sha512-xdQnfykZ9JMEiasTAJZJdMWCQ1Vm00NBw79/AWi7ELfZuuPCSOMDZbT9mkOfSctVtfhb+sAAzrm+j//GjjLHLg==", + "requires": { + "es-to-primitive": "^1.2.0", + "function-bind": "^1.1.1", + "has": "^1.0.3", + "has-symbols": "^1.0.0", + "is-callable": "^1.1.4", + "is-regex": "^1.0.4", + "object-inspect": "^1.6.0", + "object-keys": "^1.1.1", + "string.prototype.trimleft": "^2.1.0", + "string.prototype.trimright": "^2.1.0" + } + }, + "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==", + "requires": { + "is-callable": "^1.1.4", + "is-date-object": "^1.0.1", + "is-symbol": "^1.0.2" + } + }, "es5-ext": { "version": "0.9.2", "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.9.2.tgz", @@ -549,9 +566,9 @@ "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=" }, "esutils": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.2.tgz", - "integrity": "sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs=" + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==" }, "event-emitter": { "version": "0.2.2", @@ -648,9 +665,9 @@ } }, "glob": { - "version": "7.1.4", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.4.tgz", - "integrity": "sha512-hkLPepehmnKk41pUGm3sYxoFs/umurYfYJCerbXEyFIWcAzvpipAgVkBqqT9RBKMGjnq6kMuyYwha6csxbiM1A==", + "version": "7.1.6", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", + "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", "requires": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", @@ -666,9 +683,9 @@ "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==" }, "graphql": { - "version": "14.4.2", - "resolved": "https://registry.npmjs.org/graphql/-/graphql-14.4.2.tgz", - "integrity": "sha512-6uQadiRgnpnSS56hdZUSvFrVcQ6OF9y6wkxJfKquFtHlnl7+KSuWwSJsdwiK1vybm1HgcdbpGkCpvhvsVQ0UZQ==", + "version": "14.5.8", + "resolved": "https://registry.npmjs.org/graphql/-/graphql-14.5.8.tgz", + "integrity": "sha512-MMwmi0zlVLQKLdGiMfWkgQD7dY/TUKt4L+zgJ/aR0Howebod3aNgP5JkgvAULiR2HPVZaP2VEElqtdidHweLkg==", "requires": { "iterall": "^1.2.2" } @@ -686,20 +703,25 @@ "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=" }, + "has-symbols": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.0.tgz", + "integrity": "sha1-uhqPGvKg/DllD1yFA2dwQSIGO0Q=" + }, "hoist-non-react-statics": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/hoist-non-react-statics/-/hoist-non-react-statics-3.3.0.tgz", - "integrity": "sha512-0XsbTXxgiaCDYDIWFcwkmerZPSwywfUqYmwT4jzewKTQSWoE6FCMoUVOeBJWK3E/CrWbxRG3m5GzY4lnIwGRBA==", + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/hoist-non-react-statics/-/hoist-non-react-statics-3.3.1.tgz", + "integrity": "sha512-wbg3bpgA/ZqWrZuMOeJi8+SKMhr7X9TesL/rXMjTzh0p0JUBo3II8DHboYbuIXWRlttrUFxwcu/5kygrCw8fJw==", "requires": { "react-is": "^16.7.0" } }, "https-proxy-agent": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-2.2.1.tgz", - "integrity": "sha512-HPCTS1LW51bcyMYbxUIOO4HEOlQ1/1qRaFWcyxvwaqUS9TY88aoEuHUY33kuAh1YhVVaDQhLZsnPd+XNARWZlQ==", + "version": "2.2.4", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-2.2.4.tgz", + "integrity": "sha512-OmvfoQ53WLjtA9HeYP9RNrWMJzzAz1JGaSFr1nijg0PVR1JaD/xbJq1mdEIIlxGpXp9eSe/O2LgU9DJmTPd0Eg==", "requires": { - "agent-base": "^4.1.0", + "agent-base": "^4.3.0", "debug": "^3.1.0" }, "dependencies": { @@ -727,9 +749,9 @@ "integrity": "sha1-5BgKGF/MkYULlGe4xZ5xYMX0uB0=" }, "ieee754": { - "version": "1.1.8", - "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.1.8.tgz", - "integrity": "sha1-vjPUCsEO8ZJnAfbwii2G+/0a0+Q=" + "version": "1.1.13", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.1.13.tgz", + "integrity": "sha512-4vf7I2LYV/HaWerSo3XmlMkp5eZ83i+/CDluXi/IGTs/O1sejBNhTtnxzmRZfvOUqj7lZjqHkeTvpgSFDlWZTg==" }, "immutability-helper": { "version": "2.9.1", @@ -785,6 +807,16 @@ "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==" }, + "is-callable": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.1.4.tgz", + "integrity": "sha512-r5p9sxJjYnArLjObpjA4xu5EKI3CuKHkJXMhT7kwbpUyIFD1n5PMAsoPvWnvtZiNz7LjkYDRZhd7FlI0eMijEA==" + }, + "is-date-object": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.1.tgz", + "integrity": "sha1-mqIOtq7rv/d/vTPnTKAbM1gdOhY=" + }, "is-decimal": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/is-decimal/-/is-decimal-1.0.3.tgz", @@ -795,15 +827,31 @@ "resolved": "https://registry.npmjs.org/is-hexadecimal/-/is-hexadecimal-1.0.3.tgz", "integrity": "sha512-zxQ9//Q3D/34poZf8fiy3m3XVpbQc7ren15iKqrTtLPwkPD/t3Scy9Imp63FujULGxuK0ZlCwoo5xNpktFgbOA==" }, + "is-regex": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.0.4.tgz", + "integrity": "sha1-VRdIm1RwkbCTDglWVM7SXul+lJE=", + "requires": { + "has": "^1.0.1" + } + }, "is-stream": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=" }, + "is-symbol": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.2.tgz", + "integrity": "sha512-HS8bZ9ox60yCJLH9snBpIwv9pYUAkcuLhSA1oero1UB5y9aiQpRA8y2ex945AOtCZL1lJDeIk3G5LthswI46Lw==", + "requires": { + "has-symbols": "^1.0.0" + } + }, "is-what": { - "version": "3.2.3", - "resolved": "https://registry.npmjs.org/is-what/-/is-what-3.2.3.tgz", - "integrity": "sha512-c4syLgFnjXTH5qd82Fp/qtUIeM0wA69xbI0KH1QpurMIvDaZFrS8UtAa4U52Dc2qSznaMxHit0gErMp6A/Qk1w==" + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/is-what/-/is-what-3.3.1.tgz", + "integrity": "sha512-seFn10yAXy+yJlTRO+8VfiafC+0QJanGLMPTBWLrJm/QPauuchy0UXh8B6H5o9VA8BAzk0iYievt6mNp6gfaqA==" }, "is-whitespace-character": { "version": "1.0.3", @@ -855,9 +903,9 @@ "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==" }, "json5": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/json5/-/json5-2.1.0.tgz", - "integrity": "sha512-8Mh9h6xViijj36g7Dxi+Y4S6hNGV96vcJZr/SrlHh1LR/pEn/8j/+qIBbs44YKl69Lrfctp4QD+AdWLTMqEZAQ==", + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.1.1.tgz", + "integrity": "sha512-l+3HXD0GEI3huGq1njuqtzYK8OYJyXMkOLtQ53pjWh89tvWS2h6l+1zMkYWqlb57+SiQodKZyvMEFb2X+KrFhQ==", "requires": { "minimist": "^1.2.0" } @@ -874,19 +922,19 @@ "integrity": "sha512-mjzgSOFzlrurlURaHVjnQodyPNvrHrf1TbQP2XU9NSqBtHQPuHZ+Eb6TAJP7ASeJN9h9K0KXoRTs8u6ouHBKvg==" }, "lit-html": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/lit-html/-/lit-html-1.1.0.tgz", - "integrity": "sha512-ZDJHpJi09yknMpjwPI8fuSl5sUG7+pF+eE5WciFtgyX7zebvgMDBgSLq4knXa7grxM00RkQ7PBd7UZQiruA78Q==" + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/lit-html/-/lit-html-1.1.2.tgz", + "integrity": "sha512-FFlUMKHKi+qG1x1iHNZ1hrtc/zHmfYTyrSvs3/wBTvaNtpZjOZGWzU7efGYVpgp6KvWeKF6ql9/KsCq6Z/mEDA==" }, "lodash": { - "version": "4.17.11", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.11.tgz", - "integrity": "sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg==" + "version": "4.17.15", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz", + "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==" }, "lodash-es": { - "version": "4.17.11", - "resolved": "https://registry.npmjs.org/lodash-es/-/lodash-es-4.17.11.tgz", - "integrity": "sha512-DHb1ub+rMjjrxqlB3H56/6MXtm1lSksDp2rA2cNWjG8mlDUYFhUj3Di2Zn5IwSU87xLv8tNIQ7sSwE/YOX/D/Q==" + "version": "4.17.15", + "resolved": "https://registry.npmjs.org/lodash-es/-/lodash-es-4.17.15.tgz", + "integrity": "sha512-rlrc3yU3+JNOpZ9zj5pQtxnx2THmvRykwL4Xlxoa8I9lHBlVbbyPhgyPMioxVZ4NqyxaVVtaJnzsyOidQIhyyQ==" }, "lodash.get": { "version": "4.4.2", @@ -922,9 +970,9 @@ } }, "memoize-one": { - "version": "5.0.4", - "resolved": "https://registry.npmjs.org/memoize-one/-/memoize-one-5.0.4.tgz", - "integrity": "sha512-P0z5IeAH6qHHGkJIXWw0xC2HNEgkx/9uWWBQw64FJj3/ol14VYdfVGWWr0fXfjhhv3TKVIqUq65os6O4GUNksA==" + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/memoize-one/-/memoize-one-5.1.1.tgz", + "integrity": "sha512-HKeeBpWvqiVJD57ZUAsJNm71eHTykffzcLZVYWiVfQeI1rJtuEaS7hQiEpWfVVk18donPwJEcFKIkCmPJNOhHA==" }, "memoizee": { "version": "0.2.6", @@ -937,11 +985,11 @@ } }, "merge-anything": { - "version": "2.2.5", - "resolved": "https://registry.npmjs.org/merge-anything/-/merge-anything-2.2.5.tgz", - "integrity": "sha512-WgZGR7EQ1D8pyh57uKBbkPhUCJZLGdMzbDaxL4MDTJSGsvtpGdm8myr6DDtgJwT46xiFBlHqxbveDRpFBWlKWQ==", + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/merge-anything/-/merge-anything-2.4.1.tgz", + "integrity": "sha512-dYOIAl9GFCJNctSIHWOj9OJtarCjsD16P8ObCl6oxrujAG+kOvlwJuOD9/O9iYZ9aTi1RGpGTG9q9etIvuUikQ==", "requires": { - "is-what": "^3.2.3" + "is-what": "^3.3.1" } }, "meteor-node-stubs": { @@ -1593,6 +1641,25 @@ "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=" }, + "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==" + }, + "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.getownpropertydescriptors": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.0.3.tgz", + "integrity": "sha1-h1jIRvW0B62rDyNuCYbxSwUcqhY=", + "requires": { + "define-properties": "^1.1.2", + "es-abstract": "^1.5.1" + } + }, "once": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", @@ -1678,9 +1745,9 @@ "integrity": "sha1-llOgNvt8HuQjQvIyXM7v6jkmxI0=" }, "puppeteer": { - "version": "1.18.1", - "resolved": "https://registry.npmjs.org/puppeteer/-/puppeteer-1.18.1.tgz", - "integrity": "sha512-luUy0HPSuWPsPZ1wAp6NinE0zgetWtudf5zwZ6dHjMWfYpTQcmKveFRox7VBNhQ98OjNA9PQ9PzQyX8k/KrxTg==", + "version": "1.20.0", + "resolved": "https://registry.npmjs.org/puppeteer/-/puppeteer-1.20.0.tgz", + "integrity": "sha512-bt48RDBy2eIwZPrkgbcwHtb51mj2nKvHOPMaSH2IsWiv7lOG9k9zhaRzpDZafrk05ajMc3cu+lSQYYOfH2DkVQ==", "requires": { "debug": "^4.1.0", "extract-zip": "^1.6.6", @@ -1721,20 +1788,20 @@ } }, "react-dom": { - "version": "16.8.6", - "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-16.8.6.tgz", - "integrity": "sha512-1nL7PIq9LTL3fthPqwkvr2zY7phIPjYrT0jp4HjyEQrEROnw4dG41VVwi/wfoCneoleqrNX7iAD+pXebJZwrwA==", + "version": "16.11.0", + "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-16.11.0.tgz", + "integrity": "sha512-nrRyIUE1e7j8PaXSPtyRKtz+2y9ubW/ghNgqKFHHAHaeP0fpF5uXR+sq8IMRHC+ZUxw7W9NyCDTBtwWxvkb0iA==", "requires": { "loose-envify": "^1.1.0", "object-assign": "^4.1.1", "prop-types": "^15.6.2", - "scheduler": "^0.13.6" + "scheduler": "^0.17.0" } }, "react-is": { - "version": "16.8.6", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.8.6.tgz", - "integrity": "sha512-aUk3bHfZ2bRSVFFbbeVS4i+lNPZr3/WM5jT2J5omUVV1zzcs1nAaf3l51ctA5FFvCRbhrH0bdAsRRQddFJZPtA==" + "version": "16.11.0", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.11.0.tgz", + "integrity": "sha512-gbBVYR2p8mnriqAwWx9LbuUrShnAuSCNnuPGyc7GJrMVQtPDAh8iLpv7FRuMPFb56KkaVZIYSz1PrjI9q0QPCw==" }, "react-lifecycles-compat": { "version": "3.0.4", @@ -1742,12 +1809,12 @@ "integrity": "sha512-fBASbA6LnOU9dOU2eW7aQ8xmYBSXUIWr+UmF9b1efZBazGNO+rcXT/icdKnYm2pTwcRylVUYwW7H1PHfLekVzA==" }, "react-redux": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/react-redux/-/react-redux-5.1.1.tgz", - "integrity": "sha512-LE7Ned+cv5qe7tMV5BPYkGQ5Lpg8gzgItK07c67yHvJ8t0iaD9kPFPAli/mYkiyJYrs2pJgExR2ZgsGqlrOApg==", + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/react-redux/-/react-redux-5.1.2.tgz", + "integrity": "sha512-Ns1G0XXc8hDyH/OcBHOxNgQx9ayH3SPxBnFCOidGKSle8pKihysQw2rG/PmciUQRoclhVBO8HMhiRmGXnDja9Q==", "requires": { "@babel/runtime": "^7.1.2", - "hoist-non-react-statics": "^3.1.0", + "hoist-non-react-statics": "^3.3.0", "invariant": "^2.2.4", "loose-envify": "^1.1.0", "prop-types": "^15.6.1", @@ -1793,9 +1860,9 @@ "integrity": "sha512-+CNMnI8QhgVMtAt54uQs3kUxC3Sybpa7Y63HR14uGLgI9/QR5ggHvpxwhGGe3wmx5V91YwqQIblN9k5lspAmGw==" }, "redux": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/redux/-/redux-4.0.1.tgz", - "integrity": "sha512-R7bAtSkk7nY6O/OYMVR9RiBI+XghjF9rlbl5806HJbQph0LJVHZrU5oaO4q70eUKiqMRqm4y07KLTlMZ2BlVmg==", + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/redux/-/redux-4.0.4.tgz", + "integrity": "sha512-vKv4WdiJxOWKxK0yRoaK3Y4pxxB0ilzVx6dszU2W8wLxlb2yikRph4iV/ymtdJ6ZxpBLFbyrxklnT5yBbQSl3Q==", "requires": { "loose-envify": "^1.4.0", "symbol-observable": "^1.2.0" @@ -1860,17 +1927,17 @@ "integrity": "sha1-3mMSg3P8v3w8z6TeWkgMRaZ5WOs=" }, "resolve": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.11.1.tgz", - "integrity": "sha512-vIpgF6wfuJOZI7KKKSP+HmiKggadPQAdsp5HiC1mvqnfp0gF1vdwgBWZIdrVft9pgqoMFQN+R7BSWZiBxx+BBw==", + "version": "1.12.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.12.0.tgz", + "integrity": "sha512-B/dOmuoAik5bKcD6s6nXDCjzUKnaDvdkRyAk6rsmsKLipWj4797iothd7jmmUhWTfinVMU+wc56rYKsit2Qy4w==", "requires": { "path-parse": "^1.0.6" } }, "rimraf": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.3.tgz", - "integrity": "sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==", + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz", + "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==", "requires": { "glob": "^7.1.3" } @@ -1886,23 +1953,23 @@ "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" }, "sax": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.1.tgz", - "integrity": "sha1-e45lYZCyKOgaZq6nSEgNgozS03o=" + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz", + "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==" }, "scheduler": { - "version": "0.13.6", - "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.13.6.tgz", - "integrity": "sha512-IWnObHt413ucAYKsD9J1QShUKkbKLQQHdxRyw73sw4FN26iWr3DY/H34xGPe4nmL1DwXyWmSWmMrA9TfQbE/XQ==", + "version": "0.17.0", + "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.17.0.tgz", + "integrity": "sha512-7rro8Io3tnCPuY4la/NuI5F2yfESpnfZyT6TtkXnSWVkcu0BCDJ+8gk5ozUaFaxpIyNuWAPXrH0yFcSi28fnDA==", "requires": { "loose-envify": "^1.1.0", "object-assign": "^4.1.1" } }, "semver": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.0.tgz", - "integrity": "sha512-Ya52jSX2u7QKghxeoFGpLwCtGlt7j0oY9DYb5apt9nPlJ42ID+ulTXESnt/qAQcoSERyZ5sl3LDIOw0nAn/5DA==" + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==" }, "setimmediate": { "version": "1.0.5", @@ -1938,6 +2005,24 @@ "resolved": "https://registry.npmjs.org/state-toggle/-/state-toggle-1.0.2.tgz", "integrity": "sha512-8LpelPGR0qQM4PnfLiplOQNJcIN1/r2Gy0xKB2zKnIW2YzPMt2sR4I/+gtPjhN7Svh9kw+zqEg2SFwpBO9iNiw==" }, + "string.prototype.trimleft": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/string.prototype.trimleft/-/string.prototype.trimleft-2.1.0.tgz", + "integrity": "sha512-FJ6b7EgdKxxbDxc79cOlok6Afd++TTs5szo+zJTUyow3ycrRfJVE2pq3vcN53XexvKZu/DJMDfeI/qMiZTrjTw==", + "requires": { + "define-properties": "^1.1.3", + "function-bind": "^1.1.1" + } + }, + "string.prototype.trimright": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/string.prototype.trimright/-/string.prototype.trimright-2.1.0.tgz", + "integrity": "sha512-fXZTSV55dNBwv16uw+hh5jkghxSnc5oHq+5K/gXgizHwAvMetdAJlHqqoFC1FSDVPYWLkAKl2cxpUT41sV7nSg==", + "requires": { + "define-properties": "^1.1.3", + "function-bind": "^1.1.1" + } + }, "string_decoder": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", @@ -1958,9 +2043,9 @@ } }, "styled-components": { - "version": "4.3.2", - "resolved": "https://registry.npmjs.org/styled-components/-/styled-components-4.3.2.tgz", - "integrity": "sha512-NppHzIFavZ3TsIU3R1omtddJ0Bv1+j50AKh3ZWyXHuFvJq1I8qkQ5mZ7uQgD89Y8zJNx2qRo6RqAH1BmoVafHw==", + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/styled-components/-/styled-components-4.4.1.tgz", + "integrity": "sha512-RNqj14kYzw++6Sr38n7197xG33ipEOktGElty4I70IKzQF1jzaD1U4xQ+Ny/i03UUhHlC5NWEO+d8olRCDji6g==", "requires": { "@babel/helper-module-imports": "^7.0.0", "@babel/traverse": "^7.0.0", @@ -2045,11 +2130,6 @@ "resolved": "https://registry.npmjs.org/trim/-/trim-0.0.1.tgz", "integrity": "sha1-WFhUf2spB1fulczMZm+1AITEYN0=" }, - "trim-right": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/trim-right/-/trim-right-1.0.1.tgz", - "integrity": "sha1-yy4SAwZ+DI3h9hQJS5/kVwTqYAM=" - }, "trim-trailing-lines": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/trim-trailing-lines/-/trim-trailing-lines-1.1.2.tgz", @@ -2105,9 +2185,9 @@ "integrity": "sha512-sVZZX3+kspVNmLWBPAB6r+7D9ZgAFPNWm66f7YNb420RlQSbn+n8rG8dGZSkrER7ZIXGQYNm5pqC3v3HopH24A==" }, "unist-util-remove-position": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/unist-util-remove-position/-/unist-util-remove-position-1.1.3.tgz", - "integrity": "sha512-CtszTlOjP2sBGYc2zcKA/CvNdTdEs3ozbiJ63IPBxh8iZg42SCCb8m04f8z2+V1aSk5a7BxbZKEdoDjadmBkWA==", + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/unist-util-remove-position/-/unist-util-remove-position-1.1.4.tgz", + "integrity": "sha512-tLqd653ArxJIPnKII6LMZwH+mb5q+n/GtXQZo6S6csPRs5zB0u79Yw8ouR3wTw8wxvdJFhpP6Y7jorWdCgLO0A==", "requires": { "unist-util-visit": "^1.1.0" } @@ -2147,10 +2227,19 @@ "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" }, + "util.promisify": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/util.promisify/-/util.promisify-1.0.0.tgz", + "integrity": "sha512-i+6qA2MPhvoKLuxnJNpXAGhg7HphQOSUq2LKMZD0m15EiskXUkMvKdF4Uui0WYeCUGea+o2cw/ZuwehtfsrNkA==", + "requires": { + "define-properties": "^1.1.2", + "object.getownpropertydescriptors": "^2.0.3" + } + }, "uuid": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.2.tgz", - "integrity": "sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA==" + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.3.tgz", + "integrity": "sha512-pW0No1RGHgzlpHJO1nsVrHKpOEIxkGg1xB+v0ZmdNH5OAeAwzAVrCnI2/6Mtx+Uys6iaylxa+D3g4j63IKKjSQ==" }, "vfile": { "version": "2.3.0", @@ -2164,9 +2253,9 @@ } }, "vfile-location": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/vfile-location/-/vfile-location-2.0.5.tgz", - "integrity": "sha512-Pa1ey0OzYBkLPxPZI3d9E+S4BmvfVwNAAXrrqGbwTVXWaX2p9kM1zZ+n35UtVM06shmWKH4RPRN8KI80qE3wNQ==" + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/vfile-location/-/vfile-location-2.0.6.tgz", + "integrity": "sha512-sSFdyCP3G6Ka0CEmN83A2YCMKIieHx0EDaj5IDP4g1pa5ZJ4FJDvpO0WODLxo4LUX4oe52gmSCK7Jw4SBghqxA==" }, "vfile-message": { "version": "1.1.1", @@ -2213,23 +2302,24 @@ "integrity": "sha1-R0tQhlrzpJqcRlfwWs0UVFj3fYI=" }, "xml2js": { - "version": "0.4.19", - "resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.4.19.tgz", - "integrity": "sha512-esZnJZJOiJR9wWKMyuvSE1y6Dq5LCuJanqhxslH2bxM6duahNZ+HMpCLhBQGZkbX6xRf8x1Y2eJlgt2q3qo49Q==", + "version": "0.4.22", + "resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.4.22.tgz", + "integrity": "sha512-MWTbxAQqclRSTnehWWe5nMKzI3VmJ8ltiJEco8akcC6j3miOhjjfzKum5sId+CWhfxdOs/1xauYr8/ZDBtQiRw==", "requires": { "sax": ">=0.6.0", - "xmlbuilder": "~9.0.1" + "util.promisify": "~1.0.0", + "xmlbuilder": "~11.0.0" } }, "xmlbuilder": { - "version": "9.0.7", - "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-9.0.7.tgz", - "integrity": "sha1-Ey7mPS7FVlxVfiD0wi35rKaGsQ0=" + "version": "11.0.1", + "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-11.0.1.tgz", + "integrity": "sha512-fDlsI/kFEx7gLvbecc0/ohLG50fugQp8ryHzMTuW9vSa1GJ0XYWKnhsUx7oie3G98+r56aTQIUB4kht42R3JvA==" }, "xtend": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz", - "integrity": "sha1-pcbVMr5lbiPbgg77lDofBJmNY68=" + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", + "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==" }, "yauzl": { "version": "2.4.1", diff --git a/tools/tests/apps/modules/package.json b/tools/tests/apps/modules/package.json index 80206d0fdb..829386afca 100644 --- a/tools/tests/apps/modules/package.json +++ b/tools/tests/apps/modules/package.json @@ -4,10 +4,9 @@ "description": "Test app exercising many aspects of the Meteor module system.", "private": true, "dependencies": { - "@babel/core": "^7.5.0", - "@babel/plugin-proposal-do-expressions": "^7.5.0", - "@babel/plugin-proposal-optional-chaining": "^7.2.0", - "@babel/runtime": "^7.5.0", + "@babel/core": "^7.7.2", + "@babel/plugin-proposal-do-expressions": "^7.6.0", + "@babel/runtime": "^7.7.2", "@polymer/lit-element": "0.7.1", "@wry/context": "^0.4.0", "acorn": "file:imports/links/acorn", From 407b2d17cba10d4f7f54d3fb804d558623f7ad35 Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Thu, 14 Nov 2019 17:34:29 -0500 Subject: [PATCH 295/327] Remove eslint and pre-commit hook to fix npm security warnings. --- scripts/admin/eslint/.eslintrc | 154 --- scripts/admin/eslint/.gitignore | 1 - scripts/admin/eslint/eslint.sh | 28 - scripts/admin/eslint/package-lock.json | 1370 ------------------------ scripts/admin/eslint/package.json | 12 - scripts/admin/git-hooks/pre-commit | 26 - tools/cli/main.js | 7 - tools/tool-env/install-git-hooks.js | 106 -- 8 files changed, 1704 deletions(-) delete mode 100644 scripts/admin/eslint/.eslintrc delete mode 100644 scripts/admin/eslint/.gitignore delete mode 100755 scripts/admin/eslint/eslint.sh delete mode 100644 scripts/admin/eslint/package-lock.json delete mode 100644 scripts/admin/eslint/package.json delete mode 100755 scripts/admin/git-hooks/pre-commit delete mode 100644 tools/tool-env/install-git-hooks.js diff --git a/scripts/admin/eslint/.eslintrc b/scripts/admin/eslint/.eslintrc deleted file mode 100644 index a93a42d2db..0000000000 --- a/scripts/admin/eslint/.eslintrc +++ /dev/null @@ -1,154 +0,0 @@ -{ - "parser": "babel-eslint", - "env": { - "browser": true, - "node": true - }, - "rules": { -/** - * Strict mode - */ - // babel inserts "use strict"; for us - // http://eslint.org/docs/rules/strict - "strict": [2, "never"], - -/** - * ES6 - */ - "no-var": 2, // http://eslint.org/docs/rules/no-var - -/** - * Variables - */ - "no-shadow": 2, // http://eslint.org/docs/rules/no-shadow - "no-shadow-restricted-names": 2, // http://eslint.org/docs/rules/no-shadow-restricted-names - "no-unused-vars": [2, { // http://eslint.org/docs/rules/no-unused-vars - "vars": "local", - "args": "after-used" - }], - "no-use-before-define": [2, "nofunc"], // http://eslint.org/docs/rules/no-use-before-define - -/** - * Possible errors - */ - "comma-dangle": [1, "always-multiline"], // http://eslint.org/docs/rules/comma-dangle - "no-cond-assign": [2, "always"], // http://eslint.org/docs/rules/no-cond-assign - "no-console": 1, // http://eslint.org/docs/rules/no-console - "no-debugger": 1, // http://eslint.org/docs/rules/no-debugger - "no-alert": 1, // http://eslint.org/docs/rules/no-alert - "no-constant-condition": 1, // http://eslint.org/docs/rules/no-constant-condition - "no-dupe-keys": 2, // http://eslint.org/docs/rules/no-dupe-keys - "no-duplicate-case": 2, // http://eslint.org/docs/rules/no-duplicate-case - "no-empty": 2, // http://eslint.org/docs/rules/no-empty - "no-ex-assign": 2, // http://eslint.org/docs/rules/no-ex-assign - "no-extra-boolean-cast": 0, // http://eslint.org/docs/rules/no-extra-boolean-cast - "no-extra-semi": 2, // http://eslint.org/docs/rules/no-extra-semi - "no-func-assign": 2, // http://eslint.org/docs/rules/no-func-assign - "no-inner-declarations": 2, // http://eslint.org/docs/rules/no-inner-declarations - "no-invalid-regexp": 2, // http://eslint.org/docs/rules/no-invalid-regexp - "no-irregular-whitespace": 2, // http://eslint.org/docs/rules/no-irregular-whitespace - "no-obj-calls": 2, // http://eslint.org/docs/rules/no-obj-calls - "no-reserved-keys": 2, // http://eslint.org/docs/rules/no-reserved-keys - "no-sparse-arrays": 2, // http://eslint.org/docs/rules/no-sparse-arrays - "no-unreachable": 2, // http://eslint.org/docs/rules/no-unreachable - "use-isnan": 2, // http://eslint.org/docs/rules/use-isnan - "block-scoped-var": 0, // http://eslint.org/docs/rules/block-scoped-var - -/** - * Best practices - */ - "consistent-return": 2, // http://eslint.org/docs/rules/consistent-return - "curly": [2, "multi-line"], // http://eslint.org/docs/rules/curly - "default-case": 2, // http://eslint.org/docs/rules/default-case - "dot-notation": [2, { // http://eslint.org/docs/rules/dot-notation - "allowKeywords": true - }], - "eqeqeq": 2, // http://eslint.org/docs/rules/eqeqeq - "guard-for-in": 2, // http://eslint.org/docs/rules/guard-for-in - "no-caller": 2, // http://eslint.org/docs/rules/no-caller - "no-else-return": 2, // http://eslint.org/docs/rules/no-else-return - "no-eq-null": 2, // http://eslint.org/docs/rules/no-eq-null - "no-eval": 2, // http://eslint.org/docs/rules/no-eval - "no-extend-native": 2, // http://eslint.org/docs/rules/no-extend-native - "no-extra-bind": 2, // http://eslint.org/docs/rules/no-extra-bind - "no-fallthrough": 2, // http://eslint.org/docs/rules/no-fallthrough - "no-floating-decimal": 2, // http://eslint.org/docs/rules/no-floating-decimal - "no-implied-eval": 2, // http://eslint.org/docs/rules/no-implied-eval - "no-lone-blocks": 2, // http://eslint.org/docs/rules/no-lone-blocks - "no-loop-func": 2, // http://eslint.org/docs/rules/no-loop-func - "no-multi-str": 2, // http://eslint.org/docs/rules/no-multi-str - "no-native-reassign": 2, // http://eslint.org/docs/rules/no-native-reassign - "no-new": 2, // http://eslint.org/docs/rules/no-new - "no-new-func": 2, // http://eslint.org/docs/rules/no-new-func - "no-new-wrappers": 2, // http://eslint.org/docs/rules/no-new-wrappers - "no-octal": 2, // http://eslint.org/docs/rules/no-octal - "no-octal-escape": 2, // http://eslint.org/docs/rules/no-octal-escape - "no-param-reassign": 2, // http://eslint.org/docs/rules/no-param-reassign - "no-proto": 2, // http://eslint.org/docs/rules/no-proto - "no-redeclare": 2, // http://eslint.org/docs/rules/no-redeclare - "no-return-assign": 2, // http://eslint.org/docs/rules/no-return-assign - "no-script-url": 2, // http://eslint.org/docs/rules/no-script-url - "no-self-compare": 2, // http://eslint.org/docs/rules/no-self-compare - "no-sequences": 2, // http://eslint.org/docs/rules/no-sequences - "no-throw-literal": 2, // http://eslint.org/docs/rules/no-throw-literal - "no-with": 2, // http://eslint.org/docs/rules/no-with - "radix": 2, // http://eslint.org/docs/rules/radix - "vars-on-top": 2, // http://eslint.org/docs/rules/vars-on-top - "wrap-iife": [2, "any"], // http://eslint.org/docs/rules/wrap-iife - "yoda": 2, // http://eslint.org/docs/rules/yoda - "max-len": [2, 80, 2], // http://eslint.org/docs/rules/max-len - -/** - * Style - */ - "indent": [2, 2], // http://eslint.org/docs/rules/indent - "brace-style": [2, // http://eslint.org/docs/rules/brace-style - "1tbs", { - "allowSingleLine": true - }], - "quotes": [ - 2, "single", "avoid-escape" // http://eslint.org/docs/rules/quotes - ], - "camelcase": [2, { // http://eslint.org/docs/rules/camelcase - "properties": "never" - }], - "comma-spacing": [2, { // http://eslint.org/docs/rules/comma-spacing - "before": false, - "after": true - }], - "comma-style": [2, "last"], // http://eslint.org/docs/rules/comma-style - "eol-last": 2, // http://eslint.org/docs/rules/eol-last - "func-names": 1, // http://eslint.org/docs/rules/func-names - "func-style": [2, "declaration"], // http://eslint.org/docs/rules/func-style - "key-spacing": [2, { // http://eslint.org/docs/rules/key-spacing - "beforeColon": false, - "afterColon": true - }], - "new-cap": [2, { // http://eslint.org/docs/rules/new-cap - "newIsCap": true - }], - "no-multiple-empty-lines": [2, { // http://eslint.org/docs/rules/no-multiple-empty-lines - "max": 2 - }], - "no-nested-ternary": 2, // http://eslint.org/docs/rules/no-nested-ternary - "no-new-object": 2, // http://eslint.org/docs/rules/no-new-object - "no-array-constructor": 2, // http://eslint.org/docs/rules/no-array-constructor - "no-spaced-func": 2, // http://eslint.org/docs/rules/no-spaced-func - "no-trailing-spaces": 2, // http://eslint.org/docs/rules/no-trailing-spaces - "no-wrap-func": 2, // http://eslint.org/docs/rules/no-wrap-func - "no-underscore-dangle": 0, // http://eslint.org/docs/rules/no-underscore-dangle - "one-var": [2, "never"], // http://eslint.org/docs/rules/one-var - "padded-blocks": [2, "never"], // http://eslint.org/docs/rules/padded-blocks - "semi": [2, "always"], // http://eslint.org/docs/rules/semi - "semi-spacing": [2, { // http://eslint.org/docs/rules/semi-spacing - "before": false, - "after": true - }], - "space-after-keywords": 2, // http://eslint.org/docs/rules/space-after-keywords - "space-before-blocks": 2, // http://eslint.org/docs/rules/space-before-blocks - "space-before-function-paren": [2, "never"], // http://eslint.org/docs/rules/space-before-function-paren - "space-infix-ops": 2, // http://eslint.org/docs/rules/space-infix-ops - "space-return-throw-case": 2, // http://eslint.org/docs/rules/space-return-throw-case - "spaced-line-comment": 2, // http://eslint.org/docs/rules/spaced-line-comment - } -} diff --git a/scripts/admin/eslint/.gitignore b/scripts/admin/eslint/.gitignore deleted file mode 100644 index 3c3629e647..0000000000 --- a/scripts/admin/eslint/.gitignore +++ /dev/null @@ -1 +0,0 @@ -node_modules diff --git a/scripts/admin/eslint/eslint.sh b/scripts/admin/eslint/eslint.sh deleted file mode 100755 index d4d451561f..0000000000 --- a/scripts/admin/eslint/eslint.sh +++ /dev/null @@ -1,28 +0,0 @@ -#!/usr/bin/env bash - -ORIGDIR=$(pwd) -cd $(dirname $0) -SCRIPTDIR=$(pwd) -cd ../../.. -TOPDIR=$(pwd) - -INFINITY=10000 - -cd "$SCRIPTDIR" -${TOPDIR}/dev_bundle/bin/npm install - -cd "$TOPDIR" - -files_to_lint="." -if [ "$1" == "modified" ]; then - files_to_lint=$(git diff --cached --name-only --diff-filter=ACM \ - | grep '\.js$') -fi - -if [ -n "$files_to_lint" ]; then - "${TOPDIR}/dev_bundle/bin/node" \ - "${SCRIPTDIR}/node_modules/.bin/eslint" \ - --quiet \ - -c "${SCRIPTDIR}/.eslintrc" \ - $files_to_lint -fi diff --git a/scripts/admin/eslint/package-lock.json b/scripts/admin/eslint/package-lock.json deleted file mode 100644 index 6161617ace..0000000000 --- a/scripts/admin/eslint/package-lock.json +++ /dev/null @@ -1,1370 +0,0 @@ -{ - "name": "meteor-jsdoc", - "version": "0.0.0", - "lockfileVersion": 1, - "requires": true, - "dependencies": { - "acorn": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-5.7.1.tgz", - "integrity": "sha512-d+nbxBUGKg7Arpsvbnlq61mc12ek3EY8EQldM3GPAhWJ1UVxC6TDGbIvUMNU6obBX3i1+ptCIzV4vq0gFPEGVQ==" - }, - "acorn-jsx": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-4.1.1.tgz", - "integrity": "sha512-JY+iV6r+cO21KtntVvFkD+iqjtdpRUpGqKWgfkCdZq1R+kbreEl8EcdcJR4SmiIgsIQT33s6QzheQ9a275Q8xw==", - "requires": { - "acorn": "^5.0.3" - } - }, - "acorn-to-esprima": { - "version": "2.0.8", - "resolved": "https://registry.npmjs.org/acorn-to-esprima/-/acorn-to-esprima-2.0.8.tgz", - "integrity": "sha1-AD8MZC65ITL0F9NwjxStqCrfLrE=" - }, - "ajv": { - "version": "6.5.2", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.5.2.tgz", - "integrity": "sha512-hOs7GfvI6tUI1LfZddH82ky6mOMyTuY0mk7kE2pWpmhhUSkumzaTO5vbVwij39MdwPQWCV4Zv57Eo06NtL/GVA==", - "requires": { - "fast-deep-equal": "^2.0.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.1" - } - }, - "ajv-keywords": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.2.0.tgz", - "integrity": "sha1-6GuBnGAs+IIa1jdBNpjx3sAhhHo=" - }, - "ansi-escapes": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-3.1.0.tgz", - "integrity": "sha512-UgAb8H9D41AQnu/PbWlCofQVcnV4Gs2bBJi9eZPxfU/hgglFh3SMDMENRIqdr7H6XFnXdoknctFByVsCOotTVw==" - }, - "ansi-regex": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=" - }, - "ansi-styles": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", - "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=" - }, - "argparse": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", - "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", - "requires": { - "sprintf-js": "~1.0.2" - } - }, - "array-union": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/array-union/-/array-union-1.0.2.tgz", - "integrity": "sha1-mjRBDk9OPaI96jdb5b5w8kd47Dk=", - "requires": { - "array-uniq": "^1.0.1" - } - }, - "array-uniq": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/array-uniq/-/array-uniq-1.0.3.tgz", - "integrity": "sha1-r2rId6Jcx/dOBYiUdThY39sk/bY=" - }, - "arrify": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz", - "integrity": "sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0=" - }, - "babel-code-frame": { - "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-code-frame/-/babel-code-frame-6.26.0.tgz", - "integrity": "sha1-Y/1D99weO7fONZR9uP42mj9Yx0s=", - "requires": { - "chalk": "^1.1.3", - "esutils": "^2.0.2", - "js-tokens": "^3.0.2" - } - }, - "babel-eslint": { - "version": "4.1.7", - "resolved": "https://registry.npmjs.org/babel-eslint/-/babel-eslint-4.1.7.tgz", - "integrity": "sha1-eSv6d/JwmvbyCtT3lswtzwtxMWU=", - "requires": { - "acorn-to-esprima": "^2.0.4", - "babel-traverse": "^6.0.20", - "babel-types": "^6.0.19", - "babylon": "^6.0.18", - "lodash.assign": "^3.2.0", - "lodash.pick": "^3.1.0" - } - }, - "babel-messages": { - "version": "6.23.0", - "resolved": "https://registry.npmjs.org/babel-messages/-/babel-messages-6.23.0.tgz", - "integrity": "sha1-8830cDhYA1sqKVHG7F7fbGLyYw4=", - "requires": { - "babel-runtime": "^6.22.0" - } - }, - "babel-runtime": { - "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-runtime/-/babel-runtime-6.26.0.tgz", - "integrity": "sha1-llxwWGaOgrVde/4E/yM3vItWR/4=", - "requires": { - "core-js": "^2.4.0", - "regenerator-runtime": "^0.11.0" - } - }, - "babel-traverse": { - "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-traverse/-/babel-traverse-6.26.0.tgz", - "integrity": "sha1-RqnL1+3MYsjlwGTi0tjQ9ANXZu4=", - "requires": { - "babel-code-frame": "^6.26.0", - "babel-messages": "^6.23.0", - "babel-runtime": "^6.26.0", - "babel-types": "^6.26.0", - "babylon": "^6.18.0", - "debug": "^2.6.8", - "globals": "^9.18.0", - "invariant": "^2.2.2", - "lodash": "^4.17.4" - } - }, - "babel-types": { - "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-types/-/babel-types-6.26.0.tgz", - "integrity": "sha1-o7Bz+Uq0nrb6Vc1lInozQ4BjJJc=", - "requires": { - "babel-runtime": "^6.26.0", - "esutils": "^2.0.2", - "lodash": "^4.17.4", - "to-fast-properties": "^1.0.3" - } - }, - "babylon": { - "version": "6.18.0", - "resolved": "https://registry.npmjs.org/babylon/-/babylon-6.18.0.tgz", - "integrity": "sha512-q/UEjfGJ2Cm3oKV71DJz9d25TPnq5rhBVL2Q4fA5wcC3jcrdn7+SssEybFIxwAvvP+YCsCYNKughoF33GxgycQ==" - }, - "balanced-match": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", - "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=" - }, - "brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "requires": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "caller-path": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/caller-path/-/caller-path-0.1.0.tgz", - "integrity": "sha1-lAhe9jWB7NPaqSREqP6U6CV3dR8=", - "requires": { - "callsites": "^0.2.0" - } - }, - "callsites": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/callsites/-/callsites-0.2.0.tgz", - "integrity": "sha1-r6uWJikQp/M8GaV3WCXGnzTjUMo=" - }, - "chalk": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", - "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", - "requires": { - "ansi-styles": "^2.2.1", - "escape-string-regexp": "^1.0.2", - "has-ansi": "^2.0.0", - "strip-ansi": "^3.0.0", - "supports-color": "^2.0.0" - } - }, - "chardet": { - "version": "0.4.2", - "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.4.2.tgz", - "integrity": "sha1-tUc7M9yXxCTl2Y3IfVXU2KKci/I=" - }, - "circular-json": { - "version": "0.3.3", - "resolved": "https://registry.npmjs.org/circular-json/-/circular-json-0.3.3.tgz", - "integrity": "sha512-UZK3NBx2Mca+b5LsG7bY183pHWt5Y1xts4P3Pz7ENTwGVnJOUWbRb3ocjvX7hx9tq/yTAdclXm9sZ38gNuem4A==" - }, - "cli-cursor": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-2.1.0.tgz", - "integrity": "sha1-s12sN2R5+sw+lHR9QdDQ9SOP/LU=", - "requires": { - "restore-cursor": "^2.0.0" - } - }, - "cli-width": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-2.2.0.tgz", - "integrity": "sha1-/xnt6Kml5XkyQUewwR8PvLq+1jk=" - }, - "color-convert": { - "version": "1.9.2", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.2.tgz", - "integrity": "sha512-3NUJZdhMhcdPn8vJ9v2UQJoH0qqoGUkYTgFEPZaPjEtwmmKUfNV46zZmgB2M5M4DCEQHMaCfWHCxiBflLm04Tg==", - "requires": { - "color-name": "1.1.1" - } - }, - "color-name": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.1.tgz", - "integrity": "sha1-SxQVMEz1ACjqgWQ2Q72C6gWANok=" - }, - "concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" - }, - "core-js": { - "version": "2.5.7", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.5.7.tgz", - "integrity": "sha512-RszJCAxg/PP6uzXVXL6BsxSXx/B05oJAQ2vkJRjyjrEcNVycaqOmNb5OTxZPE3xa5gwZduqza6L9JOCenh/Ecw==" - }, - "cross-spawn": { - "version": "6.0.5", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", - "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", - "requires": { - "nice-try": "^1.0.4", - "path-key": "^2.0.1", - "semver": "^5.5.0", - "shebang-command": "^1.2.0", - "which": "^1.2.9" - } - }, - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "requires": { - "ms": "2.0.0" - } - }, - "deep-is": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz", - "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=" - }, - "define-properties": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.2.tgz", - "integrity": "sha1-g6c/L+pWmJj7c3GTyPhzyvbUXJQ=", - "requires": { - "foreach": "^2.0.5", - "object-keys": "^1.0.8" - } - }, - "del": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/del/-/del-2.2.2.tgz", - "integrity": "sha1-wSyYHQZ4RshLyvhiz/kw2Qf/0ag=", - "requires": { - "globby": "^5.0.0", - "is-path-cwd": "^1.0.0", - "is-path-in-cwd": "^1.0.0", - "object-assign": "^4.0.1", - "pify": "^2.0.0", - "pinkie-promise": "^2.0.0", - "rimraf": "^2.2.8" - } - }, - "doctrine": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz", - "integrity": "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==", - "requires": { - "esutils": "^2.0.2" - } - }, - "es-abstract": { - "version": "1.12.0", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.12.0.tgz", - "integrity": "sha512-C8Fx/0jFmV5IPoMOFPA9P9G5NtqW+4cOPit3MIuvR2t7Ag2K15EJTpxnHAYTzL+aYQJIESYeXZmDBfOBE1HcpA==", - "requires": { - "es-to-primitive": "^1.1.1", - "function-bind": "^1.1.1", - "has": "^1.0.1", - "is-callable": "^1.1.3", - "is-regex": "^1.0.4" - } - }, - "es-to-primitive": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.1.1.tgz", - "integrity": "sha1-RTVSSKiJeQNLZ5Lhm7gfK3l13Q0=", - "requires": { - "is-callable": "^1.1.1", - "is-date-object": "^1.0.1", - "is-symbol": "^1.0.1" - } - }, - "escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=" - }, - "eslint": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-5.3.0.tgz", - "integrity": "sha512-N/tCqlMKkyNvAvLu+zI9AqDasnSLt00K+Hu8kdsERliC9jYEc8ck12XtjvOXrBKu8fK6RrBcN9bat6Xk++9jAg==", - "requires": { - "ajv": "^6.5.0", - "babel-code-frame": "^6.26.0", - "chalk": "^2.1.0", - "cross-spawn": "^6.0.5", - "debug": "^3.1.0", - "doctrine": "^2.1.0", - "eslint-scope": "^4.0.0", - "eslint-utils": "^1.3.1", - "eslint-visitor-keys": "^1.0.0", - "espree": "^4.0.0", - "esquery": "^1.0.1", - "esutils": "^2.0.2", - "file-entry-cache": "^2.0.0", - "functional-red-black-tree": "^1.0.1", - "glob": "^7.1.2", - "globals": "^11.7.0", - "ignore": "^4.0.2", - "imurmurhash": "^0.1.4", - "inquirer": "^5.2.0", - "is-resolvable": "^1.1.0", - "js-yaml": "^3.11.0", - "json-stable-stringify-without-jsonify": "^1.0.1", - "levn": "^0.3.0", - "lodash": "^4.17.5", - "minimatch": "^3.0.4", - "mkdirp": "^0.5.1", - "natural-compare": "^1.4.0", - "optionator": "^0.8.2", - "path-is-inside": "^1.0.2", - "pluralize": "^7.0.0", - "progress": "^2.0.0", - "regexpp": "^2.0.0", - "require-uncached": "^1.0.3", - "semver": "^5.5.0", - "string.prototype.matchall": "^2.0.0", - "strip-ansi": "^4.0.0", - "strip-json-comments": "^2.0.1", - "table": "^4.0.3", - "text-table": "^0.2.0" - }, - "dependencies": { - "ansi-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", - "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=" - }, - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "requires": { - "color-convert": "^1.9.0" - } - }, - "chalk": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz", - "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } - }, - "debug": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", - "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", - "requires": { - "ms": "2.0.0" - } - }, - "globals": { - "version": "11.7.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-11.7.0.tgz", - "integrity": "sha512-K8BNSPySfeShBQXsahYB/AbbWruVOTyVpgoIDnl8odPpeSfP2J5QO2oLFFdl2j7GfDCtZj2bMKar2T49itTPCg==" - }, - "strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", - "requires": { - "ansi-regex": "^3.0.0" - } - }, - "supports-color": { - "version": "5.4.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.4.0.tgz", - "integrity": "sha512-zjaXglF5nnWpsq470jSv6P9DwPvgLkuapYmfDm3JWOm0vkNTVF2tI4UrN2r6jH1qM/uc/WtxYY1hYoA2dOKj5w==", - "requires": { - "has-flag": "^3.0.0" - } - } - } - }, - "eslint-plugin-react": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-2.5.0.tgz", - "integrity": "sha1-b2DLrW/6HcTl2TkZtaHtZ1IubLc=" - }, - "eslint-scope": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-4.0.0.tgz", - "integrity": "sha512-1G6UTDi7Jc1ELFwnR58HV4fK9OQK4S6N985f166xqXxpjU6plxFISJa2Ba9KCQuFa8RCnj/lSFJbHo7UFDBnUA==", - "requires": { - "esrecurse": "^4.1.0", - "estraverse": "^4.1.1" - } - }, - "eslint-utils": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-1.3.1.tgz", - "integrity": "sha512-Z7YjnIldX+2XMcjr7ZkgEsOj/bREONV60qYeB/bjMAqqqZ4zxKyWX+BOUkdmRmA9riiIPVvo5x86m5elviOk0Q==" - }, - "eslint-visitor-keys": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.0.0.tgz", - "integrity": "sha512-qzm/XxIbxm/FHyH341ZrbnMUpe+5Bocte9xkmFMzPMjRaZMcXww+MpBptFvtU+79L362nqiLhekCxCxDPaUMBQ==" - }, - "espree": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/espree/-/espree-4.0.0.tgz", - "integrity": "sha512-kapdTCt1bjmspxStVKX6huolXVV5ZfyZguY1lcfhVVZstce3bqxH9mcLzNn3/mlgW6wQ732+0fuG9v7h0ZQoKg==", - "requires": { - "acorn": "^5.6.0", - "acorn-jsx": "^4.1.1" - } - }, - "esprima": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", - "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==" - }, - "esquery": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.0.1.tgz", - "integrity": "sha512-SmiyZ5zIWH9VM+SRUReLS5Q8a7GxtRdxEBVZpm98rJM7Sb+A9DVCndXfkeFUd3byderg+EbDkfnevfCwynWaNA==", - "requires": { - "estraverse": "^4.0.0" - } - }, - "esrecurse": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.2.1.tgz", - "integrity": "sha512-64RBB++fIOAXPw3P9cy89qfMlvZEXZkqqJkjqqXIvzP5ezRZjW+lPWjw35UX/3EhUPFYbg5ER4JYgDw4007/DQ==", - "requires": { - "estraverse": "^4.1.0" - } - }, - "estraverse": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.2.0.tgz", - "integrity": "sha1-De4/7TH81GlhjOc0IJn8GvoL2xM=" - }, - "esutils": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.2.tgz", - "integrity": "sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs=" - }, - "external-editor": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-2.2.0.tgz", - "integrity": "sha512-bSn6gvGxKt+b7+6TKEv1ZycHleA7aHhRHyAqJyp5pbUFuYYNIzpZnQDk7AsYckyWdEnTeAnay0aCy2aV6iTk9A==", - "requires": { - "chardet": "^0.4.0", - "iconv-lite": "^0.4.17", - "tmp": "^0.0.33" - } - }, - "fast-deep-equal": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz", - "integrity": "sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk=" - }, - "fast-json-stable-stringify": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz", - "integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I=" - }, - "fast-levenshtein": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", - "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=" - }, - "figures": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/figures/-/figures-2.0.0.tgz", - "integrity": "sha1-OrGi0qYsi/tDGgyUy3l6L84nyWI=", - "requires": { - "escape-string-regexp": "^1.0.5" - } - }, - "file-entry-cache": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-2.0.0.tgz", - "integrity": "sha1-w5KZDD5oR4PYOLjISkXYoEhFg2E=", - "requires": { - "flat-cache": "^1.2.1", - "object-assign": "^4.0.1" - } - }, - "flat-cache": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-1.3.0.tgz", - "integrity": "sha1-0wMLMrOBVPTjt+nHCfSQ9++XxIE=", - "requires": { - "circular-json": "^0.3.1", - "del": "^2.0.2", - "graceful-fs": "^4.1.2", - "write": "^0.2.1" - } - }, - "foreach": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/foreach/-/foreach-2.0.5.tgz", - "integrity": "sha1-C+4AUBiusmDQo6865ljdATbsG5k=" - }, - "fs.realpath": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" - }, - "function-bind": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", - "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==" - }, - "functional-red-black-tree": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", - "integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=" - }, - "glob": { - "version": "7.1.2", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz", - "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==", - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - }, - "globals": { - "version": "9.18.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-9.18.0.tgz", - "integrity": "sha512-S0nG3CLEQiY/ILxqtztTWH/3iRRdyBLw6KMDxnKMchrtbj2OFmehVh0WUCfW3DUrIgx/qFrJPICrq4Z4sTR9UQ==" - }, - "globby": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/globby/-/globby-5.0.0.tgz", - "integrity": "sha1-69hGZ8oNuzMLmbz8aOrCvFQ3Dg0=", - "requires": { - "array-union": "^1.0.1", - "arrify": "^1.0.0", - "glob": "^7.0.3", - "object-assign": "^4.0.1", - "pify": "^2.0.0", - "pinkie-promise": "^2.0.0" - } - }, - "graceful-fs": { - "version": "4.1.11", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz", - "integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=" - }, - "has": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", - "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", - "requires": { - "function-bind": "^1.1.1" - } - }, - "has-ansi": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", - "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=", - "requires": { - "ansi-regex": "^2.0.0" - } - }, - "has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=" - }, - "has-symbols": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.0.tgz", - "integrity": "sha1-uhqPGvKg/DllD1yFA2dwQSIGO0Q=" - }, - "iconv-lite": { - "version": "0.4.23", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.23.tgz", - "integrity": "sha512-neyTUVFtahjf0mB3dZT77u+8O0QB89jFdnBkd5P1JgYPbPaia3gXXOVL2fq8VyU2gMMD7SaN7QukTB/pmXYvDA==", - "requires": { - "safer-buffer": ">= 2.1.2 < 3" - } - }, - "ignore": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.3.tgz", - "integrity": "sha512-Z/vAH2GGIEATQnBVXMclE2IGV6i0GyVngKThcGZ5kHgHMxLo9Ow2+XHRq1aEKEej5vOF1TPJNbvX6J/anT0M7A==" - }, - "imurmurhash": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", - "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=" - }, - "inflight": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", - "requires": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "inherits": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", - "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" - }, - "inquirer": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-5.2.0.tgz", - "integrity": "sha512-E9BmnJbAKLPGonz0HeWHtbKf+EeSP93paWO3ZYoUpq/aowXvYGjjCSuashhXPpzbArIjBbji39THkxTz9ZeEUQ==", - "requires": { - "ansi-escapes": "^3.0.0", - "chalk": "^2.0.0", - "cli-cursor": "^2.1.0", - "cli-width": "^2.0.0", - "external-editor": "^2.1.0", - "figures": "^2.0.0", - "lodash": "^4.3.0", - "mute-stream": "0.0.7", - "run-async": "^2.2.0", - "rxjs": "^5.5.2", - "string-width": "^2.1.0", - "strip-ansi": "^4.0.0", - "through": "^2.3.6" - }, - "dependencies": { - "ansi-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", - "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=" - }, - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "requires": { - "color-convert": "^1.9.0" - } - }, - "chalk": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz", - "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } - }, - "strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", - "requires": { - "ansi-regex": "^3.0.0" - } - }, - "supports-color": { - "version": "5.4.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.4.0.tgz", - "integrity": "sha512-zjaXglF5nnWpsq470jSv6P9DwPvgLkuapYmfDm3JWOm0vkNTVF2tI4UrN2r6jH1qM/uc/WtxYY1hYoA2dOKj5w==", - "requires": { - "has-flag": "^3.0.0" - } - } - } - }, - "invariant": { - "version": "2.2.4", - "resolved": "https://registry.npmjs.org/invariant/-/invariant-2.2.4.tgz", - "integrity": "sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA==", - "requires": { - "loose-envify": "^1.0.0" - } - }, - "is-callable": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.1.4.tgz", - "integrity": "sha512-r5p9sxJjYnArLjObpjA4xu5EKI3CuKHkJXMhT7kwbpUyIFD1n5PMAsoPvWnvtZiNz7LjkYDRZhd7FlI0eMijEA==" - }, - "is-date-object": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.1.tgz", - "integrity": "sha1-mqIOtq7rv/d/vTPnTKAbM1gdOhY=" - }, - "is-fullwidth-code-point": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=" - }, - "is-path-cwd": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-path-cwd/-/is-path-cwd-1.0.0.tgz", - "integrity": "sha1-0iXsIxMuie3Tj9p2dHLmLmXxEG0=" - }, - "is-path-in-cwd": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-path-in-cwd/-/is-path-in-cwd-1.0.1.tgz", - "integrity": "sha512-FjV1RTW48E7CWM7eE/J2NJvAEEVektecDBVBE5Hh3nM1Jd0kvhHtX68Pr3xsDf857xt3Y4AkwVULK1Vku62aaQ==", - "requires": { - "is-path-inside": "^1.0.0" - } - }, - "is-path-inside": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-1.0.1.tgz", - "integrity": "sha1-jvW33lBDej/cprToZe96pVy0gDY=", - "requires": { - "path-is-inside": "^1.0.1" - } - }, - "is-promise": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-2.1.0.tgz", - "integrity": "sha1-eaKp7OfwlugPNtKy87wWwf9L8/o=" - }, - "is-regex": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.0.4.tgz", - "integrity": "sha1-VRdIm1RwkbCTDglWVM7SXul+lJE=", - "requires": { - "has": "^1.0.1" - } - }, - "is-resolvable": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-resolvable/-/is-resolvable-1.1.0.tgz", - "integrity": "sha512-qgDYXFSR5WvEfuS5dMj6oTMEbrrSaM0CrFk2Yiq/gXnBvD9pMa2jGXxyhGLfvhZpuMZe18CJpFxAt3CRs42NMg==" - }, - "is-symbol": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.1.tgz", - "integrity": "sha1-PMWfAAJRlLarLjjbrmaJJWtmBXI=" - }, - "isexe": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=" - }, - "js-tokens": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-3.0.2.tgz", - "integrity": "sha1-mGbfOVECEw449/mWvOtlRDIJwls=" - }, - "js-yaml": { - "version": "3.12.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.12.0.tgz", - "integrity": "sha512-PIt2cnwmPfL4hKNwqeiuz4bKfnzHTBv6HyVgjahA6mPLwPDzjDWrplJBMjHUFxku/N3FlmrbyPclad+I+4mJ3A==", - "requires": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" - } - }, - "json-schema-traverse": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==" - }, - "json-stable-stringify-without-jsonify": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", - "integrity": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=" - }, - "levn": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", - "integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=", - "requires": { - "prelude-ls": "~1.1.2", - "type-check": "~0.3.2" - } - }, - "lodash": { - "version": "4.17.10", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.10.tgz", - "integrity": "sha512-UejweD1pDoXu+AD825lWwp4ZGtSwgnpZxb3JDViD7StjQz+Nb/6l093lx4OQ0foGWNRoc19mWy7BzL+UAK2iVg==" - }, - "lodash._baseassign": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/lodash._baseassign/-/lodash._baseassign-3.2.0.tgz", - "integrity": "sha1-jDigmVAPIVrQnlnxci/QxSv+Ck4=", - "requires": { - "lodash._basecopy": "^3.0.0", - "lodash.keys": "^3.0.0" - } - }, - "lodash._basecopy": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/lodash._basecopy/-/lodash._basecopy-3.0.1.tgz", - "integrity": "sha1-jaDmqHbPNEwK2KVIghEd08XHyjY=" - }, - "lodash._baseflatten": { - "version": "3.1.4", - "resolved": "https://registry.npmjs.org/lodash._baseflatten/-/lodash._baseflatten-3.1.4.tgz", - "integrity": "sha1-B3D/gBMa9uNPO1EXlqe6UhTmX/c=", - "requires": { - "lodash.isarguments": "^3.0.0", - "lodash.isarray": "^3.0.0" - } - }, - "lodash._basefor": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/lodash._basefor/-/lodash._basefor-3.0.3.tgz", - "integrity": "sha1-dVC06SGO8J+tJDQ7YSAhx5tMIMI=" - }, - "lodash._bindcallback": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/lodash._bindcallback/-/lodash._bindcallback-3.0.1.tgz", - "integrity": "sha1-5THCdkTPi1epnhftlbNcdIeJOS4=" - }, - "lodash._createassigner": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/lodash._createassigner/-/lodash._createassigner-3.1.1.tgz", - "integrity": "sha1-g4pbri/aymOsIt7o4Z+k5taXCxE=", - "requires": { - "lodash._bindcallback": "^3.0.0", - "lodash._isiterateecall": "^3.0.0", - "lodash.restparam": "^3.0.0" - } - }, - "lodash._getnative": { - "version": "3.9.1", - "resolved": "https://registry.npmjs.org/lodash._getnative/-/lodash._getnative-3.9.1.tgz", - "integrity": "sha1-VwvH3t5G1hzc3mh9ZdPuy6o6r/U=" - }, - "lodash._isiterateecall": { - "version": "3.0.9", - "resolved": "https://registry.npmjs.org/lodash._isiterateecall/-/lodash._isiterateecall-3.0.9.tgz", - "integrity": "sha1-UgOte6Ql+uhCRg5pbbnPPmqsBXw=" - }, - "lodash._pickbyarray": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/lodash._pickbyarray/-/lodash._pickbyarray-3.0.2.tgz", - "integrity": "sha1-H4mNlgfrVgsOFnOEt3x8bRCKpMU=" - }, - "lodash._pickbycallback": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/lodash._pickbycallback/-/lodash._pickbycallback-3.0.0.tgz", - "integrity": "sha1-/2G5oBens699MObFPeKK+hm4dQo=", - "requires": { - "lodash._basefor": "^3.0.0", - "lodash.keysin": "^3.0.0" - } - }, - "lodash.assign": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/lodash.assign/-/lodash.assign-3.2.0.tgz", - "integrity": "sha1-POnwI0tLIiPilrj6CsH+6OvKZPo=", - "requires": { - "lodash._baseassign": "^3.0.0", - "lodash._createassigner": "^3.0.0", - "lodash.keys": "^3.0.0" - } - }, - "lodash.isarguments": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/lodash.isarguments/-/lodash.isarguments-3.1.0.tgz", - "integrity": "sha1-L1c9hcaiQon/AGY7SRwdM4/zRYo=" - }, - "lodash.isarray": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/lodash.isarray/-/lodash.isarray-3.0.4.tgz", - "integrity": "sha1-eeTriMNqgSKvhvhEqpvNhRtfu1U=" - }, - "lodash.keys": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/lodash.keys/-/lodash.keys-3.1.2.tgz", - "integrity": "sha1-TbwEcrFWvlCgsoaFXRvQsMZWCYo=", - "requires": { - "lodash._getnative": "^3.0.0", - "lodash.isarguments": "^3.0.0", - "lodash.isarray": "^3.0.0" - } - }, - "lodash.keysin": { - "version": "3.0.8", - "resolved": "https://registry.npmjs.org/lodash.keysin/-/lodash.keysin-3.0.8.tgz", - "integrity": "sha1-IsRJPrvtsUJ5YqVLRFssinZ/tH8=", - "requires": { - "lodash.isarguments": "^3.0.0", - "lodash.isarray": "^3.0.0" - } - }, - "lodash.pick": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/lodash.pick/-/lodash.pick-3.1.0.tgz", - "integrity": "sha1-8lKoVbIEa2G805BLJvdr0u/GVVA=", - "requires": { - "lodash._baseflatten": "^3.0.0", - "lodash._bindcallback": "^3.0.0", - "lodash._pickbyarray": "^3.0.0", - "lodash._pickbycallback": "^3.0.0", - "lodash.restparam": "^3.0.0" - } - }, - "lodash.restparam": { - "version": "3.6.1", - "resolved": "https://registry.npmjs.org/lodash.restparam/-/lodash.restparam-3.6.1.tgz", - "integrity": "sha1-k2pOMJ7zMKdkXtQUWYbIWuWyCAU=" - }, - "loose-envify": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", - "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", - "requires": { - "js-tokens": "^3.0.0 || ^4.0.0" - } - }, - "mimic-fn": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-1.2.0.tgz", - "integrity": "sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ==" - }, - "minimatch": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", - "requires": { - "brace-expansion": "^1.1.7" - } - }, - "minimist": { - "version": "0.0.8", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", - "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=" - }, - "mkdirp": { - "version": "0.5.1", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", - "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", - "requires": { - "minimist": "0.0.8" - } - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" - }, - "mute-stream": { - "version": "0.0.7", - "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.7.tgz", - "integrity": "sha1-MHXOk7whuPq0PhvE2n6BFe0ee6s=" - }, - "natural-compare": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", - "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=" - }, - "nice-try": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.4.tgz", - "integrity": "sha512-2NpiFHqC87y/zFke0fC0spBXL3bBsoh/p5H1EFhshxjCR5+0g2d6BiXbUFz9v1sAcxsk2htp2eQnNIci2dIYcA==" - }, - "object-assign": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", - "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=" - }, - "object-keys": { - "version": "1.0.12", - "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.0.12.tgz", - "integrity": "sha512-FTMyFUm2wBcGHnH2eXmz7tC6IwlqQZ6mVZ+6dm6vZ4IQIHjs6FdNsQBuKGPuUUUY6NfJw2PshC08Tn6LzLDOag==" - }, - "once": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", - "requires": { - "wrappy": "1" - } - }, - "onetime": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/onetime/-/onetime-2.0.1.tgz", - "integrity": "sha1-BnQoIw/WdEOyeUsiu6UotoZ5YtQ=", - "requires": { - "mimic-fn": "^1.0.0" - } - }, - "optionator": { - "version": "0.8.2", - "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.2.tgz", - "integrity": "sha1-NkxeQJ0/TWMB1sC0wFu6UBgK62Q=", - "requires": { - "deep-is": "~0.1.3", - "fast-levenshtein": "~2.0.4", - "levn": "~0.3.0", - "prelude-ls": "~1.1.2", - "type-check": "~0.3.2", - "wordwrap": "~1.0.0" - } - }, - "os-tmpdir": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", - "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=" - }, - "path-is-absolute": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=" - }, - "path-is-inside": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/path-is-inside/-/path-is-inside-1.0.2.tgz", - "integrity": "sha1-NlQX3t5EQw0cEa9hAn+s8HS9/FM=" - }, - "path-key": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", - "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=" - }, - "pify": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", - "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=" - }, - "pinkie": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz", - "integrity": "sha1-clVrgM+g1IqXToDnckjoDtT3+HA=" - }, - "pinkie-promise": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz", - "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=", - "requires": { - "pinkie": "^2.0.0" - } - }, - "pluralize": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/pluralize/-/pluralize-7.0.0.tgz", - "integrity": "sha512-ARhBOdzS3e41FbkW/XWrTEtukqqLoK5+Z/4UeDaLuSW+39JPeFgs4gCGqsrJHVZX0fUrx//4OF0K1CUGwlIFow==" - }, - "prelude-ls": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", - "integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=" - }, - "progress": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.0.tgz", - "integrity": "sha1-ihvjZr+Pwj2yvSPxDG/pILQ4nR8=" - }, - "punycode": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", - "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==" - }, - "regenerator-runtime": { - "version": "0.11.1", - "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz", - "integrity": "sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg==" - }, - "regexp.prototype.flags": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.2.0.tgz", - "integrity": "sha512-ztaw4M1VqgMwl9HlPpOuiYgItcHlunW0He2fE6eNfT6E/CF2FtYi9ofOYe4mKntstYk0Fyh/rDRBdS3AnxjlrA==", - "requires": { - "define-properties": "^1.1.2" - } - }, - "regexpp": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-2.0.0.tgz", - "integrity": "sha512-g2FAVtR8Uh8GO1Nv5wpxW7VFVwHcCEr4wyA8/MHiRkO8uHoR5ntAA8Uq3P1vvMTX/BeQiRVSpDGLd+Wn5HNOTA==" - }, - "require-uncached": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/require-uncached/-/require-uncached-1.0.3.tgz", - "integrity": "sha1-Tg1W1slmL9MeQwEcS5WqSZVUIdM=", - "requires": { - "caller-path": "^0.1.0", - "resolve-from": "^1.0.0" - } - }, - "resolve-from": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-1.0.1.tgz", - "integrity": "sha1-Jsv+k10a7uq7Kbw/5a6wHpPUQiY=" - }, - "restore-cursor": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-2.0.0.tgz", - "integrity": "sha1-n37ih/gv0ybU/RYpI9YhKe7g368=", - "requires": { - "onetime": "^2.0.0", - "signal-exit": "^3.0.2" - } - }, - "rimraf": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.2.tgz", - "integrity": "sha512-lreewLK/BlghmxtfH36YYVg1i8IAce4TI7oao75I1g245+6BctqTVQiBP3YUJ9C6DQOXJmkYR9X9fCLtCOJc5w==", - "requires": { - "glob": "^7.0.5" - } - }, - "run-async": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.3.0.tgz", - "integrity": "sha1-A3GrSuC91yDUFm19/aZP96RFpsA=", - "requires": { - "is-promise": "^2.1.0" - } - }, - "rxjs": { - "version": "5.5.11", - "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-5.5.11.tgz", - "integrity": "sha512-3bjO7UwWfA2CV7lmwYMBzj4fQ6Cq+ftHc2MvUe+WMS7wcdJ1LosDWmdjPQanYp2dBRj572p7PeU81JUxHKOcBA==", - "requires": { - "symbol-observable": "1.0.1" - } - }, - "safer-buffer": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", - "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" - }, - "semver": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.5.0.tgz", - "integrity": "sha512-4SJ3dm0WAwWy/NVeioZh5AntkdJoWKxHxcmyP622fOkgHa4z3R0TdBJICINyaSDE6uNwVc8gZr+ZinwZAH4xIA==" - }, - "shebang-command": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", - "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", - "requires": { - "shebang-regex": "^1.0.0" - } - }, - "shebang-regex": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", - "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=" - }, - "signal-exit": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", - "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=" - }, - "slice-ansi": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-1.0.0.tgz", - "integrity": "sha512-POqxBK6Lb3q6s047D/XsDVNPnF9Dl8JSaqe9h9lURl0OdNqy/ujDrOiIHtsqXMGbWWTIomRzAMaTyawAU//Reg==", - "requires": { - "is-fullwidth-code-point": "^2.0.0" - } - }, - "sprintf-js": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", - "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=" - }, - "string-width": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", - "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", - "requires": { - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^4.0.0" - }, - "dependencies": { - "ansi-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", - "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=" - }, - "strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", - "requires": { - "ansi-regex": "^3.0.0" - } - } - } - }, - "string.prototype.matchall": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/string.prototype.matchall/-/string.prototype.matchall-2.0.0.tgz", - "integrity": "sha512-WoZ+B2ypng1dp4iFLF2kmZlwwlE19gmjgKuhL1FJfDgCREWb3ye3SDVHSzLH6bxfnvYmkCxbzkmWcQZHA4P//Q==", - "requires": { - "define-properties": "^1.1.2", - "es-abstract": "^1.10.0", - "function-bind": "^1.1.1", - "has-symbols": "^1.0.0", - "regexp.prototype.flags": "^1.2.0" - } - }, - "strip-ansi": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", - "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", - "requires": { - "ansi-regex": "^2.0.0" - } - }, - "strip-json-comments": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", - "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=" - }, - "supports-color": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", - "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=" - }, - "symbol-observable": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/symbol-observable/-/symbol-observable-1.0.1.tgz", - "integrity": "sha1-g0D8RwLDEi310iKI+IKD9RPT/dQ=" - }, - "table": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/table/-/table-4.0.3.tgz", - "integrity": "sha512-S7rnFITmBH1EnyKcvxBh1LjYeQMmnZtCXSEbHcH6S0NoKit24ZuFO/T1vDcLdYsLQkM188PVVhQmzKIuThNkKg==", - "requires": { - "ajv": "^6.0.1", - "ajv-keywords": "^3.0.0", - "chalk": "^2.1.0", - "lodash": "^4.17.4", - "slice-ansi": "1.0.0", - "string-width": "^2.1.1" - }, - "dependencies": { - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "requires": { - "color-convert": "^1.9.0" - } - }, - "chalk": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz", - "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } - }, - "supports-color": { - "version": "5.4.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.4.0.tgz", - "integrity": "sha512-zjaXglF5nnWpsq470jSv6P9DwPvgLkuapYmfDm3JWOm0vkNTVF2tI4UrN2r6jH1qM/uc/WtxYY1hYoA2dOKj5w==", - "requires": { - "has-flag": "^3.0.0" - } - } - } - }, - "text-table": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", - "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=" - }, - "through": { - "version": "2.3.8", - "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", - "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=" - }, - "tmp": { - "version": "0.0.33", - "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", - "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", - "requires": { - "os-tmpdir": "~1.0.2" - } - }, - "to-fast-properties": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-1.0.3.tgz", - "integrity": "sha1-uDVx+k2MJbguIxsG46MFXeTKGkc=" - }, - "type-check": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", - "integrity": "sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=", - "requires": { - "prelude-ls": "~1.1.2" - } - }, - "uri-js": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.2.2.tgz", - "integrity": "sha512-KY9Frmirql91X2Qgjry0Wd4Y+YTdrdZheS8TFwvkbLWf/G5KNJDCh6pKL5OZctEW4+0Baa5idK2ZQuELRwPznQ==", - "requires": { - "punycode": "^2.1.0" - } - }, - "which": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", - "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", - "requires": { - "isexe": "^2.0.0" - } - }, - "wordwrap": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", - "integrity": "sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus=" - }, - "wrappy": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" - }, - "write": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/write/-/write-0.2.1.tgz", - "integrity": "sha1-X8A4KOJkzqP+kUVUdvejxWbLB1c=", - "requires": { - "mkdirp": "^0.5.1" - } - } - } -} diff --git a/scripts/admin/eslint/package.json b/scripts/admin/eslint/package.json deleted file mode 100644 index f53bc6310c..0000000000 --- a/scripts/admin/eslint/package.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "name": "meteor-jsdoc", - "version": "0.0.0", - "description": "no warn", - "readme": "no warn", - "repository": "no warn", - "dependencies": { - "babel-eslint": "4.1.7", - "eslint": "^5.3.0", - "eslint-plugin-react": "2.5.0" - } -} diff --git a/scripts/admin/git-hooks/pre-commit b/scripts/admin/git-hooks/pre-commit deleted file mode 100755 index 1763bb0d71..0000000000 --- a/scripts/admin/git-hooks/pre-commit +++ /dev/null @@ -1,26 +0,0 @@ -#!/bin/sh - -cd $(dirname $0) -cd ../.. - -# If you want to allow linter errors set this variable to true. -eslint=$(git config hooks.ignore-eslint) - -echo "Linting Meteor tool code..." - -./scripts/admin/eslint/eslint.sh modified -linter_exit_code=$? - -if [ "$eslint" != "true" ] && [ $linter_exit_code != 0 ] -then - echo "Linter errors detected in pre-commit hook." - echo - echo "Run the linter with ./scripts/admin/eslint/eslint.sh" - echo - echo "If you know what you are doing you can disable this" - echo "check using:" - echo - echo " git config hooks.ignore-eslint true" - echo - exit 1 -fi diff --git a/tools/cli/main.js b/tools/cli/main.js index 6d813158e5..64b4031250 100644 --- a/tools/cli/main.js +++ b/tools/cli/main.js @@ -607,13 +607,6 @@ Fiber(function () { process.exit(1); } - // Set up git hooks, but not on Windows because they don't work there and it;s - // not worth setting it up at the moment - if (files.inCheckout() && process.platform !== "win32") { - var installGitHooks = require('../tool-env/install-git-hooks.js')['default']; - installGitHooks(); - } - // This is a bit of a hack, but: if we don't check this in the tool, then the // first time we do a isopack.load, it will fail due to the check in the // meteor package, and that'll look a lot uglier. diff --git a/tools/tool-env/install-git-hooks.js b/tools/tool-env/install-git-hooks.js deleted file mode 100644 index 91926ffccf..0000000000 --- a/tools/tool-env/install-git-hooks.js +++ /dev/null @@ -1,106 +0,0 @@ -import files from '../fs/files'; - -const hookDestination = - files.pathJoin(files.getCurrentToolsDir(), '.git', 'hooks'); - -const hookSource = - files.pathJoin(files.getCurrentToolsDir(), - 'scripts', 'admin', 'git-hooks'); - -const allPossibleHooks = [ - 'applypatch-msg', - 'pre-applypatch', - 'post-applypatch', - 'pre-commit', - 'prepare-commit-msg', - 'commit-msg', - 'post-commit', - 'pre-rebase', - 'post-checkout', - 'post-merge', - 'pre-receive', - 'update', - 'post-update', - 'pre-auto-gc', - 'post-rewrite', -]; - -// A suffix that we append to our hook scripts -const METEOR_HOOK_SUFFIX = '.meteor-hook'; - -// Matches the whole line we inject into the user's hook -const METEOR_HOOK_LINE_REGEX = /.*meteor-hook.*/; - -export default function installGitHooks() { - - if (!files.exists(hookDestination)) { - // Don't do anything if the hook destination does not exist, eg., - // we are not running from a git clone. - return; - } - - allPossibleHooks.map((hookName) => { - const hookFile = files.pathJoin(hookDestination, hookName); - const sourceFile = files.pathJoin(hookSource, hookName); - const meteorHookFile = hookFile + METEOR_HOOK_SUFFIX; - - if (!files.exists(sourceFile) && !files.exists(hookFile)) { - // Don't do anything if this hook isn't in either list - return; - } - - if (!files.exists(sourceFile)) { - // If the user has this hook, but Meteor doesn't, make sure that we remove - // any hooks that we added previously - removeMeteorInjectedHook(hookFile); - return; - } - - /* eslint-disable max-len */ - const METEOR_HOOK_INJECTED_LINE = `exec "$(dirname $0)/${hookName}${METEOR_HOOK_SUFFIX}" # Inserted by Meteor tool\n`; - /* eslint-enable */ - - if (!files.exists(hookFile)) { - // If the user doesn't have this hook, but we want to add it, just insert - // a new file and a line that calls it - files.writeFile(hookFile, - `#!/bin/sh -${METEOR_HOOK_INJECTED_LINE}`, - { encoding: 'utf8', mode: 0o755 }); - - // Copy the hook from the scripts dir - files.writeFile(meteorHookFile, files.readFile(sourceFile), - { mode: 0o755 }); - return; - } - - // Now we have arrived at the case where the user already has a hook - - // Has Meteor already installed a hook here? If not, add a line to the hook - if (!files.exists(meteorHookFile)) { - files.appendFile(hookFile, METEOR_HOOK_INJECTED_LINE); - } - - // Copy the hook from the scripts dir again in case it updated - files.writeFile(meteorHookFile, files.readFile(sourceFile), - { mode: 0o755 }); - return; - }); -} - -function removeMeteorInjectedHook(hookFile) { - // Remove the script added by Meteor - try { - files.unlink(hookFile + METEOR_HOOK_SUFFIX); - } catch (err) { - // Ignore errors about file not found - if (err.code !== 'ENOENT') { - throw err; - } - } - - // Remove the line added to the file - files.writeFile(hookFile, - files.readFile(hookFile, 'utf8').replace(METEOR_HOOK_LINE_REGEX, ''), - 'utf8'); -} From fa518b806eaf64cb25d90cb3bf21bfb3dbd001ac Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Fri, 15 Nov 2019 10:47:11 -0500 Subject: [PATCH 296/327] Add some advice about republishing packages to History.md. --- History.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/History.md b/History.md index b46397786b..25e1039bd9 100644 --- a/History.md +++ b/History.md @@ -25,6 +25,24 @@ meteor npm install meteor-node-stubs@next ``` +* If you are the author of any Meteor packages, and you encounter errors + when using those packages in a Meteor 1.8.2 application (for example, + `module.watch` being undefined), we recommend that you bump the minor + version of your package and republish it using Meteor 1.8.2, so + Meteor 1.8.2 applications will automatically use the new version of the + package, as compiled by Meteor 1.8.2: + ```sh + cd path/to/your/package + # Add api.versionsFrom("1.8.2") to Package.onUse in package.js... + meteor --release 1.8.2 publish + ``` + This may not be necessary for all packages, especially those that have + been recently republished using Meteor 1.8.1, or local packages in the + `packages/` directory (which are always recompiled from source). + However, republishing packages is a general solution to a wide variety + of package versioning and compilation problems, and package authors can + make their users' lives easier by handling these issues proactively. + ### Changes * Node has been updated to version From 3f88ccb387c545b4863027fb099bba4759af34c8 Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Fri, 15 Nov 2019 10:53:46 -0500 Subject: [PATCH 297/327] Update packages/non-core/blaze submodule to latest master. This version of Blaze includes https://github.com/meteor/blaze/pull/299 by @sebakerckhof, which is an important prerequisite for #10498. --- packages/non-core/blaze | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/non-core/blaze b/packages/non-core/blaze index e6b8a12344..ab651dbf46 160000 --- a/packages/non-core/blaze +++ b/packages/non-core/blaze @@ -1 +1 @@ -Subproject commit e6b8a12344e6c7438f2a06bb98a5796663905150 +Subproject commit ab651dbf468f31fe6f69e89b7388cdf5743b94e9 From a72c92c8520e1ab86c08c06aed0a84eed64487e9 Mon Sep 17 00:00:00 2001 From: Seba Kerckhof Date: Thu, 21 Nov 2019 18:12:01 +0100 Subject: [PATCH 298/327] Fix comment in resolver Between 1.3 and 1.3.1 the modules.js file got moved from modules to modules-runtime --- tools/isobuild/resolver.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/isobuild/resolver.ts b/tools/isobuild/resolver.ts index 9cfce1721b..38e237740e 100644 --- a/tools/isobuild/resolver.ts +++ b/tools/isobuild/resolver.ts @@ -361,7 +361,7 @@ export default class Resolver { } // If the dependency is still not resolved, it might be handled by the - // fallback function defined in meteor/packages/modules/modules.js, or + // fallback function defined in meteor/packages/modules-runtime/[modern|legacy|server].js, or // it might be imported in code that will never run on this platform, // so there is always the possibility that its absence is not actually // a problem. As much as we might like to issue warnings about missing From dad1f4e56334dc0220bb620c6ba97246784fbe3a Mon Sep 17 00:00:00 2001 From: Seba Kerckhof Date: Mon, 25 Nov 2019 15:44:48 +0100 Subject: [PATCH 299/327] Bump version to republish Should be republished, since the published 1.5.1 is outdated and still contains underscore. https://github.com/meteor/meteor/issues/10788 --- packages/accounts-password/package.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/accounts-password/package.js b/packages/accounts-password/package.js index 5d614113d5..165a413547 100644 --- a/packages/accounts-password/package.js +++ b/packages/accounts-password/package.js @@ -5,7 +5,7 @@ Package.describe({ // 2.2.x in the future. The version was also bumped to 2.0.0 temporarily // during the Meteor 1.5.1 release process, so versions 2.0.0-beta.2 // through -beta.5 and -rc.0 have already been published. - version: "1.5.1" + version: "1.5.2" }); Package.onUse(api => { From f6fcd620a7b66b19a4956d4559592e8bfe43051f Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Tue, 26 Nov 2019 12:48:16 -0500 Subject: [PATCH 300/327] Add a package.json to custom-minifiers test app. Self-tests involving this test app were failing because of an undefined jQuery reference on the client. --- tools/tests/apps/custom-minifier/.meteor/.id | 7 +++ .../apps/custom-minifier/.meteor/packages | 1 + .../apps/custom-minifier/.meteor/platforms | 2 + .../apps/custom-minifier/.meteor/versions | 60 +++++++++++++++++++ tools/tests/apps/custom-minifier/package.json | 18 ++++++ 5 files changed, 88 insertions(+) create mode 100644 tools/tests/apps/custom-minifier/.meteor/.id create mode 100644 tools/tests/apps/custom-minifier/.meteor/platforms create mode 100644 tools/tests/apps/custom-minifier/.meteor/versions create mode 100644 tools/tests/apps/custom-minifier/package.json diff --git a/tools/tests/apps/custom-minifier/.meteor/.id b/tools/tests/apps/custom-minifier/.meteor/.id new file mode 100644 index 0000000000..3bf60f5efd --- /dev/null +++ b/tools/tests/apps/custom-minifier/.meteor/.id @@ -0,0 +1,7 @@ +# This file contains a token that is unique to your project. +# Check it into your repository along with the rest of this directory. +# It can be used for purposes such as: +# - ensuring you don't accidentally deploy one app on top of another +# - providing package authors with aggregated statistics + +vyz4yyird5v9.f7frwm532zko diff --git a/tools/tests/apps/custom-minifier/.meteor/packages b/tools/tests/apps/custom-minifier/.meteor/packages index d745212402..65654e5aab 100644 --- a/tools/tests/apps/custom-minifier/.meteor/packages +++ b/tools/tests/apps/custom-minifier/.meteor/packages @@ -2,3 +2,4 @@ meteor-base custom-minifier blaze-html-templates ecmascript +jquery diff --git a/tools/tests/apps/custom-minifier/.meteor/platforms b/tools/tests/apps/custom-minifier/.meteor/platforms new file mode 100644 index 0000000000..8a3a35f9f6 --- /dev/null +++ b/tools/tests/apps/custom-minifier/.meteor/platforms @@ -0,0 +1,2 @@ +browser +server diff --git a/tools/tests/apps/custom-minifier/.meteor/versions b/tools/tests/apps/custom-minifier/.meteor/versions new file mode 100644 index 0000000000..b2b4a56cd7 --- /dev/null +++ b/tools/tests/apps/custom-minifier/.meteor/versions @@ -0,0 +1,60 @@ +autoupdate@1.6.0 +babel-compiler@7.4.1 +babel-runtime@1.4.0 +base64@1.0.12 +blaze@2.3.3 +blaze-html-templates@1.1.2 +blaze-tools@1.0.10 +boilerplate-generator@1.6.0 +caching-compiler@1.2.1 +caching-html-compiler@1.1.3 +callback-hook@1.2.0 +check@1.3.1 +custom-minifier@0.0.1 +ddp@1.4.0 +ddp-client@2.3.3 +ddp-common@1.4.0 +ddp-server@2.3.0 +diff-sequence@1.1.1 +dynamic-import@0.5.1 +ecmascript@0.13.0 +ecmascript-runtime@0.7.0 +ecmascript-runtime-client@0.9.0 +ecmascript-runtime-server@0.8.0 +ejson@1.1.0 +es5-shim@4.8.0 +fetch@0.1.1 +hot-code-push@1.0.4 +html-tools@1.0.11 +htmljs@1.0.11 +id-map@1.1.0 +inter-process-messaging@0.1.0 +jquery@1.12.1 +livedata@1.0.18 +logging@1.1.20 +meteor@1.9.3 +meteor-base@1.4.0 +modern-browsers@0.1.4 +modules@0.14.0 +modules-runtime@0.11.0 +mongo-id@1.0.7 +observe-sequence@1.0.16 +ordered-dict@1.1.0 +promise@0.11.2 +random@1.1.0 +reactive-var@1.0.11 +reload@1.3.0 +retry@1.1.0 +routepolicy@1.1.0 +socket-stream-client@0.2.2 +spacebars@1.0.15 +spacebars-compiler@1.1.3 +templating@1.3.2 +templating-compiler@1.3.3 +templating-runtime@1.3.2 +templating-tools@1.1.2 +tracker@1.2.0 +ui@1.0.13 +underscore@1.0.10 +webapp@1.7.5 +webapp-hashing@1.0.9 diff --git a/tools/tests/apps/custom-minifier/package.json b/tools/tests/apps/custom-minifier/package.json new file mode 100644 index 0000000000..82b7bda564 --- /dev/null +++ b/tools/tests/apps/custom-minifier/package.json @@ -0,0 +1,18 @@ +{ + "name": "custom-minifiers", + "private": true, + "scripts": { + "start": "meteor run", + "test": "meteor test --once --driver-package meteortesting:mocha", + "test-app": "TEST_WATCH=1 meteor test --full-app --driver-package meteortesting:mocha", + "visualize": "meteor --production --extra-packages bundle-visualizer" + }, + "dependencies": { + "@babel/runtime": "^7.7.4", + "jquery": "^3.4.1", + "meteor-node-stubs": "^1.0.0" + }, + "meteor": { + "mainModule": "code.js" + } +} From cf8dbf1c37a9da249bf1ab197f81345a6f1b0531 Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Tue, 26 Nov 2019 12:57:20 -0500 Subject: [PATCH 301/327] Add static-html compiler plugin to custom-minifier test app. --- tools/tests/apps/custom-minifier/.meteor/packages | 2 +- tools/tests/apps/custom-minifier/.meteor/versions | 11 +---------- 2 files changed, 2 insertions(+), 11 deletions(-) diff --git a/tools/tests/apps/custom-minifier/.meteor/packages b/tools/tests/apps/custom-minifier/.meteor/packages index 65654e5aab..e510bc7b61 100644 --- a/tools/tests/apps/custom-minifier/.meteor/packages +++ b/tools/tests/apps/custom-minifier/.meteor/packages @@ -1,5 +1,5 @@ meteor-base custom-minifier -blaze-html-templates ecmascript jquery +static-html diff --git a/tools/tests/apps/custom-minifier/.meteor/versions b/tools/tests/apps/custom-minifier/.meteor/versions index b2b4a56cd7..0aacfc62db 100644 --- a/tools/tests/apps/custom-minifier/.meteor/versions +++ b/tools/tests/apps/custom-minifier/.meteor/versions @@ -2,8 +2,6 @@ autoupdate@1.6.0 babel-compiler@7.4.1 babel-runtime@1.4.0 base64@1.0.12 -blaze@2.3.3 -blaze-html-templates@1.1.2 blaze-tools@1.0.10 boilerplate-generator@1.6.0 caching-compiler@1.2.1 @@ -38,23 +36,16 @@ modern-browsers@0.1.4 modules@0.14.0 modules-runtime@0.11.0 mongo-id@1.0.7 -observe-sequence@1.0.16 -ordered-dict@1.1.0 promise@0.11.2 random@1.1.0 -reactive-var@1.0.11 reload@1.3.0 retry@1.1.0 routepolicy@1.1.0 socket-stream-client@0.2.2 -spacebars@1.0.15 spacebars-compiler@1.1.3 -templating@1.3.2 -templating-compiler@1.3.3 -templating-runtime@1.3.2 +static-html@1.2.2 templating-tools@1.1.2 tracker@1.2.0 -ui@1.0.13 underscore@1.0.10 webapp@1.7.5 webapp-hashing@1.0.9 From ec1df904006938ce501440a2627e1b1072514760 Mon Sep 17 00:00:00 2001 From: Seba Kerckhof Date: Tue, 26 Nov 2019 19:06:01 +0100 Subject: [PATCH 302/327] Remove jquery dependency from test-helpers package (#10772) --- packages/http/httpcall_tests.js | 10 ---------- packages/test-helpers/domutils.js | 2 +- packages/test-helpers/event_simulation.js | 2 +- packages/test-helpers/package.js | 4 +--- 4 files changed, 3 insertions(+), 15 deletions(-) diff --git a/packages/http/httpcall_tests.js b/packages/http/httpcall_tests.js index 48cd523b5b..ae128b471f 100644 --- a/packages/http/httpcall_tests.js +++ b/packages/http/httpcall_tests.js @@ -259,16 +259,6 @@ testAsyncMulti("httpcall - methods", [ test.equal(result.statusCode, 200); var data = result.data; test.equal(data.url, "/foo"); - - // IE <= 8 turns seems to turn POSTs with no body into - // GETs, inexplicably. - // - // XXX Except now it doesn't!? Not sure what changed, but - // these lines now break the test... - // if (Meteor.isClient && $.browser.msie && $.browser.version <= 8 - // && meth === "POST") - // meth = "GET"; - test.equal(data.method, meth); })); }; diff --git a/packages/test-helpers/domutils.js b/packages/test-helpers/domutils.js index e5a29025e2..c2c097e209 100644 --- a/packages/test-helpers/domutils.js +++ b/packages/test-helpers/domutils.js @@ -41,7 +41,7 @@ DomUtils.setElementValue = function (node, value) { // match valid OPTION values... and moreover, the OPTION value must be // explicitly given as an attribute, not just as the text. So we hunt for // the OPTION and select it. - var options = $(node).find('option'); + var options = node.querySelectorAll('option'); for (var i = 0; i < options.length; ++i) { if (DomUtils.getElementValue(options[i]) === value) { options[i].selected = true; diff --git a/packages/test-helpers/event_simulation.js b/packages/test-helpers/event_simulation.js index 672fd03771..cf4ed8b3af 100644 --- a/packages/test-helpers/event_simulation.js +++ b/packages/test-helpers/event_simulation.js @@ -2,7 +2,7 @@ // bubbles: A boolean indicating whether the event should bubble up through // the event chain or not. (default is true) simulateEvent = function (node, event, args, options) { - node = (node instanceof $ ? node[0] : node); + node = (node.jquery ? node[0] : node); var bubbles = (options && "bubbles" in options) ? options.bubbles : true; diff --git a/packages/test-helpers/package.js b/packages/test-helpers/package.js index eceb520f15..f7d100e215 100644 --- a/packages/test-helpers/package.js +++ b/packages/test-helpers/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Utility functions for tests", - version: '1.1.0' + version: '1.1.1' }); Package.onUse(function (api) { @@ -14,8 +14,6 @@ Package.onUse(function (api) { 'blaze', ]); - api.use(['jquery@1.11.1'], 'client'); - // XXX for connection.js. Not sure this really belongs in // test-helpers. It probably would be better off in livedata. But it's // unclear how to put it in livedata so that it can both be used by From eb0066e1c140a645c3f566b3da8780cdd1946eb4 Mon Sep 17 00:00:00 2001 From: Seba Kerckhof Date: Tue, 26 Nov 2019 19:07:33 +0100 Subject: [PATCH 303/327] Remove jquery and bootstrap (deprecated) from test-in-browser package (#10773) * remove jquery and deprecated bootstrap dependency in test-in-browser Another step towards https://github.com/meteor/meteor/pull/10498 The direct jquery dependency was not necessary as far as I can tell. There was a second indirect dependency through the deprecated bootstrap package from which we only need the css. So I replaced that one with bootstrap 4 css from npm * Improve styling for test-in-browser --- .../test-in-browser/.npm/package/.gitignore | 1 + packages/test-in-browser/.npm/package/README | 7 + .../.npm/package/npm-shrinkwrap.json | 10 ++ packages/test-in-browser/driver.css | 20 ++- packages/test-in-browser/driver.html | 121 ++++++++---------- packages/test-in-browser/driver.js | 7 +- packages/test-in-browser/package.js | 8 +- 7 files changed, 96 insertions(+), 78 deletions(-) create mode 100644 packages/test-in-browser/.npm/package/.gitignore create mode 100644 packages/test-in-browser/.npm/package/README create mode 100644 packages/test-in-browser/.npm/package/npm-shrinkwrap.json diff --git a/packages/test-in-browser/.npm/package/.gitignore b/packages/test-in-browser/.npm/package/.gitignore new file mode 100644 index 0000000000..3c3629e647 --- /dev/null +++ b/packages/test-in-browser/.npm/package/.gitignore @@ -0,0 +1 @@ +node_modules diff --git a/packages/test-in-browser/.npm/package/README b/packages/test-in-browser/.npm/package/README new file mode 100644 index 0000000000..3d492553a4 --- /dev/null +++ b/packages/test-in-browser/.npm/package/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/test-in-browser/.npm/package/npm-shrinkwrap.json b/packages/test-in-browser/.npm/package/npm-shrinkwrap.json new file mode 100644 index 0000000000..0a96a3c1a8 --- /dev/null +++ b/packages/test-in-browser/.npm/package/npm-shrinkwrap.json @@ -0,0 +1,10 @@ +{ + "lockfileVersion": 1, + "dependencies": { + "bootstrap": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/bootstrap/-/bootstrap-4.3.1.tgz", + "integrity": "sha512-rXqOmH1VilAt2DyPzluTi2blhk17bO7ef+zLLPlWvG494pDxcM234pJ8wTc/6R40UWizAIIMgxjvxZg5kmsbag==" + } + } +} diff --git a/packages/test-in-browser/driver.css b/packages/test-in-browser/driver.css index 0251f37d4f..1a870bc9e9 100644 --- a/packages/test-in-browser/driver.css +++ b/packages/test-in-browser/driver.css @@ -1,11 +1,23 @@ body { - padding-top: 60px; - padding-bottom: 40px; + height: 100vh; + width: 100vw; +} + +.test-in-browser { + display: flex; + height: 100%; + flex-direction: column; +} + +.test-results { + flex: 1; + overflow: auto; } #testProgressBar { - margin-top: 10px; - position: relative; + flex: 1; + max-width: 400px; + position: relative; } .header { diff --git a/packages/test-in-browser/driver.html b/packages/test-in-browser/driver.html index fbd3ec10e1..52bd3b8aad 100644 --- a/packages/test-in-browser/driver.html +++ b/packages/test-in-browser/driver.html @@ -1,81 +1,69 @@ + -