linkage fully works
MODIFY
package-lock.json
package-lock.json
"lockfileVersion": 1,
"requires": true,
"dependencies": {
+ "@agoric/babel-parser": {
+ "version": "7.5.0",
+ "resolved": "https://registry.npmjs.org/@agoric/babel-parser/-/babel-parser-7.5.0.tgz",
+ "integrity": "sha512-lWAVssRdJBK1Rr7lndOdJ24qaG/r8dIY43oUFumQr0FW9f4oID2WZoBlX7pDBdwZXHIHIvYa+p09q5obYBoROw==",
+ "dev": true
+ },
+ "@agoric/default-evaluate-options": {
+ "version": "0.1.3",
+ "resolved": "https://registry.npmjs.org/@agoric/default-evaluate-options/-/default-evaluate-options-0.1.3.tgz",
+ "integrity": "sha512-oEV1HOV+vqDgwLKLoyTH8+YO+zrjbp9zj8U2GiEtIYHeQUhXG3nCWFxvpamvaabDOaAJNjX/FRgiCY2dIDo8sQ==",
+ "dev": true,
+ "requires": {
+ "@agoric/babel-parser": "^7.5.0",
+ "@agoric/eventual-send": "^0.2.4",
+ "@agoric/transform-bang": "^0.3.1",
+ "@babel/generator": "^7.5.5",
+ "esm": "^3.2.5"
+ },
+ "dependencies": {
+ "esm": {
+ "version": "3.2.25",
+ "resolved": "https://registry.npmjs.org/esm/-/esm-3.2.25.tgz",
+ "integrity": "sha512-U1suiZ2oDVWv4zPO56S0NcR5QriEahGtdN2OR6FiOG4WJvcjBVFB0qI4+eKoWFH483PKGuLuu6V8Z4T5g63UVA==",
+ "dev": true
+ }
+ }
+ },
+ "@agoric/evaluate": {
+ "version": "1.3.2",
+ "resolved": "https://registry.npmjs.org/@agoric/evaluate/-/evaluate-1.3.2.tgz",
+ "integrity": "sha512-gNUvENEe2sHjw5ZnQ58Nm8raKO/9jUatrtW7NFx9Lv8tohGEbKA0AGZUycBZiovOSDGbaaPhzgjGmE+60zy7wA==",
+ "dev": true,
+ "requires": {
+ "@agoric/default-evaluate-options": "^0.1.2",
+ "esm": "^3.2.5"
+ },
+ "dependencies": {
+ "esm": {
+ "version": "3.2.25",
+ "resolved": "https://registry.npmjs.org/esm/-/esm-3.2.25.tgz",
+ "integrity": "sha512-U1suiZ2oDVWv4zPO56S0NcR5QriEahGtdN2OR6FiOG4WJvcjBVFB0qI4+eKoWFH483PKGuLuu6V8Z4T5g63UVA==",
+ "dev": true
+ }
+ }
+ },
+ "@agoric/eventual-send": {
+ "version": "0.2.4",
+ "resolved": "https://registry.npmjs.org/@agoric/eventual-send/-/eventual-send-0.2.4.tgz",
+ "integrity": "sha512-QYlLK+OY78Eor3wwYfU2SUeNnFm12w6nhdKZDfqJ1wOp9HiXlX5etub1JjYy8ViWEITKBmKyx3WyUxaUhdveNQ==",
+ "dev": true
+ },
+ "@agoric/harden": {
+ "version": "0.0.4",
+ "resolved": "https://registry.npmjs.org/@agoric/harden/-/harden-0.0.4.tgz",
+ "integrity": "sha512-WvTw2otvchy3mScAvqQcX0l6049xp6cF17/Pw0PNNqUTJtOo/84tE9OyBSjEp8wn/XBNArPaJuRjMhQpIQ775Q==",
+ "dev": true,
+ "requires": {
+ "@agoric/make-hardener": "0.0.4"
+ }
+ },
+ "@agoric/make-hardener": {
+ "version": "0.0.4",
+ "resolved": "https://registry.npmjs.org/@agoric/make-hardener/-/make-hardener-0.0.4.tgz",
+ "integrity": "sha512-0k/wGkIVQO3IY7p/H/5OS3BIXsRK9Qb7nHnqyvj6hzvSyumwgPp8e4rz5QaVWSen43TGJl+zQn4mW9ZZShT1aw==",
+ "dev": true
+ },
+ "@agoric/transform-bang": {
+ "version": "0.3.3",
+ "resolved": "https://registry.npmjs.org/@agoric/transform-bang/-/transform-bang-0.3.3.tgz",
+ "integrity": "sha512-3UkAooZ/Y4tqgvWNyW5mT1lnFmXklyb4wirB7rCtkp60WQtinfsevl6uLtYI2Q8cxgdbSwLr11v/HfuPNdWNBA==",
+ "dev": true,
+ "requires": {
+ "@agoric/harden": "0.0.4",
+ "esm": "^3.2.5"
+ },
+ "dependencies": {
+ "esm": {
+ "version": "3.2.25",
+ "resolved": "https://registry.npmjs.org/esm/-/esm-3.2.25.tgz",
+ "integrity": "sha512-U1suiZ2oDVWv4zPO56S0NcR5QriEahGtdN2OR6FiOG4WJvcjBVFB0qI4+eKoWFH483PKGuLuu6V8Z4T5g63UVA==",
+ "dev": true
+ }
+ }
+ },
+ "@agoric/transform-module": {
+ "version": "0.1.3",
+ "resolved": "https://registry.npmjs.org/@agoric/transform-module/-/transform-module-0.1.3.tgz",
+ "integrity": "sha512-C7gq0MzkygOMWsWS5jhbUimYAeBbos8O2S7Oj2EaAGXraqvZl+jbY8OpP9ns0QnWcDd5Mb7h33R9f2WFpiOzZA==",
+ "dev": true,
+ "requires": {
+ "@agoric/evaluate": "^1.1.0",
+ "@babel/core": "^7.5.5",
+ "esm": "^3.2.5",
+ "rollup": "^1.17.0",
+ "rollup-plugin-node-resolve": "^5.2.0"
+ },
+ "dependencies": {
+ "esm": {
+ "version": "3.2.25",
+ "resolved": "https://registry.npmjs.org/esm/-/esm-3.2.25.tgz",
+ "integrity": "sha512-U1suiZ2oDVWv4zPO56S0NcR5QriEahGtdN2OR6FiOG4WJvcjBVFB0qI4+eKoWFH483PKGuLuu6V8Z4T5g63UVA==",
+ "dev": true
+ }
+ }
+ },
+ "@babel/code-frame": {
+ "version": "7.5.5",
+ "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.5.5.tgz",
+ "integrity": "sha512-27d4lZoomVyo51VegxI20xZPuSHusqbQag/ztrBC7wegWoQ1nLREPVSKSW8byhTlzTKyNE4ifaTA6lCp7JjpFw==",
+ "dev": true,
+ "requires": {
+ "@babel/highlight": "^7.0.0"
+ }
+ },
+ "@babel/core": {
+ "version": "7.6.0",
+ "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.6.0.tgz",
+ "integrity": "sha512-FuRhDRtsd6IptKpHXAa+4WPZYY2ZzgowkbLBecEDDSje1X/apG7jQM33or3NdOmjXBKWGOg4JmSiRfUfuTtHXw==",
+ "dev": true,
+ "requires": {
+ "@babel/code-frame": "^7.5.5",
+ "@babel/generator": "^7.6.0",
+ "@babel/helpers": "^7.6.0",
+ "@babel/parser": "^7.6.0",
+ "@babel/template": "^7.6.0",
+ "@babel/traverse": "^7.6.0",
+ "@babel/types": "^7.6.0",
+ "convert-source-map": "^1.1.0",
+ "debug": "^4.1.0",
+ "json5": "^2.1.0",
+ "lodash": "^4.17.13",
+ "resolve": "^1.3.2",
+ "semver": "^5.4.1",
+ "source-map": "^0.5.0"
+ },
+ "dependencies": {
+ "@babel/parser": {
+ "version": "7.6.0",
+ "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.6.0.tgz",
+ "integrity": "sha512-+o2q111WEx4srBs7L9eJmcwi655eD8sXniLqMB93TBK9GrNzGrxDWSjiqz2hLU0Ha8MTXFIP0yd9fNdP+m43ZQ==",
+ "dev": true
+ }
+ }
+ },
+ "@babel/generator": {
+ "version": "7.6.0",
+ "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.6.0.tgz",
+ "integrity": "sha512-Ms8Mo7YBdMMn1BYuNtKuP/z0TgEIhbcyB8HVR6PPNYp4P61lMsABiS4A3VG1qznjXVCf3r+fVHhm4efTYVsySA==",
+ "dev": true,
+ "requires": {
+ "@babel/types": "^7.6.0",
+ "jsesc": "^2.5.1",
+ "lodash": "^4.17.13",
+ "source-map": "^0.5.0",
+ "trim-right": "^1.0.1"
+ }
+ },
+ "@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==",
+ "dev": true,
+ "requires": {
+ "@babel/helper-get-function-arity": "^7.0.0",
+ "@babel/template": "^7.1.0",
+ "@babel/types": "^7.0.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==",
+ "dev": true,
+ "requires": {
+ "@babel/types": "^7.0.0"
+ }
+ },
+ "@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==",
+ "dev": true,
+ "requires": {
+ "@babel/types": "^7.4.4"
+ }
+ },
+ "@babel/helpers": {
+ "version": "7.6.0",
+ "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.6.0.tgz",
+ "integrity": "sha512-W9kao7OBleOjfXtFGgArGRX6eCP0UEcA2ZWEWNkJdRZnHhW4eEbeswbG3EwaRsnQUAEGWYgMq1HsIXuNNNy2eQ==",
+ "dev": true,
+ "requires": {
+ "@babel/template": "^7.6.0",
+ "@babel/traverse": "^7.6.0",
+ "@babel/types": "^7.6.0"
+ }
+ },
+ "@babel/highlight": {
+ "version": "7.5.0",
+ "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.5.0.tgz",
+ "integrity": "sha512-7dV4eu9gBxoM0dAnj/BCFDW9LFU0zvTrkq0ugM7pnHEgguOEeOz1so2ZghEdzviYzQEED0r4EAgpsBChKy1TRQ==",
+ "dev": true,
+ "requires": {
+ "chalk": "^2.0.0",
+ "esutils": "^2.0.2",
+ "js-tokens": "^4.0.0"
+ }
+ },
+ "@babel/template": {
+ "version": "7.6.0",
+ "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.6.0.tgz",
+ "integrity": "sha512-5AEH2EXD8euCk446b7edmgFdub/qfH1SN6Nii3+fyXP807QRx9Q73A2N5hNwRRslC2H9sNzaFhsPubkS4L8oNQ==",
+ "dev": true,
+ "requires": {
+ "@babel/code-frame": "^7.0.0",
+ "@babel/parser": "^7.6.0",
+ "@babel/types": "^7.6.0"
+ },
+ "dependencies": {
+ "@babel/parser": {
+ "version": "7.6.0",
+ "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.6.0.tgz",
+ "integrity": "sha512-+o2q111WEx4srBs7L9eJmcwi655eD8sXniLqMB93TBK9GrNzGrxDWSjiqz2hLU0Ha8MTXFIP0yd9fNdP+m43ZQ==",
+ "dev": true
+ }
+ }
+ },
+ "@babel/traverse": {
+ "version": "7.6.0",
+ "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.6.0.tgz",
+ "integrity": "sha512-93t52SaOBgml/xY74lsmt7xOR4ufYvhb5c5qiM6lu4J/dWGMAfAh6eKw4PjLes6DI6nQgearoxnFJk60YchpvQ==",
+ "dev": true,
+ "requires": {
+ "@babel/code-frame": "^7.5.5",
+ "@babel/generator": "^7.6.0",
+ "@babel/helper-function-name": "^7.1.0",
+ "@babel/helper-split-export-declaration": "^7.4.4",
+ "@babel/parser": "^7.6.0",
+ "@babel/types": "^7.6.0",
+ "debug": "^4.1.0",
+ "globals": "^11.1.0",
+ "lodash": "^4.17.13"
+ },
+ "dependencies": {
+ "@babel/parser": {
+ "version": "7.6.0",
+ "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.6.0.tgz",
+ "integrity": "sha512-+o2q111WEx4srBs7L9eJmcwi655eD8sXniLqMB93TBK9GrNzGrxDWSjiqz2hLU0Ha8MTXFIP0yd9fNdP+m43ZQ==",
+ "dev": true
+ }
+ }
+ },
+ "@babel/types": {
+ "version": "7.6.1",
+ "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.6.1.tgz",
+ "integrity": "sha512-X7gdiuaCmA0uRjCmRtYJNAVCc/q+5xSgsfKJHqMN4iNLILX39677fJE1O40arPMh0TTtS9ItH67yre6c7k6t0g==",
+ "dev": true,
+ "requires": {
+ "esutils": "^2.0.2",
+ "lodash": "^4.17.13",
+ "to-fast-properties": "^2.0.0"
+ }
+ },
+ "@types/estree": {
+ "version": "0.0.39",
+ "resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.39.tgz",
+ "integrity": "sha512-EYNwp3bU+98cpU4lAWYYL7Zz+2gryWH1qbdDTidVd6hkiR6weksdbMadyXKXNPEkQFhXM+hVO9ZygomHXp+AIw==",
+ "dev": true
+ },
+ "@types/node": {
+ "version": "12.7.5",
+ "resolved": "https://registry.npmjs.org/@types/node/-/node-12.7.5.tgz",
+ "integrity": "sha512-9fq4jZVhPNW8r+UYKnxF1e2HkDWOWKM5bC2/7c9wPV835I0aOrVbS/Hw/pWPk2uKrNXQqg9Z959Kz+IYDd5p3w==",
+ "dev": true
+ },
+ "@types/resolve": {
+ "version": "0.0.8",
+ "resolved": "https://registry.npmjs.org/@types/resolve/-/resolve-0.0.8.tgz",
+ "integrity": "sha512-auApPaJf3NPfe18hSoJkp8EbZzer2ISk7o8mCC3M9he/a04+gbMF97NkpD2S8riMGvm4BMRI59/SZQSaLTKpsQ==",
+ "dev": true,
+ "requires": {
+ "@types/node": "*"
+ }
+ },
+ "acorn": {
+ "version": "7.0.0",
+ "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.0.0.tgz",
+ "integrity": "sha512-PaF/MduxijYYt7unVGRuds1vBC9bFxbNf+VWqhOClfdgy7RlVkQqt610ig1/yxTgsDIfW1cWDel5EBbOy3jdtQ==",
+ "dev": true
+ },
+ "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==",
+ "dev": true,
+ "requires": {
+ "color-convert": "^1.9.0"
+ }
+ },
+ "builtin-modules": {
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-3.1.0.tgz",
+ "integrity": "sha512-k0KL0aWZuBt2lrxrcASWDfwOLMnodeQjodT/1SxEQAXsHANgo6ZC/VEaSEHCXt7aSTZ4/4H5LKa+tBXmW7Vtvw==",
+ "dev": true
+ },
+ "chalk": {
+ "version": "2.4.2",
+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz",
+ "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==",
+ "dev": true,
+ "requires": {
+ "ansi-styles": "^3.2.1",
+ "escape-string-regexp": "^1.0.5",
+ "supports-color": "^5.3.0"
+ }
+ },
+ "color-convert": {
+ "version": "1.9.3",
+ "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz",
+ "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==",
+ "dev": true,
+ "requires": {
+ "color-name": "1.1.3"
+ }
+ },
+ "color-name": {
+ "version": "1.1.3",
+ "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz",
+ "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=",
+ "dev": true
+ },
+ "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==",
+ "dev": true,
+ "requires": {
+ "safe-buffer": "~5.1.1"
+ }
+ },
+ "debug": {
+ "version": "4.1.1",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz",
+ "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==",
+ "dev": true,
+ "requires": {
+ "ms": "^2.1.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=",
+ "dev": true
+ },
"eslint-config-jessie": {
"version": "0.0.3",
"resolved": "https://registry.npmjs.org/eslint-config-jessie/-/eslint-config-jessie-0.0.3.tgz",
"requireindex": "^1.2.0"
}
},
+ "estree-walker": {
+ "version": "0.6.1",
+ "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-0.6.1.tgz",
+ "integrity": "sha512-SqmZANLWS0mnatqbSfRP5g8OXZC12Fgg1IwNtLsyHDzJizORW4khDfjPqJZsemPWBB2uqykUah5YpQ6epsqC/w==",
+ "dev": true
+ },
+ "esutils": {
+ "version": "2.0.3",
+ "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz",
+ "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==",
+ "dev": true
+ },
+ "globals": {
+ "version": "11.12.0",
+ "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz",
+ "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==",
+ "dev": true
+ },
+ "has-flag": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",
+ "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=",
+ "dev": true
+ },
+ "is-module": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/is-module/-/is-module-1.0.0.tgz",
+ "integrity": "sha1-Mlj7afeMFNW4FdZkM2tM/7ZEFZE=",
+ "dev": true
+ },
+ "js-tokens": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz",
+ "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==",
+ "dev": true
+ },
+ "jsesc": {
+ "version": "2.5.2",
+ "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz",
+ "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==",
+ "dev": true
+ },
+ "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==",
+ "dev": true,
+ "requires": {
+ "minimist": "^1.2.0"
+ }
+ },
+ "lodash": {
+ "version": "4.17.15",
+ "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz",
+ "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==",
+ "dev": true
+ },
+ "minimist": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz",
+ "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=",
+ "dev": true
+ },
+ "ms": {
+ "version": "2.1.2",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
+ "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==",
+ "dev": true
+ },
"node-fetch": {
"version": "2.6.0",
"resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.0.tgz",
"integrity": "sha512-8dG4H5ujfvFiqDmVu9fQ5bOHUC15JMjMY/Zumv26oOvvVJjM67KF8koCWIabKQ1GJIa9r2mMZscBq/TbdOcmNA==",
"dev": true
},
+ "path-parse": {
+ "version": "1.0.6",
+ "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz",
+ "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==",
+ "dev": true
+ },
"requireindex": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/requireindex/-/requireindex-1.2.0.tgz",
"integrity": "sha512-L9jEkOi3ASd9PYit2cwRfyppc9NoABujTP8/5gFcbERmo5jUoAKovIC3fsF17pkTnGsrByysqX+Kxd2OTNI1ww==",
"dev": true
+ },
+ "resolve": {
+ "version": "1.12.0",
+ "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.12.0.tgz",
+ "integrity": "sha512-B/dOmuoAik5bKcD6s6nXDCjzUKnaDvdkRyAk6rsmsKLipWj4797iothd7jmmUhWTfinVMU+wc56rYKsit2Qy4w==",
+ "dev": true,
+ "requires": {
+ "path-parse": "^1.0.6"
+ }
+ },
+ "rollup": {
+ "version": "1.21.4",
+ "resolved": "https://registry.npmjs.org/rollup/-/rollup-1.21.4.tgz",
+ "integrity": "sha512-Pl512XVCmVzgcBz5h/3Li4oTaoDcmpuFZ+kdhS/wLreALz//WuDAMfomD3QEYl84NkDu6Z6wV9twlcREb4qQsw==",
+ "dev": true,
+ "requires": {
+ "@types/estree": "0.0.39",
+ "@types/node": "^12.7.5",
+ "acorn": "^7.0.0"
+ }
+ },
+ "rollup-plugin-node-resolve": {
+ "version": "5.2.0",
+ "resolved": "https://registry.npmjs.org/rollup-plugin-node-resolve/-/rollup-plugin-node-resolve-5.2.0.tgz",
+ "integrity": "sha512-jUlyaDXts7TW2CqQ4GaO5VJ4PwwaV8VUGA7+km3n6k6xtOEacf61u0VXwN80phY/evMcaS+9eIeJ9MOyDxt5Zw==",
+ "dev": true,
+ "requires": {
+ "@types/resolve": "0.0.8",
+ "builtin-modules": "^3.1.0",
+ "is-module": "^1.0.0",
+ "resolve": "^1.11.1",
+ "rollup-pluginutils": "^2.8.1"
+ }
+ },
+ "rollup-pluginutils": {
+ "version": "2.8.2",
+ "resolved": "https://registry.npmjs.org/rollup-pluginutils/-/rollup-pluginutils-2.8.2.tgz",
+ "integrity": "sha512-EEp9NhnUkwY8aif6bxgovPHMoMoNr2FulJziTndpt5H9RdwC47GSGuII9XxpSdzVGM0GWrNPHV6ie1LTNJPaLQ==",
+ "dev": true,
+ "requires": {
+ "estree-walker": "^0.6.1"
+ }
+ },
+ "safe-buffer": {
+ "version": "5.1.2",
+ "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
+ "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==",
+ "dev": true
+ },
+ "semver": {
+ "version": "5.7.1",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz",
+ "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==",
+ "dev": true
+ },
+ "source-map": {
+ "version": "0.5.7",
+ "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz",
+ "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=",
+ "dev": true
+ },
+ "supports-color": {
+ "version": "5.5.0",
+ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",
+ "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==",
+ "dev": true,
+ "requires": {
+ "has-flag": "^3.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=",
+ "dev": true
+ },
+ "trim-right": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/trim-right/-/trim-right-1.0.1.tgz",
+ "integrity": "sha1-yy4SAwZ+DI3h9hQJS5/kVwTqYAM=",
+ "dev": true
}
}
}

