diff --git a/gulp/tasks/auth.js b/gulp/tasks/auth.js index fd42318c04..6d39fe30c8 100644 --- a/gulp/tasks/auth.js +++ b/gulp/tasks/auth.js @@ -16,7 +16,7 @@ async function buildAuth(es6) { const stream = gulp.src(path.resolve(config.polymer_dir, 'src/authorize.html')) .pipe(replace([ ['', es6 ? '' : es5Extra], - ['/home-assistant-polymer/build/webpack/ha-authorize.js', `/${frontendPath}/authorize.js`], + ['/home-assistant-polymer/hass_frontend/authorize.js', `/${frontendPath}/authorize.js`], ])); return minifyStream(stream, /* es6= */ es6) diff --git a/gulp/tasks/build.js b/gulp/tasks/build.js deleted file mode 100644 index a2a27754ca..0000000000 --- a/gulp/tasks/build.js +++ /dev/null @@ -1,65 +0,0 @@ -const gulp = require('gulp'); -const filter = require('gulp-filter'); -const { PolymerProject, } = require('polymer-build'); -const { - composeStrategies, - generateShellMergeStrategy, -} = require('polymer-bundler'); -const mergeStream = require('merge-stream'); -const rename = require('gulp-rename'); - -const polymerConfig = require('../../polymer'); - -const minifyStream = require('../common/transform').minifyStream; -const { - stripImportsStrategy, - stripAllButEntrypointStrategy -} = require('../common/strategy'); - -function renamePanel(path) { - // Rename panels to be panels/* and not their subdir - if (path.basename.substr(0, 9) === 'ha-panel-' && path.extname === '.html') { - path.dirname = 'panels/'; - } - - // Rename frontend - if (path.dirname === 'src' && path.basename === 'home-assistant' && - path.extname === '.html') { - path.dirname = ''; - path.basename = 'frontend'; - } -} - -function build(es6) { - return; - const strategy = composeStrategies([ - generateShellMergeStrategy(polymerConfig.shell), - stripImportsStrategy([ - 'bower_components/font-roboto/roboto.html', - 'bower_components/paper-styles/color.html', - ]), - stripAllButEntrypointStrategy('panels/hassio/ha-panel-hassio.html') - ]); - const project = new PolymerProject(polymerConfig); - - return mergeStream( - minifyStream(project.sources(), es6), - minifyStream(project.dependencies(), es6) - ) - .pipe(project.bundler({ - strategy, - strip: true, - sourcemaps: false, - stripComments: true, - inlineScripts: true, - inlineCss: true, - implicitStrip: true, - })) - .pipe(rename(renamePanel)) - .pipe(filter(['**', '!src/entrypoint.html'])) - .pipe(gulp.dest(es6 ? 'build' : 'build-es5')); -} -gulp.task('build_es5', ['ru_all', 'ru_all_es5', 'build-translations'], () => build(/* es6= */ false)); -gulp.task('build_es6', ['ru_all', 'build-translations'], () => build(/* es6= */ true)); - -gulp.task('build', ['build_es5', 'build_es6']); diff --git a/gulp/tasks/clean.js b/gulp/tasks/clean.js deleted file mode 100644 index 99a9c9ac97..0000000000 --- a/gulp/tasks/clean.js +++ /dev/null @@ -1,4 +0,0 @@ -const del = require('del'); -const gulp = require('gulp'); - -gulp.task('clean', () => del(['build-es5', 'build', 'build-temp-es5', 'build-temp', 'build-translations'])); diff --git a/gulp/tasks/default.js b/gulp/tasks/default.js deleted file mode 100644 index 59bc5b7a20..0000000000 --- a/gulp/tasks/default.js +++ /dev/null @@ -1,7 +0,0 @@ -const gulp = require('gulp'); -const runSequence = require('run-sequence'); - -gulp.task('default', () => runSequence.use(gulp)( - 'clean', - 'build', -)); diff --git a/gulp/tasks/gen-index-html.js b/gulp/tasks/gen-index-html.js index c1e019a89c..1b65979d6b 100644 --- a/gulp/tasks/gen-index-html.js +++ b/gulp/tasks/gen-index-html.js @@ -7,8 +7,8 @@ const md5 = require('../common/md5'); const { minifyStream } = require('../common/transform'); const buildReplaces = { - '/home-assistant-polymer/build/core.js': 'core.js', - '/home-assistant-polymer/build/webpack/app.js': 'app.js', + '/home-assistant-polymer/hass_frontend/core.js': 'core.js', + '/home-assistant-polymer/hass_frontend/app.js': 'app.js', }; function generateIndex(es6) { diff --git a/gulp/tasks/rollup.js b/gulp/tasks/rollup.js deleted file mode 100644 index bd62ed8393..0000000000 --- a/gulp/tasks/rollup.js +++ /dev/null @@ -1,119 +0,0 @@ -const fs = require('fs'); -const gulp = require('gulp'); -const rollupEach = require('gulp-rollup-each'); -const commonjs = require('rollup-plugin-commonjs'); -const nodeResolve = require('rollup-plugin-node-resolve'); -const replace = require('rollup-plugin-replace'); -const babel = require('rollup-plugin-babel'); -const uglify = require('../common/gulp-uglify.js'); - -const DEV = !!JSON.parse(process.env.BUILD_DEV || 'true'); -const DEMO = !!JSON.parse(process.env.BUILD_DEMO || 'false'); -const version = fs.readFileSync('setup.py', 'utf8').match(/\d{8}[^']*/); -if (!version) { - throw Error('Version not found'); -} -const VERSION = version[0]; - -function getRollupInputOptions(es6) { - const babelOpts = { - babelrc: false, - plugins: [ - 'external-helpers', - 'transform-object-rest-spread', - [ - 'transform-react-jsx', - { - pragma: 'h' - } - ], - ] - }; - - if (!es6) { - babelOpts.presets = [ - [ - 'env', - { - modules: false - } - ] - ]; - } - - return { - plugins: [ - babel(babelOpts), - - nodeResolve({ - jsnext: true, - main: true, - }), - - commonjs(), - - replace({ - values: { - __DEV__: JSON.stringify(DEV), - __DEMO__: JSON.stringify(DEMO), - __BUILD__: JSON.stringify(es6 ? 'latest' : 'es5'), - __VERSION__: JSON.stringify(VERSION), - }, - }), - ], - }; -} - -const rollupOutputOptions = { - format: 'iife', - exports: 'none', -}; - -gulp.task('run_rollup_es5', () => gulp.src([ - 'js/core.js', - 'js/compatibility.js', - 'demo_data/demo_data.js', -]) - .pipe(rollupEach(getRollupInputOptions(/* es6= */ false), rollupOutputOptions)) - .on('error', err => console.error(err.message)) - .pipe(gulp.dest('build-temp-es5'))); - -gulp.task('run_rollup', () => gulp.src([ - 'js/core.js', - 'js/util.js', - 'demo_data/demo_data.js', -]) - .pipe(rollupEach(getRollupInputOptions(/* es6= */ true), rollupOutputOptions)) - .on('error', err => console.error(err.message)) - .pipe(gulp.dest('build-temp'))); - -gulp.task('ru_all_es5', ['run_rollup_es5'], () => { - gulp.src([ - 'build-temp-es5/core.js', - 'build-temp-es5/compatibility.js', - ]) - .pipe(uglify(/* es6= */ false, { sourceMap: false })) - .pipe(gulp.dest('build-es5/')); -}); - -gulp.task('ru_all', ['run_rollup'], () => { - gulp.src([ - 'build-temp/core.js', - ]) - .pipe(uglify(/* es6= */ true, { sourceMap: false })) - .pipe(gulp.dest('build/')); -}); - -gulp.task('watch_ru_all', ['ru_all'], () => { - gulp.watch([ - 'js/**/*.js', - 'demo_data/**/*.js' - ], ['ru_all']); -}); - -gulp.task('watch_ru_all_es5', ['ru_all_es5'], () => { - gulp.watch([ - 'js/**/*.js', - 'demo_data/**/*.js' - ], ['ru_all_es5']); -}); diff --git a/index.html b/index.html index a2b7ad3080..a9604b7589 100644 --- a/index.html +++ b/index.html @@ -9,7 +9,7 @@ - + @@ -100,10 +100,9 @@ }); } */ - - - + + {% for extra_url in extra_urls -%} diff --git a/js/core.js b/js/core.js index 6e9f0bc484..e78ac67388 100644 --- a/js/core.js +++ b/js/core.js @@ -5,14 +5,10 @@ import refreshToken_ from './common/auth/refresh_token.js'; import parseQuery from './common/util/parse_query.js'; window.HAWS = HAWS; -window.HASS_DEMO = __DEMO__; -window.HASS_DEV = __DEV__; -window.HASS_BUILD = __BUILD__; -window.HASS_VERSION = __VERSION__; const init = window.createHassConnection = function (password, accessToken) { const proto = window.location.protocol === 'https:' ? 'wss' : 'ws'; - const url = `${proto}://${window.location.host}/api/websocket?${window.HASS_BUILD}`; + const url = `${proto}://${window.location.host}/api/websocket?${__BUILD__}`; const options = { setupRetry: 10, }; @@ -94,7 +90,7 @@ window.addEventListener('error', (e) => { const homeAssistant = document.querySelector('home-assistant'); if (homeAssistant && homeAssistant.hass && homeAssistant.hass.callService) { homeAssistant.hass.callService('system_log', 'write', { - logger: `frontend.${window.HASS_DEV ? 'js_dev' : 'js'}.${window.HASS_BUILD}.${window.HASS_VERSION.replace('.', '')}`, + logger: `frontend.${__DEV__ ? 'js_dev' : 'js'}.${__BUILD__}.${__VERSION__.replace('.', '')}`, message: `${e.filename}:${e.lineno}:${e.colno} ${e.message}`, }); } diff --git a/package.json b/package.json index 40925854c0..20aa192cc3 100644 --- a/package.json +++ b/package.json @@ -8,13 +8,8 @@ "version": "1.0.0", "scripts": { "clean": "rm -rf build/* build-temp/* build-es5/* build-temp-es5/* build-translations/*", - "gulp": "gulp", - "build": "BUILD_DEV=0 gulp && NODE_ENV=production webpack -p", - "build_demo": "BUILD_DEV=0 BUILD_DEMO=1 gulp", + "build": "script/build_frontend", "dev": "npm run gulp ru_all gen-service-worker", - "dev-watch": "npm run gulp watch_ru_all gen-service-worker", - "dev-es5": "npm run gulp ru_all_es5 gen-service-worker-es5", - "dev-watch-es5": "npm run gulp watch_ru_all_es5 gen-service-worker-es5", "lint_js": "eslint src panels js hassio test-mocha", "lint_html": "polymer lint", "mocha": "node_modules/.bin/mocha --opts test-mocha/mocha.opts", @@ -94,6 +89,7 @@ "babel-plugin-transform-react-jsx": "^6.24.1", "babel-preset-env": "^1.6.1", "chai": "^4.1.2", + "copy-webpack-plugin": "^4.5.1", "css-slam": "^2.0.2", "del": "^3.0.0", "eslint": "^4.11.0", diff --git a/panels/config/automation/ha-automation-editor.js b/panels/config/automation/ha-automation-editor.js index 2e87527b70..923bdec9fd 100644 --- a/panels/config/automation/ha-automation-editor.js +++ b/panels/config/automation/ha-automation-editor.js @@ -23,7 +23,6 @@ import '../../../src/components/ha-markdown.js'; import '../../../src/components/ha-service-picker.js'; import '../../../src/layouts/ha-app-layout.js'; import '../../../src/util/hass-mixins.js'; -import '../ha-config-js.js'; import '../ha-config-section.js'; import Automation from '../../../js/panel-config/automation.js'; import unmountPreact from '../../../js/common/preact/unmount.js'; diff --git a/panels/config/ha-config-js.js b/panels/config/ha-config-js.js deleted file mode 100644 index 8b13789179..0000000000 --- a/panels/config/ha-config-js.js +++ /dev/null @@ -1 +0,0 @@ - diff --git a/panels/config/script/ha-script-editor.js b/panels/config/script/ha-script-editor.js index 71c1dd2f44..9f86b143a7 100644 --- a/panels/config/script/ha-script-editor.js +++ b/panels/config/script/ha-script-editor.js @@ -21,7 +21,6 @@ import '../../../src/components/entity/ha-entity-picker.js'; import '../../../src/components/ha-combo-box.js'; import '../../../src/layouts/ha-app-layout.js'; import '../../../src/util/hass-mixins.js'; -import '../ha-config-js.js'; import '../ha-config-section.js'; import Script from '../../../js/panel-config/script.js'; import unmountPreact from '../../../js/common/preact/unmount.js'; diff --git a/panels/dev-info/ha-panel-dev-info.js b/panels/dev-info/ha-panel-dev-info.js index 1dda0501b9..121c566efb 100644 --- a/panels/dev-info/ha-panel-dev-info.js +++ b/panels/dev-info/ha-panel-dev-info.js @@ -254,7 +254,7 @@ class HaPanelDevInfo extends PolymerElement { jsVersion: { type: String, - value: window.HASS_BUILD, + value: __BUILD__, }, customUiList: { diff --git a/panels/hassio/ha-panel-hassio.js b/panels/hassio/ha-panel-hassio.js index 76cc0bf36c..eb4e0f0efe 100644 --- a/panels/hassio/ha-panel-hassio.js +++ b/panels/hassio/ha-panel-hassio.js @@ -31,7 +31,7 @@ class HaPanelHassio extends iframeUrl: { type: String, - value: window.HASS_DEV ? + value: __DEV__ ? '/home-assistant-polymer/hassio/index.html' : '/api/hassio/app-es5/index.html', } }; diff --git a/panels/map/ha-panel-map.js b/panels/map/ha-panel-map.js index b1d9a17928..2945835386 100644 --- a/panels/map/ha-panel-map.js +++ b/panels/map/ha-panel-map.js @@ -55,7 +55,7 @@ class HaPanelMap extends window.hassMixins.LocalizeMixin(PolymerElement) { super.connectedCallback(); var map = this._map = Leaflet.map(this.$.map); var style = document.createElement('link'); - style.setAttribute('href', window.HASS_DEV ? + style.setAttribute('href', __DEV__ ? '/home-assistant-polymer/bower_components/leaflet/dist/leaflet.css' : '/static/images/leaflet/leaflet.css'); style.setAttribute('rel', 'stylesheet'); diff --git a/script/build_frontend b/script/build_frontend index db785789b5..45cbe04c2c 100755 --- a/script/build_frontend +++ b/script/build_frontend @@ -9,46 +9,21 @@ cd "$(dirname "$0")/.." OUTPUT_DIR=hass_frontend OUTPUT_DIR_ES5=hass_frontend_es5 -rm -rf $OUTPUT_DIR $OUTPUT_DIR_ES5 +rm -rf $OUTPUT_DIR $OUTPUT_DIR_ES5 build-translations cp -r public $OUTPUT_DIR mkdir $OUTPUT_DIR_ES5 cp -r public/__init__.py $OUTPUT_DIR_ES5/ # Build frontend -BUILD_DEV=0 ./node_modules/.bin/gulp +BUILD_DEV=0 ./node_modules/.bin/gulp build-translations authorize authorize-es5 NODE_ENV=production webpack -p -BUILD_DEV=0 ./node_modules/.bin/gulp authorize authorize-es5 - -# Copy frontend to output -cp build/core.js $OUTPUT_DIR -cp build/webpack/* $OUTPUT_DIR -cp build-es5/core.js $OUTPUT_DIR_ES5 -cp build-es5/webpack/* $OUTPUT_DIR_ES5 -cp build-es5/compatibility.js $OUTPUT_DIR_ES5 - -# Translations -cp -r build-translations/output $OUTPUT_DIR/translations - -# Local Roboto -cp -r node_modules/@polymer/font-roboto-local/fonts $OUTPUT_DIR - -# Polyfill web components -cp node_modules/@webcomponents/webcomponentsjs/webcomponents-bundle.js $OUTPUT_DIR -cp node_modules/@webcomponents/webcomponentsjs/custom-elements-es5-adapter.js $OUTPUT_DIR_ES5 # Icons script/update_mdi.py -# Leaflet -mkdir $OUTPUT_DIR/images/leaflet -cp node_modules/leaflet/dist/leaflet.css $OUTPUT_DIR/images/leaflet -cp -r node_modules/leaflet/dist/images $OUTPUT_DIR/images/leaflet/ - ./node_modules/.bin/gulp compress # Stub the service worker -touch build/service_worker.js -touch build-es5/service_worker.js touch hass_frontend/service_worker.js touch hass_frontend_es5/service_worker.js diff --git a/src/authorize.html b/src/authorize.html index fca9fd3b14..98d0b9368e 100644 --- a/src/authorize.html +++ b/src/authorize.html @@ -21,6 +21,6 @@ addScript('/static/webcomponents-lite.js'); } - + diff --git a/src/util/hass-call-api.js b/src/util/hass-call-api.js index f10756e4db..50989d8d42 100644 --- a/src/util/hass-call-api.js +++ b/src/util/hass-call-api.js @@ -1,31 +1,6 @@ window.hassCallApi = function (host, auth, method, path, parameters) { var url = host + '/api/' + path; - if (window.HASS_DEMO) { - var component = path.split('/', 1)[0]; - var data; - switch (component) { - case 'bootstrap': - data = window.hassDemoData.bootstrap; - break; - case 'logbook': - data = window.hassDemoData.logbook; - break; - case 'history': - data = window.hassDemoData.stateHistory; - break; - default: - data = false; - } - return new Promise(function (resolve, reject) { - if (data) { - resolve(data); - } else { - reject(new Error('Request not allowed in demo mode.')); - } - }); - } - return new Promise(function (resolve, reject) { var req = new XMLHttpRequest(); req.open(method, url, true); diff --git a/webpack.config.js b/webpack.config.js index dbcfdd2650..edd304ca6d 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -1,7 +1,16 @@ +const fs = require('fs'); const path = require('path'); +const webpack = require('webpack'); +const CopyWebpackPlugin = require('copy-webpack-plugin'); + +const version = fs.readFileSync('setup.py', 'utf8').match(/\d{8}[^']*/); +if (!version) { + throw Error('Version not found'); +} +const VERSION = version[0]; function createConfig(isProdBuild, latestBuild) { - let buildPath = latestBuild ? 'build/webpack/' : 'build-es5/webpack/'; + let buildPath = latestBuild ? 'hass_frontend/' : 'hass_frontend_es5/'; let publicPath; if (isProdBuild) { @@ -10,6 +19,12 @@ function createConfig(isProdBuild, latestBuild) { publicPath = `/home-assistant-polymer/${buildPath}`; } + const entry = { + app: './src/home-assistant.js', + authorize: './src/auth/ha-authorize.js', + core: './js/core.js', + }; + const babelOptions = { plugins: [ // Only support the syntax, Webpack will handle it. @@ -23,10 +38,30 @@ function createConfig(isProdBuild, latestBuild) { ], }; - if (!latestBuild) { + const plugins = [ + new webpack.DefinePlugin({ + __DEV__: JSON.stringify(!isProdBuild), + __BUILD__: JSON.stringify(latestBuild ? 'latest' : 'es5'), + __VERSION__: JSON.stringify(VERSION), + }) + ]; + + if (latestBuild) { + plugins.push(CopyWebpackPlugin([ + { from: 'build-translations/output', to: `translations` }, + 'node_modules/@polymer/font-roboto-local', + 'node_modules/@webcomponents/webcomponentsjs/webcomponents-bundle.js', + { from: 'node_modules/leaflet/dist/leaflet.css', to: `images/leaflet/` }, + { from: 'node_modules/leaflet/dist/images', to: `images/leaflet/` }, + ])); + } else { + plugins.push(CopyWebpackPlugin([ + 'node_modules/@webcomponents/webcomponentsjs/custom-elements-es5-adapter.js', + ])); babelOptions.presets = [ ['es2015', { modules: false }] ]; + entry.compatibility = './js/compatibility.js'; } const chunkFilename = isProdBuild ? @@ -34,10 +69,7 @@ function createConfig(isProdBuild, latestBuild) { return { mode: isProdBuild ? 'production' : 'development', - entry: { - app: './src/home-assistant.js', - authorize: './src/auth/ha-authorize.js' - }, + entry, module: { rules: [ { @@ -49,6 +81,7 @@ function createConfig(isProdBuild, latestBuild) { } ] }, + plugins, output: { filename: '[name].js', chunkFilename: chunkFilename, diff --git a/yarn.lock b/yarn.lock index 3113ee083b..dc4c7bfb00 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2660,7 +2660,7 @@ babel-plugin-syntax-jsx@^6.8.0: version "6.18.0" resolved "https://registry.yarnpkg.com/babel-plugin-syntax-jsx/-/babel-plugin-syntax-jsx-6.18.0.tgz#0af32a9a6e13ca7a3fd5069e62d7b0f58d0d8946" -babel-plugin-syntax-object-rest-spread@^6.13.0, babel-plugin-syntax-object-rest-spread@^6.8.0: +babel-plugin-syntax-object-rest-spread@^6.8.0: version "6.13.0" resolved "https://registry.yarnpkg.com/babel-plugin-syntax-object-rest-spread/-/babel-plugin-syntax-object-rest-spread-6.13.0.tgz#fd6536f2bce13836ffa3a5458c4903a597bb3bf5" @@ -2917,7 +2917,7 @@ babel-plugin-transform-minify-booleans@^6.10.0-alpha.caaefb4c: version "6.10.0-alpha.f95869d4" resolved "https://registry.yarnpkg.com/babel-plugin-transform-minify-booleans/-/babel-plugin-transform-minify-booleans-6.10.0-alpha.f95869d4.tgz#1deef69c22135038a91de1f5d13d759e3464c43c" -babel-plugin-transform-object-rest-spread@^6.22.0, babel-plugin-transform-object-rest-spread@^6.26.0: +babel-plugin-transform-object-rest-spread@^6.22.0: version "6.26.0" resolved "https://registry.yarnpkg.com/babel-plugin-transform-object-rest-spread/-/babel-plugin-transform-object-rest-spread-6.26.0.tgz#0f36692d50fef6b7e2d4b3ac1478137a963b7b06" dependencies: @@ -4206,6 +4206,19 @@ copy-descriptor@^0.1.0: version "0.1.1" resolved "https://registry.yarnpkg.com/copy-descriptor/-/copy-descriptor-0.1.1.tgz#676f6eb3c39997c2ee1ac3a924fd6124748f578d" +copy-webpack-plugin@^4.5.1: + version "4.5.1" + resolved "https://registry.yarnpkg.com/copy-webpack-plugin/-/copy-webpack-plugin-4.5.1.tgz#fc4f68f4add837cc5e13d111b20715793225d29c" + dependencies: + cacache "^10.0.4" + find-cache-dir "^1.0.0" + globby "^7.1.1" + is-glob "^4.0.0" + loader-utils "^1.1.0" + minimatch "^3.0.4" + p-limit "^1.0.0" + serialize-javascript "^1.4.0" + core-js@^1.0.0: version "1.2.7" resolved "https://registry.yarnpkg.com/core-js/-/core-js-1.2.7.tgz#652294c14651db28fa93bd2d5ff2983a4f08c636" @@ -6027,6 +6040,17 @@ globby@^6.1.0: pify "^2.0.0" pinkie-promise "^2.0.0" +globby@^7.1.1: + version "7.1.1" + resolved "https://registry.yarnpkg.com/globby/-/globby-7.1.1.tgz#fb2ccff9401f8600945dfada97440cca972b8680" + dependencies: + array-union "^1.0.1" + dir-glob "^2.0.0" + glob "^7.1.2" + ignore "^3.3.5" + pify "^3.0.0" + slash "^1.0.0" + globby@^8.0.0, globby@^8.0.1: version "8.0.1" resolved "https://registry.yarnpkg.com/globby/-/globby-8.0.1.tgz#b5ad48b8aa80b35b814fc1281ecc851f1d2b5b50" @@ -9033,6 +9057,12 @@ p-lazy@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/p-lazy/-/p-lazy-1.0.0.tgz#ec53c802f2ee3ac28f166cc82d0b2b02de27a835" +p-limit@^1.0.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-1.2.0.tgz#0e92b6bedcb59f022c13d0f1949dc82d15909f1c" + dependencies: + p-try "^1.0.0" + p-limit@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-1.1.0.tgz#b07ff2d9a5d88bec806035895a2bab66a27988bc" @@ -9063,6 +9093,10 @@ p-timeout@^2.0.1: dependencies: p-finally "^1.0.0" +p-try@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/p-try/-/p-try-1.0.0.tgz#cbc79cdbaf8fd4228e13f621f2b1a237c1b207b3" + package-json@^2.0.0: version "2.4.0" resolved "https://registry.yarnpkg.com/package-json/-/package-json-2.4.0.tgz#0d15bd67d1cbbddbb2ca222ff2edb86bcb31a8bb"