diff --git a/.gitignore b/.gitignore index 3a52a1a51..9e666fe55 100644 --- a/.gitignore +++ b/.gitignore @@ -21,6 +21,7 @@ package-lock.json # IDE metadata .idea/ .vscode/ +*.swp # misc .DS_Store diff --git a/babel-plugin-macros.config.cjs b/babel-plugin-macros.config.cjs index 84eb9bdf6..5ef27590c 100644 --- a/babel-plugin-macros.config.cjs +++ b/babel-plugin-macros.config.cjs @@ -1,4 +1,5 @@ const isDev = process.env.NODE_ENV !== 'production' +console.log('zzmp', isDev) module.exports = { styledComponents: { diff --git a/jest.config.cjs b/jest.config.cjs index 05b8074e4..a56188ab8 100644 --- a/jest.config.cjs +++ b/jest.config.cjs @@ -2,7 +2,7 @@ module.exports = { setupFiles: ['/src/tests/setup.ts'], testEnvironment: 'jsdom', moduleNameMapper: { - '\.scss$': '/src/tests/scssStub', - '\.(png|svg)$': '/src/tests/imageStub', + '.scss$': '/src/tests/scssStub', + '.(png|svg)$': '/src/tests/imageStub', }, } diff --git a/rollup.config.cjs b/rollup.config.cjs index c5c0e97c9..6dbdb03e8 100644 --- a/rollup.config.cjs +++ b/rollup.config.cjs @@ -3,6 +3,7 @@ * This library lives in src/lib, but shares code with the interface application. */ +/* eslint-disable @typescript-eslint/no-var-requires */ const { babel } = require('@rollup/plugin-babel') const commonjs = require('@rollup/plugin-commonjs') const json = require('@rollup/plugin-json') @@ -36,22 +37,22 @@ const transpile = { external: isEthers, plugins: [ // Dependency resolution - externals({ // marks dependencies as external so they are not bundled inline + externals({ exclude: [ 'constants', /@lingui\/(core|react)/, // @lingui incorrectly exports esm, so it must be bundled in /\.json$/, // esm does not support JSON loading, so it must be bundled in - ], + ], // marks dependencies as external so they are not bundled inline deps: true, peerDeps: true, }), resolve({ extensions: EXTENSIONS }), // resolves third-party modules within node_modules/ // Source code transformation - replace({ + replace({ // esm requires fully-specified paths: 'react/jsx-runtime': 'react/jsx-runtime.js', - preventAssignment: true + preventAssignment: true, }), json(), // imports json as ES6; doing so enables module resolution url({ include: ['**/*.png', '**/*.svg'], limit: Infinity }), // imports assets as data URIs @@ -99,25 +100,25 @@ const locales = { { dir: 'dist/cjs', sourcemap: false, - } + }, ], watch: false, - plugins: [ - commonjs(), - multi(), - ], + plugins: [commonjs(), multi()], } -const assets = [{ - ...locales, - output: { - dir: 'dist', - format: 'esm', - sourcemap: false, +const assets = [ + { + ...locales, + output: { + dir: 'dist', + format: 'esm', + sourcemap: false, + }, }, -}] +] const config = [esm, cjs, locales] +config.config = { ...esm, output: { ...esm.output, sourcemap: true } } config.assets = assets module.exports = config diff --git a/src/cosmos/useJsonRpcEndpoint.ts b/src/cosmos/useJsonRpcEndpoint.ts index 538598462..e8df4ec44 100644 --- a/src/cosmos/useJsonRpcEndpoint.ts +++ b/src/cosmos/useJsonRpcEndpoint.ts @@ -2,9 +2,9 @@ import { SupportedChainId } from '@uniswap/widgets' import useOption from './useOption' -const INFURA_KEY = process.env.REACT_APP_INFURA_KEY +const INFURA_KEY = process.env.INFURA_KEY if (typeof INFURA_KEY === 'undefined') { - throw new Error(`REACT_APP_INFURA_KEY must be a defined environment variable`) + throw new Error(`INFURA_KEY must be a defined environment variable`) } export const INFURA_NETWORK_URLS: { [key in SupportedChainId]: string } = { diff --git a/webpack.override.cjs b/webpack.override.cjs index adf93ee6b..9c66f1201 100644 --- a/webpack.override.cjs +++ b/webpack.override.cjs @@ -4,46 +4,65 @@ const EventEmitter = require('events') const HtmlWebpackPlugin = require('html-webpack-plugin') const rollup = require('rollup') -const rollupConfig = require('./rollup.config.cjs') -const { assets: assetConfigs } = rollupConfig +const { config: rollupConfig, assets: assetConfigs } = require('./rollup.config.cjs') +const path = require('path') -class RollupWatchPlugin extends EventEmitter { +class RollupPlugin extends EventEmitter { static PLUGIN_NAME = 'rollup-watch' - constructor({ watchConfig, assetConfigs }) { + constructor({ config, assetConfigs, watch }) { super() - rollup.watch(watchConfig).on('event', (e) => { + if (watch) { + this.watch(config) + } else { + this.rollup(config).then(() => this.emit('END')) + } + + this.initialized = Promise.all([ + ...assetConfigs.map(this.rollup), + new Promise((resolve) => this.once('END', resolve)), + ]) + } + + async rollup(config) { + const build = await rollup.rollup(config) + return await build.write(config.output) + } + + watch(config) { + return rollup.watch(config).on('event', (e) => { this.emit(e.code, e) if (e.result) { e.result.close() } }) - - this.initialized = Promise.all([ - ...assetConfigs.map((config) => rollup.rollup(config).then((build) => build.write(config.output))), - new Promise((resolve) => this.once('END', resolve)), - ]) } - apply(compiler) { - // Waits for rollup to generate assets for the initial compilation. - compiler.hooks.watchRun.tapPromise(RollupWatchPlugin.PLUGIN_NAME, () => this.initialized) + async apply(compiler) { + // Waits for rollup to generate assets before compiling. + compiler.hooks.beforeCompile.tapPromise(RollupPlugin.PLUGIN_NAME, () => this.initialized) - this.on('BUNDLE_END', (({ input, duration }) => console.log(`rollup built ${input} in ${duration}ms`))) - this.initialized.then(() => { - this.on('START', () => console.log('rollup build invalidated by unknown file')) + this.on('BUNDLE_END', ({ input, duration }) => console.log(`rollup built ${input} in ${duration}ms`)) + await this.initialized + this.on('START', () => console.log('rollup build invalidated by unknown file')) - // Invalidates the build when rollup generates a new asset. - this.on('END', () => compiler.watching.invalidate()) - }) + // Invalidates the build when rollup generates a new asset. + this.on('END', () => compiler.watching.invalidate()) } -} +} module.exports = (webpackConfig) => { - const { rules } = webpackConfig.module + const { mode, module, resolve } = webpackConfig + const { rules } = module return { ...webpackConfig, + resolve: { + ...resolve, + alias: { + '@uniswap/widgets': path.resolve(__dirname, 'dist/'), + }, + }, module: { rules: [ ...rules, @@ -55,9 +74,9 @@ module.exports = (webpackConfig) => { ], }, plugins: [ - new RollupWatchPlugin({ watchConfig: rollupConfig, assetConfigs }), + new RollupPlugin({ config: rollupConfig, assetConfigs, watch: mode !== 'production' }), new DefinePlugin({ - 'process.env.REACT_APP_INFURA_KEY': '"4bf032f2d38a4ed6bb975b80d6340847"', + 'process.env.INFURA_KEY': JSON.stringify(process.env.INFURA_KEY || '4bf032f2d38a4ed6bb975b80d6340847'), }), new HtmlWebpackPlugin(), ], diff --git a/yarn.lock b/yarn.lock index a33bcec9a..5fd774f6a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -24,7 +24,7 @@ dependencies: "@babel/highlight" "^7.16.7" -"@babel/compat-data@^7.13.11", "@babel/compat-data@^7.16.4", "@babel/compat-data@^7.16.8", "@babel/compat-data@^7.17.10", "@babel/compat-data@^7.17.7": +"@babel/compat-data@^7.13.11", "@babel/compat-data@^7.16.4", "@babel/compat-data@^7.16.8", "@babel/compat-data@^7.17.10": version "7.17.10" resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.17.10.tgz#711dc726a492dfc8be8220028b1b92482362baab" integrity sha512-GZt/TCsG70Ms19gfZO1tM4CVnXsPgEPBCpJu+Qz3L0LUDsY5nZqFZglIoPC1kIYOtNBZlrnFT+klg12vFGZXrw== @@ -59,7 +59,7 @@ eslint-visitor-keys "^2.1.0" semver "^6.3.0" -"@babel/generator@^7.11.6", "@babel/generator@^7.16.7", "@babel/generator@^7.16.8", "@babel/generator@^7.17.10", "@babel/generator@^7.17.9", "@babel/generator@^7.7.2": +"@babel/generator@^7.11.6", "@babel/generator@^7.17.10", "@babel/generator@^7.7.2": version "7.17.10" resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.17.10.tgz#c281fa35b0c349bbe9d02916f4ae08fc85ed7189" integrity sha512-46MJZZo9y3o4kmhBVc7zW7i8dtR1oIK/sdO5NcfcZRhTGYi+KKJRtHNgsU6c4VUcJmUNV/LQdebD/9Dlv4K+Tg== @@ -83,7 +83,7 @@ "@babel/helper-explode-assignable-expression" "^7.16.7" "@babel/types" "^7.16.7" -"@babel/helper-compilation-targets@^7.13.0", "@babel/helper-compilation-targets@^7.16.7", "@babel/helper-compilation-targets@^7.17.10", "@babel/helper-compilation-targets@^7.17.7": +"@babel/helper-compilation-targets@^7.13.0", "@babel/helper-compilation-targets@^7.16.7", "@babel/helper-compilation-targets@^7.17.10": version "7.17.10" resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.17.10.tgz#09c63106d47af93cf31803db6bc49fef354e2ebe" integrity sha512-gh3RxjWbauw/dFiU/7whjd0qN9K6nPJMqe6+Er7rOavFh0CQUSwhAE3IcTho2rywPJFxej6TUUHDkWcYI6gGqQ== @@ -150,13 +150,6 @@ "@babel/template" "^7.16.7" "@babel/types" "^7.17.0" -"@babel/helper-get-function-arity@^7.16.7": - version "7.16.7" - resolved "https://registry.yarnpkg.com/@babel/helper-get-function-arity/-/helper-get-function-arity-7.16.7.tgz#ea08ac753117a669f1508ba06ebcc49156387419" - integrity sha512-flc+RLSOBXzNzVhcLu6ujeHUrD6tANAOU5ojrRx/as+tbzf8+stUCj7+IfRRoAbEZqj/ahXEMsjhOhgeZsrnTw== - dependencies: - "@babel/types" "^7.16.7" - "@babel/helper-hoist-variables@^7.16.7": version "7.16.7" resolved "https://registry.yarnpkg.com/@babel/helper-hoist-variables/-/helper-hoist-variables-7.16.7.tgz#86bcb19a77a509c7b77d0e22323ef588fa58c246" @@ -265,7 +258,7 @@ "@babel/traverse" "^7.16.8" "@babel/types" "^7.16.8" -"@babel/helpers@^7.16.7", "@babel/helpers@^7.17.9": +"@babel/helpers@^7.17.9": version "7.17.9" resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.17.9.tgz#b2af120821bfbe44f9907b1826e168e819375a1a" integrity sha512-cPCt915ShDWUEzEp3+UNRktO2n6v49l5RSnG9M5pS24hA+2FAc5si+Pn1i4VVbQQ+jh+bIZhPFQOJOzbrOYY1Q== @@ -283,7 +276,7 @@ chalk "^2.0.0" js-tokens "^4.0.0" -"@babel/parser@^7.1.0", "@babel/parser@^7.11.5", "@babel/parser@^7.14.7", "@babel/parser@^7.16.7", "@babel/parser@^7.16.8", "@babel/parser@^7.17.10", "@babel/parser@^7.17.9": +"@babel/parser@^7.1.0", "@babel/parser@^7.11.5", "@babel/parser@^7.14.7", "@babel/parser@^7.16.7", "@babel/parser@^7.17.10": version "7.17.10" resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.17.10.tgz#873b16db82a8909e0fbd7f115772f4b739f6ce78" integrity sha512-n2Q6i+fnJqzOaq2VkdXxy2TCPCWQZHiCo0XqmrCvDWcZQKRyZzYi4Z0yxlBuN0w+r2ZHmre+Q087DSrw3pbJDQ== @@ -2540,7 +2533,7 @@ jest-diff "^25.2.1" pretty-format "^25.2.1" -"@types/json-schema@*", "@types/json-schema@^7.0.5", "@types/json-schema@^7.0.7", "@types/json-schema@^7.0.8", "@types/json-schema@^7.0.9": +"@types/json-schema@*", "@types/json-schema@^7.0.5", "@types/json-schema@^7.0.8", "@types/json-schema@^7.0.9": version "7.0.11" resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.11.tgz#d421b6c527a3037f7c84433fd2c4229e016863d3" integrity sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ== @@ -3680,7 +3673,7 @@ array-flatten@1.1.1: resolved "https://registry.yarnpkg.com/array-flatten/-/array-flatten-1.1.1.tgz#9a5f699051b1e7073328f2a008968b64ea2955d2" integrity sha1-ml9pkFGx5wczKPKgCJaLZOopVdI= -array-includes@^3.1.2, array-includes@^3.1.4: +array-includes@^3.1.4: version "3.1.4" resolved "https://registry.yarnpkg.com/array-includes/-/array-includes-3.1.4.tgz#f5b493162c760f3539631f005ba2bb46acb45ba9" integrity sha512-ZTNSQkmWumEbiHO2GF4GmWxYVTiQyJy2XOTa15sdQSrvKn7l+180egQMqlrMOUMCyLMD7pmyQe4mMDUT6Behrw== @@ -4113,7 +4106,7 @@ browser-process-hrtime@^1.0.0: resolved "https://registry.yarnpkg.com/browser-process-hrtime/-/browser-process-hrtime-1.0.0.tgz#3c9b4b7d782c8121e56f10106d84c0d0ffc94626" integrity sha512-9o5UecI3GhkpM6DrXr69PblIuWxPKk9Y0jHBRhdocZ2y7YECBFCsHm79Pr3OyR2AvjhDkabFJaDJMYRazHgsow== -browserslist@^4.14.5, browserslist@^4.17.5, browserslist@^4.19.1, browserslist@^4.20.2: +browserslist@^4.14.5, browserslist@^4.19.1, browserslist@^4.20.2: version "4.20.3" resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.20.3.tgz#eb7572f49ec430e054f56d52ff0ebe9be915f8bf" integrity sha512-NBhymBQl1zM0Y5dQT/O+xiLP9/rzOIQdKM/eMJBAq7yBgaB6krIYLGejrwVYnSHZdqjscB1SPuAjHwxjvN6Wdg== @@ -4250,7 +4243,7 @@ camelize@^1.0.0: resolved "https://registry.npmjs.org/camelize/-/camelize-1.0.0.tgz" integrity sha1-FkpUg+Yw+kMh5a8HAg5TGDGyYJs= -caniuse-lite@^1.0.30001286, caniuse-lite@^1.0.30001332: +caniuse-lite@^1.0.30001332: version "1.0.30001332" resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001332.tgz#39476d3aa8d83ea76359c70302eafdd4a1d727dd" integrity sha512-10T30NYOEQtN6C11YGg411yebhvpnC6Z102+B95eAsN0oB6KUs01ivE8u+G6FMIRtIrVlYXhL+LUwQ3/hXwDWw== @@ -4982,7 +4975,7 @@ eip1193-provider@1.0.1: dependencies: "@json-rpc-tools/provider" "^1.5.5" -electron-to-chromium@^1.4.118, electron-to-chromium@^1.4.17: +electron-to-chromium@^1.4.118: version "1.4.123" resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.123.tgz#de88ea7fd29d7c868e63c88f129e91494bcf3266" integrity sha512-0pHGE53WkYoFbsgwYcVKEpWa6jbzlvkohIEA2CUoZ9b5KC+w/zlMiQHvW/4IBcOh7YoEFqRNavgTk02TBoUTUw== @@ -5803,7 +5796,7 @@ flatted@^3.1.0: resolved "https://registry.yarnpkg.com/flatted/-/flatted-3.2.2.tgz#64bfed5cb68fe3ca78b3eb214ad97b63bedce561" integrity sha512-JaTY/wtrcSyvXJl4IMFHPKyFur1sE9AUqc0QnhOaJ0CxHtAoIV8pYDzeEfAaNEtGkOfq4gr3LBFmdXW5mOQFnA== -follow-redirects@^1.0.0, follow-redirects@^1.10.0, follow-redirects@^1.14.0: +follow-redirects@^1.0.0, follow-redirects@^1.14.0: version "1.14.9" resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.14.9.tgz#dd4ea157de7bfaf9ea9b3fbd85aa16951f78d8d7" integrity sha512-MQDfihBQYMcyy5dhRDJUHcw7lb2Pv/TuE6xP1vyraLukNDHKbDxDNaOE3NbCAdKQApno+GPRyo1YAp89yCjK4w== @@ -6479,7 +6472,7 @@ is-module@^1.0.0: resolved "https://registry.yarnpkg.com/is-module/-/is-module-1.0.0.tgz#3258fb69f78c14d5b815d664336b4cffb6441591" integrity sha1-Mlj7afeMFNW4FdZkM2tM/7ZEFZE= -is-negative-zero@^2.0.1, is-negative-zero@^2.0.2: +is-negative-zero@^2.0.2: version "2.0.2" resolved "https://registry.yarnpkg.com/is-negative-zero/-/is-negative-zero-2.0.2.tgz#7bf6f03a28003b8b3965de3ac26f664d765f3150" integrity sha512-dqJvarLawXsFbNDeJW7zAz8ItJ9cd28YufuuFzh0G8pNHjJMnY08Dv7sYX2uF5UpQOwieAeOExEYAWWfu7ZZUA== @@ -6526,7 +6519,7 @@ is-regex@^1.1.4: call-bind "^1.0.2" has-tostringtag "^1.0.0" -is-shared-array-buffer@^1.0.1, is-shared-array-buffer@^1.0.2: +is-shared-array-buffer@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/is-shared-array-buffer/-/is-shared-array-buffer-1.0.2.tgz#8f259c573b60b6a32d4058a1a07430c0a7344c79" integrity sha512-sqN2UDu1/0y6uvXyStCOzyhAjCSlHceFoMKJW8W9EU9cvic/QdsZ0kEU93HEy3IUEFZIiH/3w+AH/UQbPHNdhA== @@ -6562,7 +6555,7 @@ is-unicode-supported@^0.1.0: resolved "https://registry.yarnpkg.com/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz#3f26c76a809593b52bfa2ecb5710ed2779b522a7" integrity sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw== -is-weakref@^1.0.1, is-weakref@^1.0.2: +is-weakref@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/is-weakref/-/is-weakref-1.0.2.tgz#9529f383a9338205e89765e0392efc2f100f06f2" integrity sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ== @@ -7530,11 +7523,6 @@ micromatch@^4.0.2, micromatch@^4.0.4: braces "^3.0.1" picomatch "^2.2.3" -mime-db@1.49.0: - version "1.49.0" - resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.49.0.tgz#f3dfde60c99e9cf3bc9701d687778f537001cbed" - integrity sha512-CIc8j9URtOVApSFCQIF+VBkX1RwXp/oMMOrqdyXSBXq5RWNEsRfyj1kiRnQgmNXmHxPoFIxOroKA3zcU9P+nAA== - mime-db@1.52.0: version "1.52.0" resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.52.0.tgz#bbabcdc02859f4987301c856e3387ce5ec43bf70" @@ -7726,11 +7714,6 @@ node-cache@^5.1.2: dependencies: clone "2.x" -node-fetch@2.6.1: - version "2.6.1" - resolved "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.1.tgz" - integrity sha512-V4aYg89jEoVRxRb2fJdAg8FHvI7cEyYdVAh94HH0UIK8oJxUfkjlDQN9RbMx+bEjP7+ggMiFRprSti032Oipxw== - node-fetch@2.6.7: version "2.6.7" resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.7.tgz#24de9fba827e3b4ae44dc8b20256a379160052ad" @@ -7755,7 +7738,7 @@ node-int64@^0.4.0: resolved "https://registry.yarnpkg.com/node-int64/-/node-int64-0.4.0.tgz#87a9065cdb355d3182d8f94ce11188b825c68a3b" integrity sha1-h6kGXNs1XTGC2PlM4RGIuCXGijs= -node-releases@^2.0.1, node-releases@^2.0.3: +node-releases@^2.0.3: version "2.0.3" resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.3.tgz#225ee7488e4a5e636da8da52854844f9d716ca96" integrity sha512-maHFz6OLqYxz+VQyCAtA3PTX4UP/53pa05fyDNc9CwjvJ0yEh6+xBwKsgCxMNhS8taUKBFYxfuiaD9U/55iFaw== @@ -7807,7 +7790,7 @@ object-component@0.0.3: resolved "https://registry.yarnpkg.com/object-component/-/object-component-0.0.3.tgz#f0c69aa50efc95b866c186f400a33769cb2f1291" integrity sha1-8MaapQ78lbhmwYb0AKM3acsvEpE= -object-inspect@^1.11.0, object-inspect@^1.12.0, object-inspect@^1.9.0: +object-inspect@^1.12.0, object-inspect@^1.9.0: version "1.12.0" resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.12.0.tgz#6e2c120e868fd1fd18cb4f18c31741d0d6e776f0" integrity sha512-Ho2z80bVIvJloH+YzRmpZVQe87+qASmBUKZDWgx9cu+KDrX2ZDH/3tMy+gXbZETVGs2M8YdxObOh7XAtim9Y0g== @@ -8544,7 +8527,7 @@ react-feather@^2.0.8: dependencies: prop-types "^15.7.2" -react-is@^16.12.0, react-is@^16.13.1, react-is@^16.7.0, react-is@^16.8.1: +react-is@^16.12.0, react-is@^16.13.1, react-is@^16.7.0: version "16.13.1" resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.13.1.tgz#789729a4dc36de2999dc156dd6c1d9c18cea56a4" integrity sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ== @@ -9191,7 +9174,7 @@ source-map-support@^0.5.17, source-map-support@^0.5.6, source-map-support@~0.5.2 buffer-from "^1.0.0" source-map "^0.6.0" -source-map@^0.5.0, source-map@^0.5.7: +source-map@^0.5.7: version "0.5.7" resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc" integrity sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=