MODIFY
package.json
package.json
"module": "dist/make-importer.esm.js",
"browser": "dist/make-importer.umd.js",
"scripts": {
- "test": "tape -r esm 'test/**/*.js'",
+ "test": "tape -r esm 'test/**/test-*.js'",
"lint-fix": "eslint --fix '**/*.{js,jsx}'",
"lint-check": "eslint '**/*.{js,jsx}'",
"lint-fix-jessie": "eslint -c '.eslintrc-jessie.js' --fix '**/*.{js,jsx}'",
"lint-check-jessie": "eslint -c '.eslintrc-jessie.js' '**/*.{js,jsx}'"
},
"devDependencies": {
+ "@agoric/transform-module": "^0.1.3",
+ "@babel/core": "^7.6.0",
"eslint": "^6.1.0",
"eslint-config-airbnb-base": "^14.0.0",
"eslint-config-jessie": "0.0.3",

MODIFY
src/moduleInstance.js
src/moduleInstance.js
@@ -9,6 +9,7 @@ const {
getOwnPropertyDescriptors: getProps,
} = Object;
+const evmap = {};
export function makeModuleInstance(
linkageRecord,
importNS,
@@ -21,26 +22,33 @@ export function makeModuleInstance(
// {_localName_: accessor} added to endowments for proxy traps
const trappers = create(null);
- // {_fixedExportName_: init(initValue) -> initValue} used by the
+ // {_localName_: init(initValue) -> initValue} used by the
// rewritten code to initialize exported fixed bindings.
- const constVal = create(null);
+ const constVar = create(null);
- // {_liveExportName_: update(newValue)} used by the rewritten code to
- // both initiailize and update live bindings.
- const letVal = create(null);
+ // {_localName_: update(newValue)} used by the rewritten code to
+ // both initialize and update live bindings.
+ const letVar = create(null);
+
+ // {_localName_: [{get, set, notify}]} used to merge all the export updaters.
+ const localGetNotify = create(null);
// {_importName_: notify(update(newValue))} Used by code that imports
// one of this module's exports, so that their update function will
// be notified when this binding is initialized or updated.
const notifiers = create(null);
- for (const fixedExportName of linkageRecord.fixedExports) {
- const qname = JSON.stringify(fixedExportName);
+ // console.error(linkageRecord);
+ entries(linkageRecord.fixedExportMap).forEach(
+ ([fixedExportName, [localName]]) => {
+ let fixedGetNotify = localGetNotify[localName];
+ if (!fixedGetNotify) {
+ const qname = JSON.stringify(localName);
// fixed binding state
let value;
let tdz = true;
- let optUpdaters = []; // optUpdaters === null iff tdz === false
+ let optUpdaters = [];
// tdz sensitive getter
const get = () => {
@@ -77,18 +85,30 @@ export function makeModuleInstance(
}
};
- defProp(moduleNS, fixedExportName, {
+ // Need these for additional exports of the local variable.
+ fixedGetNotify = {
get,
+ notify,
+ };
+ localGetNotify[localName] = fixedGetNotify;
+ constVar[localName] = init;
+ }
+
+ defProp(moduleNS, fixedExportName, {
+ get: fixedGetNotify.get,
set: undefined,
enumerable: true,
configurable: false,
});
- constVal[fixedExportName] = init;
- notifiers[fixedExportName] = notify;
- }
+ notifiers[fixedExportName] = fixedGetNotify.notify;
+ },
+ );
- for (const [liveExportName, vars] of entries(linkageRecord.liveExportMap)) {
+ entries(linkageRecord.liveExportMap).forEach(
+ ([liveExportName, [localName, setProxyTrap]]) => {
+ let liveGetNotify = localGetNotify[localName];
+ if (!liveGetNotify) {
const qname = JSON.stringify(liveExportName);
// live binding state
@@ -141,14 +161,13 @@ export function makeModuleInstance(
}
};
- defProp(moduleNS, liveExportName, {
+ liveGetNotify = {
get,
- set: undefined,
- enumerable: true,
- configurable: false,
- });
+ notify,
+ };
- for (const localName of vars) {
+ localGetNotify[localName] = liveGetNotify;
+ if (setProxyTrap) {
defProp(trappers, localName, {
get,
set,
@@ -156,11 +175,20 @@ export function makeModuleInstance(
configurable: false,
});
}
-
- letVal[liveExportName] = update;
- notifiers[liveExportName] = notify;
+ letVar[localName] = update;
}
+ defProp(moduleNS, liveExportName, {
+ get: liveGetNotify.get,
+ set: undefined,
+ enumerable: true,
+ configurable: false,
+ });
+
+ notifiers[liveExportName] = liveGetNotify.notify;
+ },
+ );
+
const notifyStar = update => {
update(moduleNS);
};
@@ -169,24 +197,30 @@ export function makeModuleInstance(
// The updateRecord must conform to linkageRecord.imports
// updateRecord = { _specifier_: importUpdaters }
// importUpdaters = { _importName_: [update(newValue)*] }}
- function imports(updateRecord) {
+ async function imports(updateRecord) {
// By the time imports is called, the importNS should already be
// initialized with module instances that satisfy
// linkageRecord.imports.
// importNS = Map[_specifier_, { initialize, notifiers }]
// notifiers = { _importName_: notify(update(newValue))}
+ const ps = [];
for (const [specifier, importUpdaters] of entries(updateRecord)) {
const moduleId = linkageRecord.moduleIds[specifier];
const instance = importNS.get(moduleId);
- instance.initialize(); // bottom up cycle tolerant
+ const p = instance
+ .initialize() // bottom up cycle tolerant
+ .then(() => {
const { notifiers: modNotifiers } = instance;
for (const [importName, updaters] of entries(importUpdaters)) {
const notify = modNotifiers[importName];
- for (const update of updaters) {
- notify(update);
+ for (const updater of updaters) {
+ notify(updater);
}
}
+ });
+ ps.push(p);
}
+ await Promise.all(ps);
}
const endowments = create(null, {
@@ -199,14 +233,18 @@ export function makeModuleInstance(
});
const { functorSource } = linkageRecord;
+ if (evmap[functorSource]) {
+ // console.error(`already evaluated`, linkageRecord.moduleId, functorSource);
+ }
+ evmap[functorSource] = true;
let optFunctor = evaluator(functorSource, endowments);
- function initialize() {
+ async function initialize() {
if (optFunctor) {
// uninitialized
const functor = optFunctor;
optFunctor = null;
// initializing - call with `this` of `undefined`.
- functor(harden({ imports, constVal, letVal }));
+ await functor(harden({ imports, constVar, letVar }));
// initialized
}
}

MODIFY
src/pipeline.js
src/pipeline.js
@@ -29,29 +29,50 @@ export const makeImporter = (importHooks, moduleCache = new Map()) => {
return moduleInstance;
}
- async function loadOne(specifier, referrer) {
+ async function loadOne(specifier, staticRecord, referrer) {
+ let moduleId;
+ if (staticRecord === undefined) {
const scopedRef = resolve(specifier, referrer);
- const moduleId = await locate(scopedRef);
+ moduleId = await locate(scopedRef);
+ } else {
+ // The static record is already prepared, so bypass the rewriter.
+ // This fresh object ensures we don't clash in the cache.
+ moduleId = {
+ toString() {
+ return `${referrer}`;
+ },
+ };
+ }
let loadedP = moduleCache.get(moduleId);
if (!loadedP) {
+ let getStaticRecordP;
+ if (staticRecord === undefined) {
// Begin the recursive load.
- loadedP = retrieve(moduleId)
- .then(body => rewrite(body, moduleId))
- .then(({ staticRecord: sr }) => {
+ getStaticRecordP = retrieve(moduleId).then(body =>
+ rewrite(body, moduleId),
+ );
+ } else {
+ getStaticRecordP = Promise.resolve({ staticRecord });
+ }
+
+ loadedP = getStaticRecordP.then(rs => {
// Prevent circularity.
- const linkageRecord = { ...sr, moduleIds: {}, moduleId };
+ // console.log(`rs`, rs);
+ const linkageRecord = { ...rs.staticRecord, moduleIds: {}, moduleId };
// console.log(`linkageRecord`, linkageRecord);
moduleCache.set(moduleId, linkageRecord);
return Promise.all(
Object.keys(linkageRecord.imports).map(spec =>
- loadOne(spec, moduleId).then(
+ // eslint-disable-next-line no-use-before-define
+ loadOne(spec, undefined, moduleId).then(
// Populate the record from the specifier to the moduleId.
subModuleId => (linkageRecord.moduleIds[spec] = subModuleId),
),
),
);
});
+
moduleCache.set(moduleId, loadedP);
}
@@ -61,20 +82,8 @@ export const makeImporter = (importHooks, moduleCache = new Map()) => {
}
const importer = async (srcSpec, preEndowments) => {
- const { spec, linkageRecord, url } = srcSpec;
- let moduleId;
- if (linkageRecord !== undefined) {
- // The linkage record is already prepared,
- // so bypass the rewriter.
- moduleId = {
- toString() {
- return `linkageRecord:${url}`;
- },
- };
- moduleCache.set(moduleId, linkageRecord);
- } else {
- moduleId = await loadOne(spec, url);
- }
+ const { spec, staticRecord, url } = srcSpec;
+ const moduleId = await loadOne(spec, staticRecord, url);
// Begin initialization of the linked modules.
const moduleInstance = recursiveLink(moduleId, rootLinker, preEndowments);

MODIFY
src/resolve.js
src/resolve.js
@@ -52,7 +52,10 @@ export const makeRootedResolver = root => {
}
}
- const trailingSlash = trailingDots ? '/' : '';
- return rootSlash + appendEls.join('/') + trailingSlash;
+ if (trailingDots) {
+ // If there are any appendEls, ensure they end with a slash.
+ appendEls.push('');
+ }
+ return rootSlash + appendEls.join('/');
};
};

ADD
test/moddir/foo.js
+/* eslint-disable import/no-mutable-exports */
+export const f = 'f';
+export let g = 'g';
+g = 'gChanged';

ADD
test/moddir/index.js
+/* eslint-disable prefer-const,import/no-duplicates,import/no-mutable-exports */
+/* global insist */
+// Adapted from table 43
+// eslint-disable-next-line import/no-named-as-default
+import v from './mod1';
+import * as ns from './mod1';
+import { x } from './mod2';
+import { x as w } from './mod2';
+import './mod3';
+
+insist(v === ns.default, `mod1 imports match`);
+insist(v === 'v', `mod1 is v`);
+insist(ns.v2 === 'v2', `mod1 ns does not have v2`);
+insist(x === w, `reimport does not match`);
+insist(x === 'xChanged', `mutable export not changed`);
+export let mu = 88;
+mu += 1; // live because assigned to
+let lo = 22;
+lo += 1; // live because assigned to
+export { lo as ex };
+export { lo as ex2 };
+
+// Adapted from table 45
+export let co = 77;
+export default 42;
+const xx = 33;
+export { xx };
+
+export { w as vv }; // exports the w we imported. Therefore assumed live.
+export { f } from './foo';
+export { g as h } from './foo';
+// export * from 'foo';

ADD
test/moddir/mod1.js
+export const v = 'v';
+export const v2 = 'v2';
+export default v;

ADD
test/moddir/mod2.js
+// eslint-disable-next-line import/no-mutable-exports
+export let x = 'x';
+x = 'xChanged';

ADD
test/moddir/mod3.js
+// Empty.

MODIFY
test/test-link.js
test/test-link.js
@@ -16,7 +16,7 @@ with (arguments[1]) {
'https://www.example.com/foo/abc',
{
functorSource: `\
-({ letVal, imports }) => {
+({ letVar, imports }) => {
let def;
imports({
'./def': {
@@ -24,7 +24,7 @@ with (arguments[1]) {
},
});
- letVal.abc(def);
+ letVar.abc(def);
}`,
imports: { './def': ['def'] },
fixedExports: [],
@@ -36,7 +36,7 @@ with (arguments[1]) {
[
'https://www.example.com/foo/def',
{
- functorSource: `({ letVal }) => { letVal.def(456); lo ++; }`,
+ functorSource: `({ letVar }) => { letVar.def(456); lo ++; }`,
imports: {},
fixedExports: [],
liveExportMap: { def: ['lo'] },

ADD
test/test-moddir.js
+/* eslint-disable import/no-extraneous-dependencies */
+import { test } from 'tape-promise/tape';
+import makeModuleTransformer from '@agoric/transform-module';
+import * as babelCore from '@babel/core';
+import fs from 'fs';
+import path from 'path';
+
+import makeImporter, * as mi from '../src';
+
+const readFile = ({ pathname }) => fs.promises.readFile(pathname, 'utf-8');
+
+test.only('import moddir', async t => {
+ try {
+ const rootUrl = `file://${path.join(__dirname, 'moddir')}`;
+ const protoHandlers = { file: readFile };
+ // eslint-disable-next-line no-new-func
+ const evaluate = new Function(`\
+with (arguments[1]) {
+ // console.log('evaluate', arguments[0]);
+ return eval(arguments[0]);
+}`);
+
+ const boxedTransform = [];
+ const importer = makeImporter({
+ resolve: mi.makeRootedResolver(rootUrl),
+ locate: mi.makeSuffixLocator('.js'),
+ retrieve: mi.makeProtocolRetriever(protoHandlers),
+ rewrite: mi.makeTransformRewriter(boxedTransform),
+ rootLinker: mi.makeEvaluateLinker(evaluate),
+ });
+ boxedTransform[0] = makeModuleTransformer(babelCore, importer);
+ const endowments = {
+ insist(assertion, description) {
+ if (!assertion) {
+ throw Error(description);
+ }
+ },
+ };
+ t.deepEqual(
+ await importer({ spec: '.', url: `${rootUrl}/` }, endowments),
+ {
+ default: 42,
+ mu: 89,
+ ex: 23,
+ ex2: 23,
+ co: 77,
+ xx: 33,
+ vv: 'xChanged',
+ f: 'f',
+ h: 'gChanged',
+ },
+ `importer works`,
+ );
+ } catch (e) {
+ t.isNot(e, e, 'unexpected exception');
+ } finally {
+ t.end();
+ }
+});

MODIFY
test/test-resolve.js
test/test-resolve.js
@@ -21,6 +21,11 @@ test('rooted resolve', async t => {
TypeError,
`cannot skip root`,
);
+ t.equal(
+ resolve('.', 'file:///some/where/over/'),
+ 'file:///some/where/over/',
+ 'dot preserves slash',
+ );
t.equal(
resolve('.', referrer),
'file:///some/where/over/rainbow/',

linkage fully works