From 872cff9c7d899381010cc4f4fd58eb12a0603163 Mon Sep 17 00:00:00 2001 From: Globegitter Date: Mon, 28 May 2018 18:31:42 +0200 Subject: [PATCH 01/53] js_library poc to work with ts_devserver. --- internal/js_library/v2/BUILD.bazel | 14 + internal/js_library/v2/README.md | 28 + internal/js_library/v2/babel.rc.js | 15 + internal/js_library/v2/js_library.bzl | 59 + internal/js_library/v2/package.json | 9 + internal/js_library/v2/yarn.lock | 1507 +++++++++++++++++++++++++ internal/node/node_repositories.bzl | 6 + 7 files changed, 1638 insertions(+) create mode 100644 internal/js_library/v2/BUILD.bazel create mode 100644 internal/js_library/v2/README.md create mode 100644 internal/js_library/v2/babel.rc.js create mode 100644 internal/js_library/v2/js_library.bzl create mode 100644 internal/js_library/v2/package.json create mode 100644 internal/js_library/v2/yarn.lock diff --git a/internal/js_library/v2/BUILD.bazel b/internal/js_library/v2/BUILD.bazel new file mode 100644 index 0000000000..e0a21dbca8 --- /dev/null +++ b/internal/js_library/v2/BUILD.bazel @@ -0,0 +1,14 @@ +load("@build_bazel_rules_nodejs//:defs.bzl", "nodejs_binary") + +# package(default_visibility = ["//internal:__subpackages__"]) +# TODO(Markus): Remove public visibility +package(default_visibility = ["//visibility:public"]) + + +exports_files(["babel.rc.js"]) + +nodejs_binary( + name = "babel", + entry_point = "build_bazel_rules_nodejs_js_library_deps/node_modules/@babel/cli/bin/babel", + node_modules = "@build_bazel_rules_nodejs_js_library_deps//:node_modules", +) diff --git a/internal/js_library/v2/README.md b/internal/js_library/v2/README.md new file mode 100644 index 0000000000..3bb64fba40 --- /dev/null +++ b/internal/js_library/v2/README.md @@ -0,0 +1,28 @@ +## Example + +```js +// test.js +const el = document.createElement('div'); +el.innerText = 'Hello, JS'; +el.className = 'js1'; +document.body.appendChild(el); +``` + +```py +# BUILD.bazel +load("@build_bazel_rules_nodejs//internal/js_library/v2:js_library.bzl", "js_library") + +js_library( + name = "src", + srcs = ["test.js"], +) + +load("@build_bazel_rules_typescript//:defs.bzl", "ts_devserver") + +ts_devserver( + name = "devserver", + entry_module = "path/to/test", + serving_path = "/bundle.min.js", + deps = [":src"], +) +``` diff --git a/internal/js_library/v2/babel.rc.js b/internal/js_library/v2/babel.rc.js new file mode 100644 index 0000000000..deae0f5f48 --- /dev/null +++ b/internal/js_library/v2/babel.rc.js @@ -0,0 +1,15 @@ +module.exports = { + "moduleIds": true, + getModuleId (name) { + const path = require("path"); + const process = require("process"); + return path.relative(process.cwd(), name) + }, + "plugins": [ + // Note: For some reason this plugin can not be properly loaded from node_modules so have to load relatively + ["../../../external/build_bazel_rules_nodejs_js_library_deps/node_modules/@babel/plugin-transform-modules-amd", { + "strict": true, + "noInterop": true + }] + ] +}; diff --git a/internal/js_library/v2/js_library.bzl b/internal/js_library/v2/js_library.bzl new file mode 100644 index 0000000000..92d7661ae2 --- /dev/null +++ b/internal/js_library/v2/js_library.bzl @@ -0,0 +1,59 @@ + +"""js_library allows defining a set of javascript sources to be used with ts_devserver""" + +load("@bazel_skylib//:lib.bzl", "paths") + +def _js_library(ctx): + + outputs = [ctx.actions.declare_file(src.basename) for src in ctx.files.srcs] + + out_dir = paths.join(ctx.bin_dir.path, paths.dirname(ctx.build_file_path)) + args = ctx.actions.args() + args.add(["--out-dir", out_dir]) + args.add(["--config-file", "./" + ctx.file._babelrc.path]) + args.add(paths.dirname(ctx.build_file_path)) + + inputs = ctx.files.srcs + ctx.files.deps + ctx.files.node_modules + [ctx.file._babelrc] + ctx.files._babel_node_modules + + ctx.actions.run( + executable = ctx.executable._babel, + inputs = inputs, + outputs = outputs, + arguments = [args] + ) + + # Return legacy providers as ts_devserver still uses legacy format + return struct( + legacy_info = struct( + files = outputs, + ), + providers = [ + DefaultInfo(files=depset(outputs)), + ] + ) + +js_library = rule( + implementation = _js_library, + attrs = { + "srcs": attr.label_list( + doc = """JavaScript source files from the workspace. + These can use ES2015 syntax and ES Modules (import/export)""", + allow_files = [".js"]), + "deps": attr.label_list( + doc = """Other rules that produce JavaScript outputs, such as `ts_library`.""",), + # aspects = [rollup_module_mappings_aspect]), + "node_modules": attr.label( + doc = """Dependencies from npm that provide some modules that must be resolved by babel.""", + default = Label("@//:node_modules")), + "_babel": attr.label( + executable = True, + cfg="host", + default = Label("//internal/js_library/v2:babel")), + "_babel_node_modules": attr.label( + allow_files = True, + default = Label("@build_bazel_rules_nodejs_js_library_deps//:node_modules")), + "_babelrc": attr.label( + allow_single_file = True, + default = Label("//internal/js_library/v2:babel.rc.js")), + }, +) diff --git a/internal/js_library/v2/package.json b/internal/js_library/v2/package.json new file mode 100644 index 0000000000..5f201e32d8 --- /dev/null +++ b/internal/js_library/v2/package.json @@ -0,0 +1,9 @@ +{ + "description": "runtime dependencies for js_library", + "devDependencies": { + "@babel/cli": "^7.0.0-beta.49", + "@babel/core": "^v7.0.0-beta.49", + "@babel/plugin-transform-modules-amd": "git://github.com/globegitter/babel-plugin-transform-modules-amd.git#036a1f356b4db1d164699005347e42c3c8b581b2", + "source-map-support": "^0.5.6" + } +} diff --git a/internal/js_library/v2/yarn.lock b/internal/js_library/v2/yarn.lock new file mode 100644 index 0000000000..fe62238edd --- /dev/null +++ b/internal/js_library/v2/yarn.lock @@ -0,0 +1,1507 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 + + +"@babel/cli@^7.0.0-beta.49": + version "7.0.0-beta.49" + resolved "https://registry.yarnpkg.com/@babel/cli/-/cli-7.0.0-beta.49.tgz#c8c3135f7bc48428436faf5e3f274227a99ef2a8" + dependencies: + commander "^2.8.1" + convert-source-map "^1.1.0" + fs-readdir-recursive "^1.0.0" + glob "^7.0.0" + lodash "^4.17.5" + output-file-sync "^2.0.0" + slash "^1.0.0" + source-map "^0.5.0" + optionalDependencies: + chokidar "^2.0.3" + +"@babel/code-frame@7.0.0-beta.49": + version "7.0.0-beta.49" + resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.0.0-beta.49.tgz#becd805482734440c9d137e46d77340e64d7f51b" + dependencies: + "@babel/highlight" "7.0.0-beta.49" + +"@babel/core@^v7.0.0-beta.49": + version "7.0.0-beta.49" + resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.0.0-beta.49.tgz#73de2081dd652489489f0cb4aa97829a1133314e" + dependencies: + "@babel/code-frame" "7.0.0-beta.49" + "@babel/generator" "7.0.0-beta.49" + "@babel/helpers" "7.0.0-beta.49" + "@babel/parser" "7.0.0-beta.49" + "@babel/template" "7.0.0-beta.49" + "@babel/traverse" "7.0.0-beta.49" + "@babel/types" "7.0.0-beta.49" + convert-source-map "^1.1.0" + debug "^3.1.0" + json5 "^0.5.0" + lodash "^4.17.5" + micromatch "^2.3.11" + resolve "^1.3.2" + semver "^5.4.1" + source-map "^0.5.0" + +"@babel/generator@7.0.0-beta.49": + version "7.0.0-beta.49" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.0.0-beta.49.tgz#e9cffda913996accec793bbc25ab91bc19d0bf7a" + dependencies: + "@babel/types" "7.0.0-beta.49" + jsesc "^2.5.1" + lodash "^4.17.5" + source-map "^0.5.0" + trim-right "^1.0.1" + +"@babel/helper-function-name@7.0.0-beta.49": + version "7.0.0-beta.49" + resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.0.0-beta.49.tgz#a25c1119b9f035278670126e0225c03041c8de32" + dependencies: + "@babel/helper-get-function-arity" "7.0.0-beta.49" + "@babel/template" "7.0.0-beta.49" + "@babel/types" "7.0.0-beta.49" + +"@babel/helper-get-function-arity@7.0.0-beta.49": + version "7.0.0-beta.49" + resolved "https://registry.yarnpkg.com/@babel/helper-get-function-arity/-/helper-get-function-arity-7.0.0-beta.49.tgz#cf5023f32d2ad92d087374939cec0951bcb51441" + dependencies: + "@babel/types" "7.0.0-beta.49" + +"@babel/helper-module-imports@7.0.0-beta.49": + version "7.0.0-beta.49" + resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.0.0-beta.49.tgz#41d7d59891016c493432a46f7464446552890c75" + dependencies: + "@babel/types" "7.0.0-beta.49" + lodash "^4.17.5" + +"@babel/helper-module-transforms@7.0.0-beta.49": + version "7.0.0-beta.49" + resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.0.0-beta.49.tgz#fc660bda9d6497412e18776a71aed9a9e2e5f7ad" + dependencies: + "@babel/helper-module-imports" "7.0.0-beta.49" + "@babel/helper-simple-access" "7.0.0-beta.49" + "@babel/helper-split-export-declaration" "7.0.0-beta.49" + "@babel/template" "7.0.0-beta.49" + "@babel/types" "7.0.0-beta.49" + lodash "^4.17.5" + +"@babel/helper-plugin-utils@7.0.0-beta.49": + version "7.0.0-beta.49" + resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.0.0-beta.49.tgz#0e9fcbb834f878bb365d2a8ea90eee21ba3ccd23" + +"@babel/helper-simple-access@7.0.0-beta.49": + version "7.0.0-beta.49" + resolved "https://registry.yarnpkg.com/@babel/helper-simple-access/-/helper-simple-access-7.0.0-beta.49.tgz#97a41e2789a9bf8a6c30536a258b79e7444c5d82" + dependencies: + "@babel/template" "7.0.0-beta.49" + "@babel/types" "7.0.0-beta.49" + lodash "^4.17.5" + +"@babel/helper-split-export-declaration@7.0.0-beta.49": + version "7.0.0-beta.49" + resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.0.0-beta.49.tgz#40d78eda0968d011b1c52866e5746cfb23e57548" + dependencies: + "@babel/types" "7.0.0-beta.49" + +"@babel/helpers@7.0.0-beta.49": + version "7.0.0-beta.49" + resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.0.0-beta.49.tgz#054d84032d4e94286a80586500068e41005a51d0" + dependencies: + "@babel/template" "7.0.0-beta.49" + "@babel/traverse" "7.0.0-beta.49" + "@babel/types" "7.0.0-beta.49" + +"@babel/highlight@7.0.0-beta.49": + version "7.0.0-beta.49" + resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.0.0-beta.49.tgz#96bdc6b43e13482012ba6691b1018492d39622cc" + dependencies: + chalk "^2.0.0" + esutils "^2.0.2" + js-tokens "^3.0.0" + +"@babel/parser@7.0.0-beta.49": + version "7.0.0-beta.49" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.0.0-beta.49.tgz#944d0c5ba2812bb159edbd226743afd265179bdc" + +"@babel/plugin-transform-modules-amd@git://github.com/globegitter/babel-plugin-transform-modules-amd.git#036a1f356b4db1d164699005347e42c3c8b581b2": + version "7.0.0-beta.49" + resolved "git://github.com/globegitter/babel-plugin-transform-modules-amd.git#036a1f356b4db1d164699005347e42c3c8b581b2" + dependencies: + "@babel/helper-module-transforms" "7.0.0-beta.49" + "@babel/helper-plugin-utils" "7.0.0-beta.49" + +"@babel/template@7.0.0-beta.49": + version "7.0.0-beta.49" + resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.0.0-beta.49.tgz#e38abe8217cb9793f461a5306d7ad745d83e1d27" + dependencies: + "@babel/code-frame" "7.0.0-beta.49" + "@babel/parser" "7.0.0-beta.49" + "@babel/types" "7.0.0-beta.49" + lodash "^4.17.5" + +"@babel/traverse@7.0.0-beta.49": + version "7.0.0-beta.49" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.0.0-beta.49.tgz#4f2a73682a18334ed6625d100a8d27319f7c2d68" + dependencies: + "@babel/code-frame" "7.0.0-beta.49" + "@babel/generator" "7.0.0-beta.49" + "@babel/helper-function-name" "7.0.0-beta.49" + "@babel/helper-split-export-declaration" "7.0.0-beta.49" + "@babel/parser" "7.0.0-beta.49" + "@babel/types" "7.0.0-beta.49" + debug "^3.1.0" + globals "^11.1.0" + invariant "^2.2.0" + lodash "^4.17.5" + +"@babel/types@7.0.0-beta.49": + version "7.0.0-beta.49" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.0.0-beta.49.tgz#b7e3b1c3f4d4cfe11bdf8c89f1efd5e1617b87a6" + dependencies: + esutils "^2.0.2" + lodash "^4.17.5" + to-fast-properties "^2.0.0" + +abbrev@1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.1.1.tgz#f8f2c887ad10bf67f634f005b6987fed3179aac8" + +ansi-regex@^2.0.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-2.1.1.tgz#c3b33ab5ee360d86e0e628f0468ae7ef27d654df" + +ansi-regex@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-3.0.0.tgz#ed0317c322064f79466c02966bddb605ab37d998" + +ansi-styles@^3.2.1: + version "3.2.1" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d" + dependencies: + color-convert "^1.9.0" + +anymatch@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-2.0.0.tgz#bcb24b4f37934d9aa7ac17b4adaf89e7c76ef2eb" + dependencies: + micromatch "^3.1.4" + normalize-path "^2.1.1" + +aproba@^1.0.3: + version "1.2.0" + resolved "https://registry.yarnpkg.com/aproba/-/aproba-1.2.0.tgz#6802e6264efd18c790a1b0d517f0f2627bf2c94a" + +are-we-there-yet@~1.1.2: + version "1.1.5" + resolved "https://registry.yarnpkg.com/are-we-there-yet/-/are-we-there-yet-1.1.5.tgz#4b35c2944f062a8bfcda66410760350fe9ddfc21" + dependencies: + delegates "^1.0.0" + readable-stream "^2.0.6" + +arr-diff@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/arr-diff/-/arr-diff-2.0.0.tgz#8f3b827f955a8bd669697e4a4256ac3ceae356cf" + dependencies: + arr-flatten "^1.0.1" + +arr-diff@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/arr-diff/-/arr-diff-4.0.0.tgz#d6461074febfec71e7e15235761a329a5dc7c520" + +arr-flatten@^1.0.1, arr-flatten@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/arr-flatten/-/arr-flatten-1.1.0.tgz#36048bbff4e7b47e136644316c99669ea5ae91f1" + +arr-union@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/arr-union/-/arr-union-3.1.0.tgz#e39b09aea9def866a8f206e288af63919bae39c4" + +array-unique@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/array-unique/-/array-unique-0.2.1.tgz#a1d97ccafcbc2625cc70fadceb36a50c58b01a53" + +array-unique@^0.3.2: + version "0.3.2" + resolved "https://registry.yarnpkg.com/array-unique/-/array-unique-0.3.2.tgz#a894b75d4bc4f6cd679ef3244a9fd8f46ae2d428" + +assign-symbols@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/assign-symbols/-/assign-symbols-1.0.0.tgz#59667f41fadd4f20ccbc2bb96b8d4f7f78ec0367" + +async-each@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/async-each/-/async-each-1.0.1.tgz#19d386a1d9edc6e7c1c85d388aedbcc56d33602d" + +atob@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/atob/-/atob-2.1.1.tgz#ae2d5a729477f289d60dd7f96a6314a22dd6c22a" + +balanced-match@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767" + +base@^0.11.1: + version "0.11.2" + resolved "https://registry.yarnpkg.com/base/-/base-0.11.2.tgz#7bde5ced145b6d551a90db87f83c558b4eb48a8f" + dependencies: + cache-base "^1.0.1" + class-utils "^0.3.5" + component-emitter "^1.2.1" + define-property "^1.0.0" + isobject "^3.0.1" + mixin-deep "^1.2.0" + pascalcase "^0.1.1" + +binary-extensions@^1.0.0: + version "1.11.0" + resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-1.11.0.tgz#46aa1751fb6a2f93ee5e689bb1087d4b14c6c205" + +brace-expansion@^1.1.7: + version "1.1.11" + resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" + dependencies: + balanced-match "^1.0.0" + concat-map "0.0.1" + +braces@^1.8.2: + version "1.8.5" + resolved "https://registry.yarnpkg.com/braces/-/braces-1.8.5.tgz#ba77962e12dff969d6b76711e914b737857bf6a7" + dependencies: + expand-range "^1.8.1" + preserve "^0.2.0" + repeat-element "^1.1.2" + +braces@^2.3.0, braces@^2.3.1: + version "2.3.2" + resolved "https://registry.yarnpkg.com/braces/-/braces-2.3.2.tgz#5979fd3f14cd531565e5fa2df1abfff1dfaee729" + dependencies: + arr-flatten "^1.1.0" + array-unique "^0.3.2" + extend-shallow "^2.0.1" + fill-range "^4.0.0" + isobject "^3.0.1" + repeat-element "^1.1.2" + snapdragon "^0.8.1" + snapdragon-node "^2.0.1" + split-string "^3.0.2" + to-regex "^3.0.1" + +buffer-from@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.0.0.tgz#4cb8832d23612589b0406e9e2956c17f06fdf531" + +cache-base@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/cache-base/-/cache-base-1.0.1.tgz#0a7f46416831c8b662ee36fe4e7c59d76f666ab2" + dependencies: + collection-visit "^1.0.0" + component-emitter "^1.2.1" + get-value "^2.0.6" + has-value "^1.0.0" + isobject "^3.0.1" + set-value "^2.0.0" + to-object-path "^0.3.0" + union-value "^1.0.0" + unset-value "^1.0.0" + +chalk@^2.0.0: + version "2.4.1" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.1.tgz#18c49ab16a037b6eb0152cc83e3471338215b66e" + dependencies: + ansi-styles "^3.2.1" + escape-string-regexp "^1.0.5" + supports-color "^5.3.0" + +chokidar@^2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-2.0.3.tgz#dcbd4f6cbb2a55b4799ba8a840ac527e5f4b1176" + dependencies: + anymatch "^2.0.0" + async-each "^1.0.0" + braces "^2.3.0" + glob-parent "^3.1.0" + inherits "^2.0.1" + is-binary-path "^1.0.0" + is-glob "^4.0.0" + normalize-path "^2.1.1" + path-is-absolute "^1.0.0" + readdirp "^2.0.0" + upath "^1.0.0" + optionalDependencies: + fsevents "^1.1.2" + +chownr@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/chownr/-/chownr-1.0.1.tgz#e2a75042a9551908bebd25b8523d5f9769d79181" + +class-utils@^0.3.5: + version "0.3.6" + resolved "https://registry.yarnpkg.com/class-utils/-/class-utils-0.3.6.tgz#f93369ae8b9a7ce02fd41faad0ca83033190c463" + dependencies: + arr-union "^3.1.0" + define-property "^0.2.5" + isobject "^3.0.0" + static-extend "^0.1.1" + +code-point-at@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/code-point-at/-/code-point-at-1.1.0.tgz#0d070b4d043a5bea33a2f1a40e2edb3d9a4ccf77" + +collection-visit@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/collection-visit/-/collection-visit-1.0.0.tgz#4bc0373c164bc3291b4d368c829cf1a80a59dca0" + dependencies: + map-visit "^1.0.0" + object-visit "^1.0.0" + +color-convert@^1.9.0: + version "1.9.1" + resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.1.tgz#c1261107aeb2f294ebffec9ed9ecad529a6097ed" + dependencies: + color-name "^1.1.1" + +color-name@^1.1.1: + version "1.1.3" + resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25" + +commander@^2.8.1: + version "2.15.1" + resolved "https://registry.yarnpkg.com/commander/-/commander-2.15.1.tgz#df46e867d0fc2aec66a34662b406a9ccafff5b0f" + +component-emitter@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/component-emitter/-/component-emitter-1.2.1.tgz#137918d6d78283f7df7a6b7c5a63e140e69425e6" + +concat-map@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" + +console-control-strings@^1.0.0, console-control-strings@~1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/console-control-strings/-/console-control-strings-1.1.0.tgz#3d7cf4464db6446ea644bf4b39507f9851008e8e" + +convert-source-map@^1.1.0: + version "1.5.1" + resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.5.1.tgz#b8278097b9bc229365de5c62cf5fcaed8b5599e5" + +copy-descriptor@^0.1.0: + version "0.1.1" + resolved "https://registry.yarnpkg.com/copy-descriptor/-/copy-descriptor-0.1.1.tgz#676f6eb3c39997c2ee1ac3a924fd6124748f578d" + +core-util-is@~1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" + +debug@^2.1.2, debug@^2.2.0, debug@^2.3.3: + version "2.6.9" + resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" + dependencies: + ms "2.0.0" + +debug@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/debug/-/debug-3.1.0.tgz#5bb5a0672628b64149566ba16819e61518c67261" + dependencies: + ms "2.0.0" + +decode-uri-component@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/decode-uri-component/-/decode-uri-component-0.2.0.tgz#eb3913333458775cb84cd1a1fae062106bb87545" + +deep-extend@^0.6.0: + version "0.6.0" + resolved "https://registry.yarnpkg.com/deep-extend/-/deep-extend-0.6.0.tgz#c4fa7c95404a17a9c3e8ca7e1537312b736330ac" + +define-property@^0.2.5: + version "0.2.5" + resolved "https://registry.yarnpkg.com/define-property/-/define-property-0.2.5.tgz#c35b1ef918ec3c990f9a5bc57be04aacec5c8116" + dependencies: + is-descriptor "^0.1.0" + +define-property@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/define-property/-/define-property-1.0.0.tgz#769ebaaf3f4a63aad3af9e8d304c9bbe79bfb0e6" + dependencies: + is-descriptor "^1.0.0" + +define-property@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/define-property/-/define-property-2.0.2.tgz#d459689e8d654ba77e02a817f8710d702cb16e9d" + dependencies: + is-descriptor "^1.0.2" + isobject "^3.0.1" + +delegates@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/delegates/-/delegates-1.0.0.tgz#84c6e159b81904fdca59a0ef44cd870d31250f9a" + +detect-libc@^1.0.2: + version "1.0.3" + resolved "https://registry.yarnpkg.com/detect-libc/-/detect-libc-1.0.3.tgz#fa137c4bd698edf55cd5cd02ac559f91a4c4ba9b" + +escape-string-regexp@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" + +esutils@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.2.tgz#0abf4f1caa5bcb1f7a9d8acc6dea4faaa04bac9b" + +expand-brackets@^0.1.4: + version "0.1.5" + resolved "https://registry.yarnpkg.com/expand-brackets/-/expand-brackets-0.1.5.tgz#df07284e342a807cd733ac5af72411e581d1177b" + dependencies: + is-posix-bracket "^0.1.0" + +expand-brackets@^2.1.4: + version "2.1.4" + resolved "https://registry.yarnpkg.com/expand-brackets/-/expand-brackets-2.1.4.tgz#b77735e315ce30f6b6eff0f83b04151a22449622" + dependencies: + debug "^2.3.3" + define-property "^0.2.5" + extend-shallow "^2.0.1" + posix-character-classes "^0.1.0" + regex-not "^1.0.0" + snapdragon "^0.8.1" + to-regex "^3.0.1" + +expand-range@^1.8.1: + version "1.8.2" + resolved "https://registry.yarnpkg.com/expand-range/-/expand-range-1.8.2.tgz#a299effd335fe2721ebae8e257ec79644fc85337" + dependencies: + fill-range "^2.1.0" + +extend-shallow@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/extend-shallow/-/extend-shallow-2.0.1.tgz#51af7d614ad9a9f610ea1bafbb989d6b1c56890f" + dependencies: + is-extendable "^0.1.0" + +extend-shallow@^3.0.0, extend-shallow@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/extend-shallow/-/extend-shallow-3.0.2.tgz#26a71aaf073b39fb2127172746131c2704028db8" + dependencies: + assign-symbols "^1.0.0" + is-extendable "^1.0.1" + +extglob@^0.3.1: + version "0.3.2" + resolved "https://registry.yarnpkg.com/extglob/-/extglob-0.3.2.tgz#2e18ff3d2f49ab2765cec9023f011daa8d8349a1" + dependencies: + is-extglob "^1.0.0" + +extglob@^2.0.4: + version "2.0.4" + resolved "https://registry.yarnpkg.com/extglob/-/extglob-2.0.4.tgz#ad00fe4dc612a9232e8718711dc5cb5ab0285543" + dependencies: + array-unique "^0.3.2" + define-property "^1.0.0" + expand-brackets "^2.1.4" + extend-shallow "^2.0.1" + fragment-cache "^0.2.1" + regex-not "^1.0.0" + snapdragon "^0.8.1" + to-regex "^3.0.1" + +filename-regex@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/filename-regex/-/filename-regex-2.0.1.tgz#c1c4b9bee3e09725ddb106b75c1e301fe2f18b26" + +fill-range@^2.1.0: + version "2.2.4" + resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-2.2.4.tgz#eb1e773abb056dcd8df2bfdf6af59b8b3a936565" + dependencies: + is-number "^2.1.0" + isobject "^2.0.0" + randomatic "^3.0.0" + repeat-element "^1.1.2" + repeat-string "^1.5.2" + +fill-range@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-4.0.0.tgz#d544811d428f98eb06a63dc402d2403c328c38f7" + dependencies: + extend-shallow "^2.0.1" + is-number "^3.0.0" + repeat-string "^1.6.1" + to-regex-range "^2.1.0" + +for-in@^1.0.1, for-in@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/for-in/-/for-in-1.0.2.tgz#81068d295a8142ec0ac726c6e2200c30fb6d5e80" + +for-own@^0.1.4: + version "0.1.5" + resolved "https://registry.yarnpkg.com/for-own/-/for-own-0.1.5.tgz#5265c681a4f294dabbf17c9509b6763aa84510ce" + dependencies: + for-in "^1.0.1" + +fragment-cache@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/fragment-cache/-/fragment-cache-0.2.1.tgz#4290fad27f13e89be7f33799c6bc5a0abfff0d19" + dependencies: + map-cache "^0.2.2" + +fs-minipass@^1.2.5: + version "1.2.5" + resolved "https://registry.yarnpkg.com/fs-minipass/-/fs-minipass-1.2.5.tgz#06c277218454ec288df77ada54a03b8702aacb9d" + dependencies: + minipass "^2.2.1" + +fs-readdir-recursive@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/fs-readdir-recursive/-/fs-readdir-recursive-1.1.0.tgz#e32fc030a2ccee44a6b5371308da54be0b397d27" + +fs.realpath@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" + +fsevents@^1.1.2: + version "1.2.4" + resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-1.2.4.tgz#f41dcb1af2582af3692da36fc55cbd8e1041c426" + dependencies: + nan "^2.9.2" + node-pre-gyp "^0.10.0" + +gauge@~2.7.3: + version "2.7.4" + resolved "https://registry.yarnpkg.com/gauge/-/gauge-2.7.4.tgz#2c03405c7538c39d7eb37b317022e325fb018bf7" + dependencies: + aproba "^1.0.3" + console-control-strings "^1.0.0" + has-unicode "^2.0.0" + object-assign "^4.1.0" + signal-exit "^3.0.0" + string-width "^1.0.1" + strip-ansi "^3.0.1" + wide-align "^1.1.0" + +get-value@^2.0.3, get-value@^2.0.6: + version "2.0.6" + resolved "https://registry.yarnpkg.com/get-value/-/get-value-2.0.6.tgz#dc15ca1c672387ca76bd37ac0a395ba2042a2c28" + +glob-base@^0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/glob-base/-/glob-base-0.3.0.tgz#dbb164f6221b1c0b1ccf82aea328b497df0ea3c4" + dependencies: + glob-parent "^2.0.0" + is-glob "^2.0.0" + +glob-parent@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-2.0.0.tgz#81383d72db054fcccf5336daa902f182f6edbb28" + dependencies: + is-glob "^2.0.0" + +glob-parent@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-3.1.0.tgz#9e6af6299d8d3bd2bd40430832bd113df906c5ae" + dependencies: + is-glob "^3.1.0" + path-dirname "^1.0.0" + +glob@^7.0.0, glob@^7.0.5: + version "7.1.2" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.2.tgz#c19c9df9a028702d678612384a6552404c636d15" + dependencies: + 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@^11.1.0: + version "11.5.0" + resolved "https://registry.yarnpkg.com/globals/-/globals-11.5.0.tgz#6bc840de6771173b191f13d3a9c94d441ee92642" + +graceful-fs@^4.1.11, graceful-fs@^4.1.2: + version "4.1.11" + resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.1.11.tgz#0e8bdfe4d1ddb8854d64e04ea7c00e2a026e5658" + +has-flag@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd" + +has-unicode@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/has-unicode/-/has-unicode-2.0.1.tgz#e0e6fe6a28cf51138855e086d1691e771de2a8b9" + +has-value@^0.3.1: + version "0.3.1" + resolved "https://registry.yarnpkg.com/has-value/-/has-value-0.3.1.tgz#7b1f58bada62ca827ec0a2078025654845995e1f" + dependencies: + get-value "^2.0.3" + has-values "^0.1.4" + isobject "^2.0.0" + +has-value@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/has-value/-/has-value-1.0.0.tgz#18b281da585b1c5c51def24c930ed29a0be6b177" + dependencies: + get-value "^2.0.6" + has-values "^1.0.0" + isobject "^3.0.0" + +has-values@^0.1.4: + version "0.1.4" + resolved "https://registry.yarnpkg.com/has-values/-/has-values-0.1.4.tgz#6d61de95d91dfca9b9a02089ad384bff8f62b771" + +has-values@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/has-values/-/has-values-1.0.0.tgz#95b0b63fec2146619a6fe57fe75628d5a39efe4f" + dependencies: + is-number "^3.0.0" + kind-of "^4.0.0" + +iconv-lite@^0.4.4: + version "0.4.23" + resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.23.tgz#297871f63be507adcfbfca715d0cd0eed84e9a63" + dependencies: + safer-buffer ">= 2.1.2 < 3" + +ignore-walk@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/ignore-walk/-/ignore-walk-3.0.1.tgz#a83e62e7d272ac0e3b551aaa82831a19b69f82f8" + dependencies: + minimatch "^3.0.4" + +inflight@^1.0.4: + version "1.0.6" + resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" + dependencies: + once "^1.3.0" + wrappy "1" + +inherits@2, inherits@^2.0.1, inherits@~2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" + +ini@~1.3.0: + version "1.3.5" + resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.5.tgz#eee25f56db1c9ec6085e0c22778083f596abf927" + +invariant@^2.2.0: + version "2.2.4" + resolved "https://registry.yarnpkg.com/invariant/-/invariant-2.2.4.tgz#610f3c92c9359ce1db616e538008d23ff35158e6" + dependencies: + loose-envify "^1.0.0" + +is-accessor-descriptor@^0.1.6: + version "0.1.6" + resolved "https://registry.yarnpkg.com/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz#a9e12cb3ae8d876727eeef3843f8a0897b5c98d6" + dependencies: + kind-of "^3.0.2" + +is-accessor-descriptor@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz#169c2f6d3df1f992618072365c9b0ea1f6878656" + dependencies: + kind-of "^6.0.0" + +is-binary-path@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/is-binary-path/-/is-binary-path-1.0.1.tgz#75f16642b480f187a711c814161fd3a4a7655898" + dependencies: + binary-extensions "^1.0.0" + +is-buffer@^1.1.5: + version "1.1.6" + resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.6.tgz#efaa2ea9daa0d7ab2ea13a97b2b8ad51fefbe8be" + +is-data-descriptor@^0.1.4: + version "0.1.4" + resolved "https://registry.yarnpkg.com/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz#0b5ee648388e2c860282e793f1856fec3f301b56" + dependencies: + kind-of "^3.0.2" + +is-data-descriptor@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz#d84876321d0e7add03990406abbbbd36ba9268c7" + dependencies: + kind-of "^6.0.0" + +is-descriptor@^0.1.0: + version "0.1.6" + resolved "https://registry.yarnpkg.com/is-descriptor/-/is-descriptor-0.1.6.tgz#366d8240dde487ca51823b1ab9f07a10a78251ca" + dependencies: + is-accessor-descriptor "^0.1.6" + is-data-descriptor "^0.1.4" + kind-of "^5.0.0" + +is-descriptor@^1.0.0, is-descriptor@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/is-descriptor/-/is-descriptor-1.0.2.tgz#3b159746a66604b04f8c81524ba365c5f14d86ec" + dependencies: + is-accessor-descriptor "^1.0.0" + is-data-descriptor "^1.0.0" + kind-of "^6.0.2" + +is-dotfile@^1.0.0: + version "1.0.3" + resolved "https://registry.yarnpkg.com/is-dotfile/-/is-dotfile-1.0.3.tgz#a6a2f32ffd2dfb04f5ca25ecd0f6b83cf798a1e1" + +is-equal-shallow@^0.1.3: + version "0.1.3" + resolved "https://registry.yarnpkg.com/is-equal-shallow/-/is-equal-shallow-0.1.3.tgz#2238098fc221de0bcfa5d9eac4c45d638aa1c534" + dependencies: + is-primitive "^2.0.0" + +is-extendable@^0.1.0, is-extendable@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/is-extendable/-/is-extendable-0.1.1.tgz#62b110e289a471418e3ec36a617d472e301dfc89" + +is-extendable@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/is-extendable/-/is-extendable-1.0.1.tgz#a7470f9e426733d81bd81e1155264e3a3507cab4" + dependencies: + is-plain-object "^2.0.4" + +is-extglob@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-1.0.0.tgz#ac468177c4943405a092fc8f29760c6ffc6206c0" + +is-extglob@^2.1.0, is-extglob@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2" + +is-fullwidth-code-point@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz#ef9e31386f031a7f0d643af82fde50c457ef00cb" + dependencies: + number-is-nan "^1.0.0" + +is-fullwidth-code-point@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz#a3b30a5c4f199183167aaab93beefae3ddfb654f" + +is-glob@^2.0.0, is-glob@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-2.0.1.tgz#d096f926a3ded5600f3fdfd91198cb0888c2d863" + dependencies: + is-extglob "^1.0.0" + +is-glob@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-3.1.0.tgz#7ba5ae24217804ac70707b96922567486cc3e84a" + dependencies: + is-extglob "^2.1.0" + +is-glob@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.0.tgz#9521c76845cc2610a85203ddf080a958c2ffabc0" + dependencies: + is-extglob "^2.1.1" + +is-number@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/is-number/-/is-number-2.1.0.tgz#01fcbbb393463a548f2f466cce16dece49db908f" + dependencies: + kind-of "^3.0.2" + +is-number@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/is-number/-/is-number-3.0.0.tgz#24fd6201a4782cf50561c810276afc7d12d71195" + dependencies: + kind-of "^3.0.2" + +is-number@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/is-number/-/is-number-4.0.0.tgz#0026e37f5454d73e356dfe6564699867c6a7f0ff" + +is-odd@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/is-odd/-/is-odd-2.0.0.tgz#7646624671fd7ea558ccd9a2795182f2958f1b24" + dependencies: + is-number "^4.0.0" + +is-plain-obj@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/is-plain-obj/-/is-plain-obj-1.1.0.tgz#71a50c8429dfca773c92a390a4a03b39fcd51d3e" + +is-plain-object@^2.0.1, is-plain-object@^2.0.3, is-plain-object@^2.0.4: + version "2.0.4" + resolved "https://registry.yarnpkg.com/is-plain-object/-/is-plain-object-2.0.4.tgz#2c163b3fafb1b606d9d17928f05c2a1c38e07677" + dependencies: + isobject "^3.0.1" + +is-posix-bracket@^0.1.0: + version "0.1.1" + resolved "https://registry.yarnpkg.com/is-posix-bracket/-/is-posix-bracket-0.1.1.tgz#3334dc79774368e92f016e6fbc0a88f5cd6e6bc4" + +is-primitive@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/is-primitive/-/is-primitive-2.0.0.tgz#207bab91638499c07b2adf240a41a87210034575" + +is-windows@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/is-windows/-/is-windows-1.0.2.tgz#d1850eb9791ecd18e6182ce12a30f396634bb19d" + +isarray@1.0.0, isarray@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" + +isobject@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/isobject/-/isobject-2.1.0.tgz#f065561096a3f1da2ef46272f815c840d87e0c89" + dependencies: + isarray "1.0.0" + +isobject@^3.0.0, isobject@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/isobject/-/isobject-3.0.1.tgz#4e431e92b11a9731636aa1f9c8d1ccbcfdab78df" + +js-tokens@^3.0.0: + version "3.0.2" + resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-3.0.2.tgz#9866df395102130e38f7f996bceb65443209c25b" + +jsesc@^2.5.1: + version "2.5.1" + resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-2.5.1.tgz#e421a2a8e20d6b0819df28908f782526b96dd1fe" + +json5@^0.5.0: + version "0.5.1" + resolved "https://registry.yarnpkg.com/json5/-/json5-0.5.1.tgz#1eade7acc012034ad84e2396767ead9fa5495821" + +kind-of@^3.0.2, kind-of@^3.0.3, kind-of@^3.2.0: + version "3.2.2" + resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-3.2.2.tgz#31ea21a734bab9bbb0f32466d893aea51e4a3c64" + dependencies: + is-buffer "^1.1.5" + +kind-of@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-4.0.0.tgz#20813df3d712928b207378691a45066fae72dd57" + dependencies: + is-buffer "^1.1.5" + +kind-of@^5.0.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-5.1.0.tgz#729c91e2d857b7a419a1f9aa65685c4c33f5845d" + +kind-of@^6.0.0, kind-of@^6.0.2: + version "6.0.2" + resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-6.0.2.tgz#01146b36a6218e64e58f3a8d66de5d7fc6f6d051" + +lodash@^4.17.5: + version "4.17.10" + resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.10.tgz#1b7793cf7259ea38fb3661d4d38b3260af8ae4e7" + +loose-envify@^1.0.0: + version "1.3.1" + resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.3.1.tgz#d1a8ad33fa9ce0e713d65fdd0ac8b748d478c848" + dependencies: + js-tokens "^3.0.0" + +map-cache@^0.2.2: + version "0.2.2" + resolved "https://registry.yarnpkg.com/map-cache/-/map-cache-0.2.2.tgz#c32abd0bd6525d9b051645bb4f26ac5dc98a0dbf" + +map-visit@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/map-visit/-/map-visit-1.0.0.tgz#ecdca8f13144e660f1b5bd41f12f3479d98dfb8f" + dependencies: + object-visit "^1.0.0" + +math-random@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/math-random/-/math-random-1.0.1.tgz#8b3aac588b8a66e4975e3cdea67f7bb329601fac" + +micromatch@^2.3.11: + version "2.3.11" + resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-2.3.11.tgz#86677c97d1720b363431d04d0d15293bd38c1565" + dependencies: + arr-diff "^2.0.0" + array-unique "^0.2.1" + braces "^1.8.2" + expand-brackets "^0.1.4" + extglob "^0.3.1" + filename-regex "^2.0.0" + is-extglob "^1.0.0" + is-glob "^2.0.1" + kind-of "^3.0.2" + normalize-path "^2.0.1" + object.omit "^2.0.0" + parse-glob "^3.0.4" + regex-cache "^0.4.2" + +micromatch@^3.1.4: + version "3.1.10" + resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-3.1.10.tgz#70859bc95c9840952f359a068a3fc49f9ecfac23" + dependencies: + arr-diff "^4.0.0" + array-unique "^0.3.2" + braces "^2.3.1" + define-property "^2.0.2" + extend-shallow "^3.0.2" + extglob "^2.0.4" + fragment-cache "^0.2.1" + kind-of "^6.0.2" + nanomatch "^1.2.9" + object.pick "^1.3.0" + regex-not "^1.0.0" + snapdragon "^0.8.1" + to-regex "^3.0.2" + +minimatch@^3.0.2, minimatch@^3.0.4: + version "3.0.4" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083" + dependencies: + brace-expansion "^1.1.7" + +minimist@0.0.8: + version "0.0.8" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d" + +minimist@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284" + +minipass@^2.2.1, minipass@^2.3.3: + version "2.3.3" + resolved "https://registry.yarnpkg.com/minipass/-/minipass-2.3.3.tgz#a7dcc8b7b833f5d368759cce544dccb55f50f233" + dependencies: + safe-buffer "^5.1.2" + yallist "^3.0.0" + +minizlib@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/minizlib/-/minizlib-1.1.0.tgz#11e13658ce46bc3a70a267aac58359d1e0c29ceb" + dependencies: + minipass "^2.2.1" + +mixin-deep@^1.2.0: + version "1.3.1" + resolved "https://registry.yarnpkg.com/mixin-deep/-/mixin-deep-1.3.1.tgz#a49e7268dce1a0d9698e45326c5626df3543d0fe" + dependencies: + for-in "^1.0.2" + is-extendable "^1.0.1" + +mkdirp@^0.5.0, mkdirp@^0.5.1: + version "0.5.1" + resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903" + dependencies: + minimist "0.0.8" + +ms@2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" + +nan@^2.9.2: + version "2.10.0" + resolved "https://registry.yarnpkg.com/nan/-/nan-2.10.0.tgz#96d0cd610ebd58d4b4de9cc0c6828cda99c7548f" + +nanomatch@^1.2.9: + version "1.2.9" + resolved "https://registry.yarnpkg.com/nanomatch/-/nanomatch-1.2.9.tgz#879f7150cb2dab7a471259066c104eee6e0fa7c2" + dependencies: + arr-diff "^4.0.0" + array-unique "^0.3.2" + define-property "^2.0.2" + extend-shallow "^3.0.2" + fragment-cache "^0.2.1" + is-odd "^2.0.0" + is-windows "^1.0.2" + kind-of "^6.0.2" + object.pick "^1.3.0" + regex-not "^1.0.0" + snapdragon "^0.8.1" + to-regex "^3.0.1" + +needle@^2.2.0: + version "2.2.1" + resolved "https://registry.yarnpkg.com/needle/-/needle-2.2.1.tgz#b5e325bd3aae8c2678902fa296f729455d1d3a7d" + dependencies: + debug "^2.1.2" + iconv-lite "^0.4.4" + sax "^1.2.4" + +node-pre-gyp@^0.10.0: + version "0.10.0" + resolved "https://registry.yarnpkg.com/node-pre-gyp/-/node-pre-gyp-0.10.0.tgz#6e4ef5bb5c5203c6552448828c852c40111aac46" + dependencies: + detect-libc "^1.0.2" + mkdirp "^0.5.1" + needle "^2.2.0" + nopt "^4.0.1" + npm-packlist "^1.1.6" + npmlog "^4.0.2" + rc "^1.1.7" + rimraf "^2.6.1" + semver "^5.3.0" + tar "^4" + +nopt@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/nopt/-/nopt-4.0.1.tgz#d0d4685afd5415193c8c7505602d0d17cd64474d" + dependencies: + abbrev "1" + osenv "^0.1.4" + +normalize-path@^2.0.1, normalize-path@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-2.1.1.tgz#1ab28b556e198363a8c1a6f7e6fa20137fe6aed9" + dependencies: + remove-trailing-separator "^1.0.1" + +npm-bundled@^1.0.1: + version "1.0.3" + resolved "https://registry.yarnpkg.com/npm-bundled/-/npm-bundled-1.0.3.tgz#7e71703d973af3370a9591bafe3a63aca0be2308" + +npm-packlist@^1.1.6: + version "1.1.10" + resolved "https://registry.yarnpkg.com/npm-packlist/-/npm-packlist-1.1.10.tgz#1039db9e985727e464df066f4cf0ab6ef85c398a" + dependencies: + ignore-walk "^3.0.1" + npm-bundled "^1.0.1" + +npmlog@^4.0.2: + version "4.1.2" + resolved "https://registry.yarnpkg.com/npmlog/-/npmlog-4.1.2.tgz#08a7f2a8bf734604779a9efa4ad5cc717abb954b" + dependencies: + are-we-there-yet "~1.1.2" + console-control-strings "~1.1.0" + gauge "~2.7.3" + set-blocking "~2.0.0" + +number-is-nan@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/number-is-nan/-/number-is-nan-1.0.1.tgz#097b602b53422a522c1afb8790318336941a011d" + +object-assign@^4.1.0: + version "4.1.1" + resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" + +object-copy@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/object-copy/-/object-copy-0.1.0.tgz#7e7d858b781bd7c991a41ba975ed3812754e998c" + dependencies: + copy-descriptor "^0.1.0" + define-property "^0.2.5" + kind-of "^3.0.3" + +object-visit@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/object-visit/-/object-visit-1.0.1.tgz#f79c4493af0c5377b59fe39d395e41042dd045bb" + dependencies: + isobject "^3.0.0" + +object.omit@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/object.omit/-/object.omit-2.0.1.tgz#1a9c744829f39dbb858c76ca3579ae2a54ebd1fa" + dependencies: + for-own "^0.1.4" + is-extendable "^0.1.1" + +object.pick@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/object.pick/-/object.pick-1.3.0.tgz#87a10ac4c1694bd2e1cbf53591a66141fb5dd747" + dependencies: + isobject "^3.0.1" + +once@^1.3.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" + dependencies: + wrappy "1" + +os-homedir@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/os-homedir/-/os-homedir-1.0.2.tgz#ffbc4988336e0e833de0c168c7ef152121aa7fb3" + +os-tmpdir@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274" + +osenv@^0.1.4: + version "0.1.5" + resolved "https://registry.yarnpkg.com/osenv/-/osenv-0.1.5.tgz#85cdfafaeb28e8677f416e287592b5f3f49ea410" + dependencies: + os-homedir "^1.0.0" + os-tmpdir "^1.0.0" + +output-file-sync@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/output-file-sync/-/output-file-sync-2.0.1.tgz#f53118282f5f553c2799541792b723a4c71430c0" + dependencies: + graceful-fs "^4.1.11" + is-plain-obj "^1.1.0" + mkdirp "^0.5.1" + +parse-glob@^3.0.4: + version "3.0.4" + resolved "https://registry.yarnpkg.com/parse-glob/-/parse-glob-3.0.4.tgz#b2c376cfb11f35513badd173ef0bb6e3a388391c" + dependencies: + glob-base "^0.3.0" + is-dotfile "^1.0.0" + is-extglob "^1.0.0" + is-glob "^2.0.0" + +pascalcase@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/pascalcase/-/pascalcase-0.1.1.tgz#b363e55e8006ca6fe21784d2db22bd15d7917f14" + +path-dirname@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/path-dirname/-/path-dirname-1.0.2.tgz#cc33d24d525e099a5388c0336c6e32b9160609e0" + +path-is-absolute@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" + +path-parse@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.5.tgz#3c1adf871ea9cd6c9431b6ea2bd74a0ff055c4c1" + +posix-character-classes@^0.1.0: + version "0.1.1" + resolved "https://registry.yarnpkg.com/posix-character-classes/-/posix-character-classes-0.1.1.tgz#01eac0fe3b5af71a2a6c02feabb8c1fef7e00eab" + +preserve@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/preserve/-/preserve-0.2.0.tgz#815ed1f6ebc65926f865b310c0713bcb3315ce4b" + +process-nextick-args@~2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.0.tgz#a37d732f4271b4ab1ad070d35508e8290788ffaa" + +randomatic@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/randomatic/-/randomatic-3.0.0.tgz#d35490030eb4f7578de292ce6dfb04a91a128923" + dependencies: + is-number "^4.0.0" + kind-of "^6.0.0" + math-random "^1.0.1" + +rc@^1.1.7: + version "1.2.8" + resolved "https://registry.yarnpkg.com/rc/-/rc-1.2.8.tgz#cd924bf5200a075b83c188cd6b9e211b7fc0d3ed" + dependencies: + deep-extend "^0.6.0" + ini "~1.3.0" + minimist "^1.2.0" + strip-json-comments "~2.0.1" + +readable-stream@^2.0.2, readable-stream@^2.0.6: + version "2.3.6" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.6.tgz#b11c27d88b8ff1fbe070643cf94b0c79ae1b0aaf" + dependencies: + 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" + +readdirp@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-2.1.0.tgz#4ed0ad060df3073300c48440373f72d1cc642d78" + dependencies: + graceful-fs "^4.1.2" + minimatch "^3.0.2" + readable-stream "^2.0.2" + set-immediate-shim "^1.0.1" + +regex-cache@^0.4.2: + version "0.4.4" + resolved "https://registry.yarnpkg.com/regex-cache/-/regex-cache-0.4.4.tgz#75bdc58a2a1496cec48a12835bc54c8d562336dd" + dependencies: + is-equal-shallow "^0.1.3" + +regex-not@^1.0.0, regex-not@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/regex-not/-/regex-not-1.0.2.tgz#1f4ece27e00b0b65e0247a6810e6a85d83a5752c" + dependencies: + extend-shallow "^3.0.2" + safe-regex "^1.1.0" + +remove-trailing-separator@^1.0.1: + version "1.1.0" + resolved "https://registry.yarnpkg.com/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz#c24bce2a283adad5bc3f58e0d48249b92379d8ef" + +repeat-element@^1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/repeat-element/-/repeat-element-1.1.2.tgz#ef089a178d1483baae4d93eb98b4f9e4e11d990a" + +repeat-string@^1.5.2, repeat-string@^1.6.1: + version "1.6.1" + resolved "https://registry.yarnpkg.com/repeat-string/-/repeat-string-1.6.1.tgz#8dcae470e1c88abc2d600fff4a776286da75e637" + +resolve-url@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/resolve-url/-/resolve-url-0.2.1.tgz#2c637fe77c893afd2a663fe21aa9080068e2052a" + +resolve@^1.3.2: + version "1.7.1" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.7.1.tgz#aadd656374fd298aee895bc026b8297418677fd3" + dependencies: + path-parse "^1.0.5" + +ret@~0.1.10: + version "0.1.15" + resolved "https://registry.yarnpkg.com/ret/-/ret-0.1.15.tgz#b8a4825d5bdb1fc3f6f53c2bc33f81388681c7bc" + +rimraf@^2.6.1: + version "2.6.2" + resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.2.tgz#2ed8150d24a16ea8651e6d6ef0f47c4158ce7a36" + dependencies: + glob "^7.0.5" + +safe-buffer@^5.1.2, safe-buffer@~5.1.0, safe-buffer@~5.1.1: + version "5.1.2" + resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d" + +safe-regex@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/safe-regex/-/safe-regex-1.1.0.tgz#40a3669f3b077d1e943d44629e157dd48023bf2e" + dependencies: + ret "~0.1.10" + +"safer-buffer@>= 2.1.2 < 3": + version "2.1.2" + resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" + +sax@^1.2.4: + version "1.2.4" + resolved "https://registry.yarnpkg.com/sax/-/sax-1.2.4.tgz#2816234e2378bddc4e5354fab5caa895df7100d9" + +semver@^5.3.0, semver@^5.4.1: + version "5.5.0" + resolved "https://registry.yarnpkg.com/semver/-/semver-5.5.0.tgz#dc4bbc7a6ca9d916dee5d43516f0092b58f7b8ab" + +set-blocking@~2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7" + +set-immediate-shim@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/set-immediate-shim/-/set-immediate-shim-1.0.1.tgz#4b2b1b27eb808a9f8dcc481a58e5e56f599f3f61" + +set-value@^0.4.3: + version "0.4.3" + resolved "https://registry.yarnpkg.com/set-value/-/set-value-0.4.3.tgz#7db08f9d3d22dc7f78e53af3c3bf4666ecdfccf1" + dependencies: + extend-shallow "^2.0.1" + is-extendable "^0.1.1" + is-plain-object "^2.0.1" + to-object-path "^0.3.0" + +set-value@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/set-value/-/set-value-2.0.0.tgz#71ae4a88f0feefbbf52d1ea604f3fb315ebb6274" + dependencies: + extend-shallow "^2.0.1" + is-extendable "^0.1.1" + is-plain-object "^2.0.3" + split-string "^3.0.1" + +signal-exit@^3.0.0: + version "3.0.2" + resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.2.tgz#b5fdc08f1287ea1178628e415e25132b73646c6d" + +slash@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/slash/-/slash-1.0.0.tgz#c41f2f6c39fc16d1cd17ad4b5d896114ae470d55" + +snapdragon-node@^2.0.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/snapdragon-node/-/snapdragon-node-2.1.1.tgz#6c175f86ff14bdb0724563e8f3c1b021a286853b" + dependencies: + define-property "^1.0.0" + isobject "^3.0.0" + snapdragon-util "^3.0.1" + +snapdragon-util@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/snapdragon-util/-/snapdragon-util-3.0.1.tgz#f956479486f2acd79700693f6f7b805e45ab56e2" + dependencies: + kind-of "^3.2.0" + +snapdragon@^0.8.1: + version "0.8.2" + resolved "https://registry.yarnpkg.com/snapdragon/-/snapdragon-0.8.2.tgz#64922e7c565b0e14204ba1aa7d6964278d25182d" + dependencies: + base "^0.11.1" + debug "^2.2.0" + define-property "^0.2.5" + extend-shallow "^2.0.1" + map-cache "^0.2.2" + source-map "^0.5.6" + source-map-resolve "^0.5.0" + use "^3.1.0" + +source-map-resolve@^0.5.0: + version "0.5.2" + resolved "https://registry.yarnpkg.com/source-map-resolve/-/source-map-resolve-0.5.2.tgz#72e2cc34095543e43b2c62b2c4c10d4a9054f259" + dependencies: + atob "^2.1.1" + decode-uri-component "^0.2.0" + resolve-url "^0.2.1" + source-map-url "^0.4.0" + urix "^0.1.0" + +source-map-support@^0.5.6: + version "0.5.6" + resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.6.tgz#4435cee46b1aab62b8e8610ce60f788091c51c13" + dependencies: + buffer-from "^1.0.0" + source-map "^0.6.0" + +source-map-url@^0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/source-map-url/-/source-map-url-0.4.0.tgz#3e935d7ddd73631b97659956d55128e87b5084a3" + +source-map@^0.5.0, source-map@^0.5.6: + version "0.5.7" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc" + +source-map@^0.6.0: + version "0.6.1" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" + +split-string@^3.0.1, split-string@^3.0.2: + version "3.1.0" + resolved "https://registry.yarnpkg.com/split-string/-/split-string-3.1.0.tgz#7cb09dda3a86585705c64b39a6466038682e8fe2" + dependencies: + extend-shallow "^3.0.0" + +static-extend@^0.1.1: + version "0.1.2" + resolved "https://registry.yarnpkg.com/static-extend/-/static-extend-0.1.2.tgz#60809c39cbff55337226fd5e0b520f341f1fb5c6" + dependencies: + define-property "^0.2.5" + object-copy "^0.1.0" + +string-width@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-1.0.2.tgz#118bdf5b8cdc51a2a7e70d211e07e2b0b9b107d3" + dependencies: + code-point-at "^1.0.0" + is-fullwidth-code-point "^1.0.0" + strip-ansi "^3.0.0" + +"string-width@^1.0.2 || 2": + version "2.1.1" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-2.1.1.tgz#ab93f27a8dc13d28cac815c462143a6d9012ae9e" + dependencies: + is-fullwidth-code-point "^2.0.0" + strip-ansi "^4.0.0" + +string_decoder@~1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.1.1.tgz#9cf1611ba62685d7030ae9e4ba34149c3af03fc8" + dependencies: + safe-buffer "~5.1.0" + +strip-ansi@^3.0.0, strip-ansi@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-3.0.1.tgz#6a385fb8853d952d5ff05d0e8aaf94278dc63dcf" + dependencies: + ansi-regex "^2.0.0" + +strip-ansi@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-4.0.0.tgz#a8479022eb1ac368a871389b635262c505ee368f" + dependencies: + ansi-regex "^3.0.0" + +strip-json-comments@~2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a" + +supports-color@^5.3.0: + version "5.4.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.4.0.tgz#1c6b337402c2137605efe19f10fec390f6faab54" + dependencies: + has-flag "^3.0.0" + +tar@^4: + version "4.4.4" + resolved "https://registry.yarnpkg.com/tar/-/tar-4.4.4.tgz#ec8409fae9f665a4355cc3b4087d0820232bb8cd" + dependencies: + chownr "^1.0.1" + fs-minipass "^1.2.5" + minipass "^2.3.3" + minizlib "^1.1.0" + mkdirp "^0.5.0" + safe-buffer "^5.1.2" + yallist "^3.0.2" + +to-fast-properties@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-2.0.0.tgz#dc5e698cbd079265bc73e0377681a4e4e83f616e" + +to-object-path@^0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/to-object-path/-/to-object-path-0.3.0.tgz#297588b7b0e7e0ac08e04e672f85c1f4999e17af" + dependencies: + kind-of "^3.0.2" + +to-regex-range@^2.1.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-2.1.1.tgz#7c80c17b9dfebe599e27367e0d4dd5590141db38" + dependencies: + is-number "^3.0.0" + repeat-string "^1.6.1" + +to-regex@^3.0.1, to-regex@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/to-regex/-/to-regex-3.0.2.tgz#13cfdd9b336552f30b51f33a8ae1b42a7a7599ce" + dependencies: + define-property "^2.0.2" + extend-shallow "^3.0.2" + regex-not "^1.0.2" + safe-regex "^1.1.0" + +trim-right@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/trim-right/-/trim-right-1.0.1.tgz#cb2e1203067e0c8de1f614094b9fe45704ea6003" + +union-value@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/union-value/-/union-value-1.0.0.tgz#5c71c34cb5bad5dcebe3ea0cd08207ba5aa1aea4" + dependencies: + arr-union "^3.1.0" + get-value "^2.0.6" + is-extendable "^0.1.1" + set-value "^0.4.3" + +unset-value@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/unset-value/-/unset-value-1.0.0.tgz#8376873f7d2335179ffb1e6fc3a8ed0dfc8ab559" + dependencies: + has-value "^0.3.1" + isobject "^3.0.0" + +upath@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/upath/-/upath-1.1.0.tgz#35256597e46a581db4793d0ce47fa9aebfc9fabd" + +urix@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/urix/-/urix-0.1.0.tgz#da937f7a62e21fec1fd18d49b35c2935067a6c72" + +use@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/use/-/use-3.1.0.tgz#14716bf03fdfefd03040aef58d8b4b85f3a7c544" + dependencies: + kind-of "^6.0.2" + +util-deprecate@~1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" + +wide-align@^1.1.0: + version "1.1.3" + resolved "https://registry.yarnpkg.com/wide-align/-/wide-align-1.1.3.tgz#ae074e6bdc0c14a431e804e624549c633b000457" + dependencies: + string-width "^1.0.2 || 2" + +wrappy@1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" + +yallist@^3.0.0, yallist@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/yallist/-/yallist-3.0.2.tgz#8452b4bb7e83c7c188d8041c1a837c773d6d8bb9" diff --git a/internal/node/node_repositories.bzl b/internal/node/node_repositories.bzl index a2aa8cca86..cb24884c98 100644 --- a/internal/node/node_repositories.bzl +++ b/internal/node/node_repositories.bzl @@ -456,3 +456,9 @@ def node_repositories( package_json = "@build_bazel_rules_nodejs//internal/rollup:package.json", yarn_lock = "@build_bazel_rules_nodejs//internal/rollup:yarn.lock", ) + + yarn_install( + name = "build_bazel_rules_nodejs_js_library_deps", + package_json = "@build_bazel_rules_nodejs//internal/js_library/v2:package.json", + yarn_lock = "@build_bazel_rules_nodejs//internal/js_library/v2:yarn.lock", + ) From 9ad52e361205cdaac3eaab9355ea86945c25dbb1 Mon Sep 17 00:00:00 2001 From: Globegitter Date: Mon, 11 Jun 2018 15:23:22 +0200 Subject: [PATCH 02/53] Smaller fixes and add devserver example. --- examples/devserver/BUILD.bazel | 7 +++ examples/devserver/WORKSPACE | 60 ++++++++++++++++++++++++++ examples/devserver/package.json | 5 +++ examples/devserver/src/BUILD.bazel | 34 +++++++++++++++ examples/devserver/src/dir/BUILD.bazel | 7 +++ examples/devserver/src/dir/module.js | 1 + examples/devserver/src/module.js | 1 + examples/devserver/src/test.js | 7 +++ examples/devserver/yarn.lock | 7 +++ internal/js_library/v2/js_library.bzl | 7 +-- internal/js_library/v2/package.json | 2 +- internal/js_library/v2/yarn.lock | 4 +- 12 files changed, 136 insertions(+), 6 deletions(-) create mode 100644 examples/devserver/BUILD.bazel create mode 100644 examples/devserver/WORKSPACE create mode 100644 examples/devserver/package.json create mode 100644 examples/devserver/src/BUILD.bazel create mode 100644 examples/devserver/src/dir/BUILD.bazel create mode 100644 examples/devserver/src/dir/module.js create mode 100644 examples/devserver/src/module.js create mode 100644 examples/devserver/src/test.js create mode 100644 examples/devserver/yarn.lock diff --git a/examples/devserver/BUILD.bazel b/examples/devserver/BUILD.bazel new file mode 100644 index 0000000000..c5fb14dd3d --- /dev/null +++ b/examples/devserver/BUILD.bazel @@ -0,0 +1,7 @@ +filegroup( + name = "node_modules", + srcs = glob([ + "node_modules/**/*", + ]), + visibility = ["//:__subpackages__"], +) diff --git a/examples/devserver/WORKSPACE b/examples/devserver/WORKSPACE new file mode 100644 index 0000000000..99d884acdb --- /dev/null +++ b/examples/devserver/WORKSPACE @@ -0,0 +1,60 @@ +workspace(name = "devserver_example") + +local_repository( + name = "build_bazel_rules_nodejs", + path = "../..", +) + +http_archive( + name = "io_bazel_rules_webtesting", + url = "https://github.com/bazelbuild/rules_webtesting/archive/v0.2.0.zip", + strip_prefix = "rules_webtesting-0.2.0", + sha256 = "cecc12f07e95740750a40d38e8b14b76fefa1551bef9332cb432d564d693723c", +) + +http_archive( + name = "io_bazel_rules_go", + url = "https://github.com/bazelbuild/rules_go/releases/download/0.8.1/rules_go-0.8.1.tar.gz", + sha256 = "90bb270d0a92ed5c83558b2797346917c46547f6f7103e648941ecdb6b9d0e72", +) + +http_archive( + name = "build_bazel_rules_typescript", + url = "https://github.com/bazelbuild/rules_typescript/archive/v0.14.0.zip", + strip_prefix = "rules_typescript-0.14.0", + sha256 = "90aa6e1996a14cedfbe64445d5dcf8bbaeec8292cbb177bc9002e77543bc731f", +) + +load("@build_bazel_rules_nodejs//:defs.bzl", "node_repositories") + +# Install a hermetic version of node. +# After this is run, these labels will be available: +# - NodeJS: +# @nodejs//:node +# - NPM: +# @nodejs//:npm +# - The yarn package manager: +# @nodejs//:yarn +node_repositories(package_json = ["//:package.json"], node_version = "8.11.1", yarn_version = "1.6.0") + +# Now the user must run either +# bazel run @nodejs//:yarn +# or +# bazel run @nodejs//:npm + +load("@io_bazel_rules_go//go:def.bzl", "go_rules_dependencies", "go_register_toolchains") + +go_rules_dependencies() +go_register_toolchains() + +load("@io_bazel_rules_webtesting//web:repositories.bzl", "browser_repositories", "web_test_repositories") + +web_test_repositories() +browser_repositories( + chromium = True, +) + + +load("@build_bazel_rules_typescript//:defs.bzl", "ts_setup_workspace") + +ts_setup_workspace() diff --git a/examples/devserver/package.json b/examples/devserver/package.json new file mode 100644 index 0000000000..4b875b4dd3 --- /dev/null +++ b/examples/devserver/package.json @@ -0,0 +1,5 @@ +{ + "dependencies": { + "jsesc": "~1.2.0" + } +} diff --git a/examples/devserver/src/BUILD.bazel b/examples/devserver/src/BUILD.bazel new file mode 100644 index 0000000000..b0493c54ca --- /dev/null +++ b/examples/devserver/src/BUILD.bazel @@ -0,0 +1,34 @@ +load("@build_bazel_rules_nodejs//internal/js_library/v2:js_library.bzl", "js_library") +load("@build_bazel_rules_nodejs//:defs.bzl", "rollup_bundle") +load("@build_bazel_rules_typescript//:defs.bzl", "ts_devserver") + +js_library( + name = "module", + srcs = ["module.js"], +) + +js_library( + name = "test", + srcs = ["test.js"], + deps = [ + ":module", + "//src/dir:module", + ], +) + +ts_devserver( + name = "devserver", + entry_module = "./src/test", + serving_path = "/bundle.min.js", + deps = [ + ":test", + ], +) + +rollup_bundle( + name = "bundle", + entry_point = "src/test.js", + deps = [ + ":test", + ], +) diff --git a/examples/devserver/src/dir/BUILD.bazel b/examples/devserver/src/dir/BUILD.bazel new file mode 100644 index 0000000000..a602f2f860 --- /dev/null +++ b/examples/devserver/src/dir/BUILD.bazel @@ -0,0 +1,7 @@ +load("@build_bazel_rules_nodejs//internal/js_library/v2:js_library.bzl", "js_library") + +js_library( + name = "module", + srcs = ["module.js"], + visibility = ["//src:__subpackages__"] +) diff --git a/examples/devserver/src/dir/module.js b/examples/devserver/src/dir/module.js new file mode 100644 index 0000000000..54c2193d42 --- /dev/null +++ b/examples/devserver/src/dir/module.js @@ -0,0 +1 @@ +export default "EVIL"; diff --git a/examples/devserver/src/module.js b/examples/devserver/src/module.js new file mode 100644 index 0000000000..f33aeb8a31 --- /dev/null +++ b/examples/devserver/src/module.js @@ -0,0 +1 @@ +export default "JS dev workflow"; diff --git a/examples/devserver/src/test.js b/examples/devserver/src/test.js new file mode 100644 index 0000000000..8b782a358b --- /dev/null +++ b/examples/devserver/src/test.js @@ -0,0 +1,7 @@ +import comment from './module'; +import com from './dir/module'; + +const el = document.createElement('div'); +el.innerText = `Hello, ${comment} ${com}`; +el.className = 'js'; +document.body.appendChild(el); diff --git a/examples/devserver/yarn.lock b/examples/devserver/yarn.lock new file mode 100644 index 0000000000..2f9f016ab0 --- /dev/null +++ b/examples/devserver/yarn.lock @@ -0,0 +1,7 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 + + +jsesc@~1.2.0: + version "1.2.1" + resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-1.2.1.tgz#2c905f923eefcd3d75438f18287aa582527e18b8" diff --git a/internal/js_library/v2/js_library.bzl b/internal/js_library/v2/js_library.bzl index 92d7661ae2..d72c2b6269 100644 --- a/internal/js_library/v2/js_library.bzl +++ b/internal/js_library/v2/js_library.bzl @@ -6,20 +6,21 @@ load("@bazel_skylib//:lib.bzl", "paths") def _js_library(ctx): outputs = [ctx.actions.declare_file(src.basename) for src in ctx.files.srcs] + srcs = [src.path for src in ctx.files.srcs] out_dir = paths.join(ctx.bin_dir.path, paths.dirname(ctx.build_file_path)) args = ctx.actions.args() args.add(["--out-dir", out_dir]) args.add(["--config-file", "./" + ctx.file._babelrc.path]) - args.add(paths.dirname(ctx.build_file_path)) + args.add(srcs) - inputs = ctx.files.srcs + ctx.files.deps + ctx.files.node_modules + [ctx.file._babelrc] + ctx.files._babel_node_modules + inputs = ctx.files.srcs + ctx.files.node_modules + [ctx.file._babelrc] + ctx.files._babel_node_modules ctx.actions.run( executable = ctx.executable._babel, inputs = inputs, outputs = outputs, - arguments = [args] + arguments = [args], ) # Return legacy providers as ts_devserver still uses legacy format diff --git a/internal/js_library/v2/package.json b/internal/js_library/v2/package.json index 5f201e32d8..14596c5264 100644 --- a/internal/js_library/v2/package.json +++ b/internal/js_library/v2/package.json @@ -3,7 +3,7 @@ "devDependencies": { "@babel/cli": "^7.0.0-beta.49", "@babel/core": "^v7.0.0-beta.49", - "@babel/plugin-transform-modules-amd": "git://github.com/globegitter/babel-plugin-transform-modules-amd.git#036a1f356b4db1d164699005347e42c3c8b581b2", + "@babel/plugin-transform-modules-amd": "^v7.0.0-beta.49", "source-map-support": "^0.5.6" } } diff --git a/internal/js_library/v2/yarn.lock b/internal/js_library/v2/yarn.lock index fe62238edd..529aa36e18 100644 --- a/internal/js_library/v2/yarn.lock +++ b/internal/js_library/v2/yarn.lock @@ -123,9 +123,9 @@ version "7.0.0-beta.49" resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.0.0-beta.49.tgz#944d0c5ba2812bb159edbd226743afd265179bdc" -"@babel/plugin-transform-modules-amd@git://github.com/globegitter/babel-plugin-transform-modules-amd.git#036a1f356b4db1d164699005347e42c3c8b581b2": +"@babel/plugin-transform-modules-amd@^v7.0.0-beta.49": version "7.0.0-beta.49" - resolved "git://github.com/globegitter/babel-plugin-transform-modules-amd.git#036a1f356b4db1d164699005347e42c3c8b581b2" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.0.0-beta.49.tgz#16d07480954b0415ea70f1ec3edbd0597bd3ddfe" dependencies: "@babel/helper-module-transforms" "7.0.0-beta.49" "@babel/helper-plugin-utils" "7.0.0-beta.49" From 0c5226c7e3284d67b0e9336c87622621ea29fe67 Mon Sep 17 00:00:00 2001 From: Globegitter Date: Mon, 11 Jun 2018 15:38:32 +0200 Subject: [PATCH 03/53] path fixes. --- internal/js_library/v2/babel.rc.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/js_library/v2/babel.rc.js b/internal/js_library/v2/babel.rc.js index deae0f5f48..065b0ddd5d 100644 --- a/internal/js_library/v2/babel.rc.js +++ b/internal/js_library/v2/babel.rc.js @@ -7,7 +7,7 @@ module.exports = { }, "plugins": [ // Note: For some reason this plugin can not be properly loaded from node_modules so have to load relatively - ["../../../external/build_bazel_rules_nodejs_js_library_deps/node_modules/@babel/plugin-transform-modules-amd", { + ["../../../../../external/build_bazel_rules_nodejs_js_library_deps/node_modules/@babel/plugin-transform-modules-amd", { "strict": true, "noInterop": true }] From 57eaf379e6808968d38d30e178e36a050afd7211 Mon Sep 17 00:00:00 2001 From: Alex Eagle Date: Mon, 11 Jun 2018 09:58:17 -0700 Subject: [PATCH 04/53] pairing on js_library --- examples/devserver/src/BUILD.bazel | 7 +++++++ examples/devserver/src/dir/BUILD.bazel | 8 ++++++++ examples/devserver/src/dir/module.js | 2 ++ .../devserver/src/my_lib_folder/BUILD.bazel | 3 +++ internal/js_library/v2/babel.rc.js | 20 +++++++++++-------- internal/js_library/v2/js_library.bzl | 11 ++++++++++ internal/rollup/rollup_bundle.bzl | 1 + 7 files changed, 44 insertions(+), 8 deletions(-) create mode 100644 examples/devserver/src/my_lib_folder/BUILD.bazel diff --git a/examples/devserver/src/BUILD.bazel b/examples/devserver/src/BUILD.bazel index b0493c54ca..3149338f99 100644 --- a/examples/devserver/src/BUILD.bazel +++ b/examples/devserver/src/BUILD.bazel @@ -3,6 +3,8 @@ load("@build_bazel_rules_nodejs//:defs.bzl", "rollup_bundle") load("@build_bazel_rules_typescript//:defs.bzl", "ts_devserver") js_library( + # FIXME: should be named differently? + # this produces an output whose path collides with an input name = "module", srcs = ["module.js"], ) @@ -28,6 +30,11 @@ ts_devserver( rollup_bundle( name = "bundle", entry_point = "src/test.js", + # srcs = [ + # "module.js", + # "test.js", + # "//src/dir:module.js", + # ], deps = [ ":test", ], diff --git a/examples/devserver/src/dir/BUILD.bazel b/examples/devserver/src/dir/BUILD.bazel index a602f2f860..45f002258c 100644 --- a/examples/devserver/src/dir/BUILD.bazel +++ b/examples/devserver/src/dir/BUILD.bazel @@ -3,5 +3,13 @@ load("@build_bazel_rules_nodejs//internal/js_library/v2:js_library.bzl", "js_lib js_library( name = "module", srcs = ["module.js"], + #node_modules = "@place_I_installed_from_npm//:node_modules", visibility = ["//src:__subpackages__"] ) + +exports_files( + ["module.js"] +) + +# -> devmode (babel) +# -> production (filegroup) \ No newline at end of file diff --git a/examples/devserver/src/dir/module.js b/examples/devserver/src/dir/module.js index 54c2193d42..7dad2712c2 100644 --- a/examples/devserver/src/dir/module.js +++ b/examples/devserver/src/dir/module.js @@ -1 +1,3 @@ export default "EVIL"; +require('my_lib'); +require('something_from_npm'); diff --git a/examples/devserver/src/my_lib_folder/BUILD.bazel b/examples/devserver/src/my_lib_folder/BUILD.bazel new file mode 100644 index 0000000000..9fe5e62191 --- /dev/null +++ b/examples/devserver/src/my_lib_folder/BUILD.bazel @@ -0,0 +1,3 @@ +js_library( + module_name = "my_lib", +) \ No newline at end of file diff --git a/internal/js_library/v2/babel.rc.js b/internal/js_library/v2/babel.rc.js index 065b0ddd5d..af4572ad56 100644 --- a/internal/js_library/v2/babel.rc.js +++ b/internal/js_library/v2/babel.rc.js @@ -1,15 +1,19 @@ +var amd_plugin = require('@babel/plugin-transform-modules-amd') + module.exports = { - "moduleIds": true, - getModuleId (name) { + 'moduleIds': true, + getModuleId(name) { const path = require("path"); const process = require("process"); return path.relative(process.cwd(), name) }, - "plugins": [ - // Note: For some reason this plugin can not be properly loaded from node_modules so have to load relatively - ["../../../../../external/build_bazel_rules_nodejs_js_library_deps/node_modules/@babel/plugin-transform-modules-amd", { - "strict": true, - "noInterop": true - }] + + 'plugins': [ + // Note: For some reason this plugin can not be properly loaded from node_modules so have to + // load relatively + [ + // bazel_resolve_plugin, + amd_plugin, {'strict': true, 'noInterop': true} + ] ] }; diff --git a/internal/js_library/v2/js_library.bzl b/internal/js_library/v2/js_library.bzl index d72c2b6269..53ac75f460 100644 --- a/internal/js_library/v2/js_library.bzl +++ b/internal/js_library/v2/js_library.bzl @@ -23,8 +23,19 @@ def _js_library(ctx): arguments = [args], ) + transitive_es6_sources = depset(ctx.files.srcs, + transitive = [ + dep.typescript.transitive_es6_sources + for dep in ctx.attr.deps + if hasattr(dep, "typescript") + ], + ) + # Return legacy providers as ts_devserver still uses legacy format return struct( + typescript = struct( + transitive_es6_sources = transitive_es6_sources, + ), legacy_info = struct( files = outputs, ), diff --git a/internal/rollup/rollup_bundle.bzl b/internal/rollup/rollup_bundle.bzl index 42e1371d74..2ce35fcfb9 100644 --- a/internal/rollup/rollup_bundle.bzl +++ b/internal/rollup/rollup_bundle.bzl @@ -238,6 +238,7 @@ def run_sourcemapexplorer(ctx, js, map, output): def _rollup_bundle(ctx): rollup_config = write_rollup_config(ctx) run_rollup(ctx, collect_es6_sources(ctx), rollup_config, ctx.outputs.build_es6) + # TODO - fix source maps - run babel??? _run_tsc(ctx, ctx.outputs.build_es6, ctx.outputs.build_es5) source_map = run_uglify(ctx, ctx.outputs.build_es5, ctx.outputs.build_es5_min) run_uglify(ctx, ctx.outputs.build_es5, ctx.outputs.build_es5_min_debug, debug = True) From 14f58c16566df1dd63ff9f29b37772661bfd0d04 Mon Sep 17 00:00:00 2001 From: Globegitter Date: Tue, 19 Jun 2018 12:55:56 +0200 Subject: [PATCH 05/53] Some smaller improvements and fixes. --- internal/js_library/v2/babel.rc.js | 20 +++++------ internal/js_library/v2/js_library.bzl | 49 ++++++++++++++++++++------- 2 files changed, 47 insertions(+), 22 deletions(-) diff --git a/internal/js_library/v2/babel.rc.js b/internal/js_library/v2/babel.rc.js index af4572ad56..8fd5d57e13 100644 --- a/internal/js_library/v2/babel.rc.js +++ b/internal/js_library/v2/babel.rc.js @@ -5,15 +5,15 @@ module.exports = { getModuleId(name) { const path = require("path"); const process = require("process"); - return path.relative(process.cwd(), name) + const binDirPath = 'TMPL_bin_dir_path'; + // TODO: Add workspace name to the id + moduleId = path.relative(process.cwd(), name); + if (moduleId.startsWith(binDirPath)) { + // For generated files we take out the bin dir path + return moduleId.slice(binDirPath.length + 1); + } else { + return moduleId + } }, - - 'plugins': [ - // Note: For some reason this plugin can not be properly loaded from node_modules so have to - // load relatively - [ - // bazel_resolve_plugin, - amd_plugin, {'strict': true, 'noInterop': true} - ] - ] + 'plugins': [amd_plugin] }; diff --git a/internal/js_library/v2/js_library.bzl b/internal/js_library/v2/js_library.bzl index 53ac75f460..07ed9dae83 100644 --- a/internal/js_library/v2/js_library.bzl +++ b/internal/js_library/v2/js_library.bzl @@ -3,18 +3,43 @@ load("@bazel_skylib//:lib.bzl", "paths") -def _js_library(ctx): +def _get_path(f): + # filter out generated files as they are being passed in separately to babel + if f.is_source: + return f.path + else: + return None + +def _declare_file(ctx, path): + return ctx.actions.declare_file(paths.join("amd", path)) - outputs = [ctx.actions.declare_file(src.basename) for src in ctx.files.srcs] - srcs = [src.path for src in ctx.files.srcs] +def _write_config(ctx): + print(ctx.file._babelrc_tmpl.path) + output = ctx.actions.declare_file(paths.join(ctx.file._babelrc_tmpl.dirname, "_" + ctx.file._babelrc_tmpl.basename)) + ctx.actions.expand_template( + output = output, + template = ctx.file._babelrc_tmpl, + substitutions = { + "TMPL_bin_dir_path": ctx.bin_dir.path, + } + ) + print(output.path) + return output + +def _js_library(ctx): + config = _write_config(ctx) + # TODO: Babel has a bug currently, when you pass in a file directly it looses its path. + # See https://github.com/babel/babel/issues/8193 + outputs = [_declare_file(ctx, src.basename) if src.is_source else _declare_file(ctx, src.short_path) for src in ctx.files.srcs] - out_dir = paths.join(ctx.bin_dir.path, paths.dirname(ctx.build_file_path)) + out_dir = paths.join(ctx.bin_dir.path, "amd") args = ctx.actions.args() args.add(["--out-dir", out_dir]) - args.add(["--config-file", "./" + ctx.file._babelrc.path]) - args.add(srcs) + args.add(["--config-file", "./" + config.path]) + args.add(ctx.bin_dir.path) + args.add_all(ctx.files.srcs, map_each=_get_path) - inputs = ctx.files.srcs + ctx.files.node_modules + [ctx.file._babelrc] + ctx.files._babel_node_modules + inputs = ctx.files.srcs + ctx.files.node_modules + [config] ctx.actions.run( executable = ctx.executable._babel, @@ -30,17 +55,20 @@ def _js_library(ctx): if hasattr(dep, "typescript") ], ) + files = depset(outputs) # Return legacy providers as ts_devserver still uses legacy format return struct( typescript = struct( transitive_es6_sources = transitive_es6_sources, + # TODO: Actually convert to es5 + es5_sources = files, ), legacy_info = struct( files = outputs, ), providers = [ - DefaultInfo(files=depset(outputs)), + DefaultInfo(files=files), ] ) @@ -61,10 +89,7 @@ js_library = rule( executable = True, cfg="host", default = Label("//internal/js_library/v2:babel")), - "_babel_node_modules": attr.label( - allow_files = True, - default = Label("@build_bazel_rules_nodejs_js_library_deps//:node_modules")), - "_babelrc": attr.label( + "_babelrc_tmpl": attr.label( allow_single_file = True, default = Label("//internal/js_library/v2:babel.rc.js")), }, From 5aac4c822346d0824790833aadd9ddd0bf86eb4d Mon Sep 17 00:00:00 2001 From: Globegitter Date: Tue, 19 Jun 2018 14:32:38 +0200 Subject: [PATCH 06/53] Remove prints. --- internal/js_library/v2/js_library.bzl | 2 -- 1 file changed, 2 deletions(-) diff --git a/internal/js_library/v2/js_library.bzl b/internal/js_library/v2/js_library.bzl index 07ed9dae83..6480ad0f25 100644 --- a/internal/js_library/v2/js_library.bzl +++ b/internal/js_library/v2/js_library.bzl @@ -14,7 +14,6 @@ def _declare_file(ctx, path): return ctx.actions.declare_file(paths.join("amd", path)) def _write_config(ctx): - print(ctx.file._babelrc_tmpl.path) output = ctx.actions.declare_file(paths.join(ctx.file._babelrc_tmpl.dirname, "_" + ctx.file._babelrc_tmpl.basename)) ctx.actions.expand_template( output = output, @@ -23,7 +22,6 @@ def _write_config(ctx): "TMPL_bin_dir_path": ctx.bin_dir.path, } ) - print(output.path) return output def _js_library(ctx): From c1cca5ed9dfc6d9398d55f9cb4a08c6c9b741ccd Mon Sep 17 00:00:00 2001 From: Globegitter Date: Tue, 19 Jun 2018 14:47:49 +0200 Subject: [PATCH 07/53] Ignore config file. --- internal/js_library/v2/js_library.bzl | 1 + 1 file changed, 1 insertion(+) diff --git a/internal/js_library/v2/js_library.bzl b/internal/js_library/v2/js_library.bzl index 6480ad0f25..1d37f4752e 100644 --- a/internal/js_library/v2/js_library.bzl +++ b/internal/js_library/v2/js_library.bzl @@ -32,6 +32,7 @@ def _js_library(ctx): out_dir = paths.join(ctx.bin_dir.path, "amd") args = ctx.actions.args() + args.add(["--ignore", config.path]) args.add(["--out-dir", out_dir]) args.add(["--config-file", "./" + config.path]) args.add(ctx.bin_dir.path) From 159ec9b96113b47b91526050d699c033f3e2ecb6 Mon Sep 17 00:00:00 2001 From: Globegitter Date: Sat, 7 Jul 2018 17:04:57 +0200 Subject: [PATCH 08/53] Fix linting. --- examples/devserver/src/BUILD.bazel | 24 +++++++++---------- examples/devserver/src/dir/BUILD.bazel | 12 +++++----- .../devserver/src/my_lib_folder/BUILD.bazel | 2 +- internal/js_library/v2/BUILD.bazel | 1 - 4 files changed, 19 insertions(+), 20 deletions(-) diff --git a/examples/devserver/src/BUILD.bazel b/examples/devserver/src/BUILD.bazel index 3149338f99..4437b818a3 100644 --- a/examples/devserver/src/BUILD.bazel +++ b/examples/devserver/src/BUILD.bazel @@ -3,19 +3,19 @@ load("@build_bazel_rules_nodejs//:defs.bzl", "rollup_bundle") load("@build_bazel_rules_typescript//:defs.bzl", "ts_devserver") js_library( - # FIXME: should be named differently? - # this produces an output whose path collides with an input - name = "module", - srcs = ["module.js"], + # FIXME: should be named differently? + # this produces an output whose path collides with an input + name = "module", + srcs = ["module.js"], ) js_library( - name = "test", - srcs = ["test.js"], - deps = [ - ":module", - "//src/dir:module", - ], + name = "test", + srcs = ["test.js"], + deps = [ + ":module", + "//src/dir:module", + ], ) ts_devserver( @@ -23,7 +23,7 @@ ts_devserver( entry_module = "./src/test", serving_path = "/bundle.min.js", deps = [ - ":test", + ":test", ], ) @@ -36,6 +36,6 @@ rollup_bundle( # "//src/dir:module.js", # ], deps = [ - ":test", + ":test", ], ) diff --git a/examples/devserver/src/dir/BUILD.bazel b/examples/devserver/src/dir/BUILD.bazel index 45f002258c..0cff06d518 100644 --- a/examples/devserver/src/dir/BUILD.bazel +++ b/examples/devserver/src/dir/BUILD.bazel @@ -1,15 +1,15 @@ load("@build_bazel_rules_nodejs//internal/js_library/v2:js_library.bzl", "js_library") js_library( - name = "module", - srcs = ["module.js"], - #node_modules = "@place_I_installed_from_npm//:node_modules", - visibility = ["//src:__subpackages__"] + name = "module", + srcs = ["module.js"], + #node_modules = "@place_I_installed_from_npm//:node_modules", + visibility = ["//src:__subpackages__"], ) exports_files( - ["module.js"] + ["module.js"], ) # -> devmode (babel) -# -> production (filegroup) \ No newline at end of file +# -> production (filegroup) diff --git a/examples/devserver/src/my_lib_folder/BUILD.bazel b/examples/devserver/src/my_lib_folder/BUILD.bazel index 9fe5e62191..a9c302550a 100644 --- a/examples/devserver/src/my_lib_folder/BUILD.bazel +++ b/examples/devserver/src/my_lib_folder/BUILD.bazel @@ -1,3 +1,3 @@ js_library( module_name = "my_lib", -) \ No newline at end of file +) diff --git a/internal/js_library/v2/BUILD.bazel b/internal/js_library/v2/BUILD.bazel index e0a21dbca8..bdeaf1e0c6 100644 --- a/internal/js_library/v2/BUILD.bazel +++ b/internal/js_library/v2/BUILD.bazel @@ -4,7 +4,6 @@ load("@build_bazel_rules_nodejs//:defs.bzl", "nodejs_binary") # TODO(Markus): Remove public visibility package(default_visibility = ["//visibility:public"]) - exports_files(["babel.rc.js"]) nodejs_binary( From c35f780e30bd4f512296bbfd7341480f488c6d5f Mon Sep 17 00:00:00 2001 From: Globegitter Date: Sun, 8 Jul 2018 09:12:31 +0200 Subject: [PATCH 09/53] More work on module_name. --- WORKSPACE | 4 ++++ examples/devserver/src/BUILD.bazel | 4 ++++ examples/devserver/src/my_lib_folder/BUILD.bazel | 7 ++++++- examples/devserver/src/my_lib_folder/index.js | 1 + examples/devserver/src/test.js | 5 +++-- internal/js_library/v2/js_library.bzl | 2 ++ 6 files changed, 20 insertions(+), 3 deletions(-) create mode 100644 examples/devserver/src/my_lib_folder/index.js diff --git a/WORKSPACE b/WORKSPACE index 33623b8adc..59baca34f1 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -24,6 +24,10 @@ local_repository( name = "packages_example", path = "examples/packages", ) +local_repository( + name = "devserver_example", + path = "examples/devserver", +) # Install a hermetic version of node. # After this is run, these labels will be available: # - NodeJS: diff --git a/examples/devserver/src/BUILD.bazel b/examples/devserver/src/BUILD.bazel index 4437b818a3..e0ba071cee 100644 --- a/examples/devserver/src/BUILD.bazel +++ b/examples/devserver/src/BUILD.bazel @@ -15,6 +15,8 @@ js_library( deps = [ ":module", "//src/dir:module", + # TODO: Add as dep here + # "//src/my_lib_folder:my_lib", ], ) @@ -37,5 +39,7 @@ rollup_bundle( # ], deps = [ ":test", + # TODO: Remove from deps here + "//src/my_lib_folder:my_lib", ], ) diff --git a/examples/devserver/src/my_lib_folder/BUILD.bazel b/examples/devserver/src/my_lib_folder/BUILD.bazel index a9c302550a..ca9ad84acf 100644 --- a/examples/devserver/src/my_lib_folder/BUILD.bazel +++ b/examples/devserver/src/my_lib_folder/BUILD.bazel @@ -1,3 +1,8 @@ +load("@build_bazel_rules_nodejs//internal/js_library/v2:js_library.bzl", "js_library") + js_library( - module_name = "my_lib", + name = "my_lib", + module_name = "my-lib", + srcs = ["index.js"], + visibility = ["//src:__subpackages__"], ) diff --git a/examples/devserver/src/my_lib_folder/index.js b/examples/devserver/src/my_lib_folder/index.js new file mode 100644 index 0000000000..4e7d1d2272 --- /dev/null +++ b/examples/devserver/src/my_lib_folder/index.js @@ -0,0 +1 @@ +export default fum = 'bazel module'; diff --git a/examples/devserver/src/test.js b/examples/devserver/src/test.js index 8b782a358b..f0922ca395 100644 --- a/examples/devserver/src/test.js +++ b/examples/devserver/src/test.js @@ -1,7 +1,8 @@ -import comment from './module'; +import m from 'my-lib'; import com from './dir/module'; +import comment from './module'; const el = document.createElement('div'); -el.innerText = `Hello, ${comment} ${com}`; +el.innerText = `Hello, ${comment} ${com} ${m}`; el.className = 'js'; document.body.appendChild(el); diff --git a/internal/js_library/v2/js_library.bzl b/internal/js_library/v2/js_library.bzl index 1d37f4752e..ecb06de6d7 100644 --- a/internal/js_library/v2/js_library.bzl +++ b/internal/js_library/v2/js_library.bzl @@ -81,6 +81,8 @@ js_library = rule( "deps": attr.label_list( doc = """Other rules that produce JavaScript outputs, such as `ts_library`.""",), # aspects = [rollup_module_mappings_aspect]), + "module_name": attr.string(), + "module_root": attr.string(), "node_modules": attr.label( doc = """Dependencies from npm that provide some modules that must be resolved by babel.""", default = Label("@//:node_modules")), From 8976d0eaf4d1f8f49359675acbf7afbd00bfb744 Mon Sep 17 00:00:00 2001 From: Globegitter Date: Sun, 8 Jul 2018 09:15:02 +0200 Subject: [PATCH 10/53] Build devserver_example. --- .circleci/config.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index 6ee2398c88..9cb68df6ca 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -82,6 +82,7 @@ jobs: # We should also be able to test targets in a different workspace - run: bazel test --config=ci @program_example//... - run: bazel test --config=ci @packages_example//... + - run: bazel build --config=ci @devserver_example//... - save_cache: key: *cache_key From ebff561f4d1124ab70cc2914ced26f9bd358c923 Mon Sep 17 00:00:00 2001 From: Globegitter Date: Fri, 24 Aug 2018 00:48:07 +0200 Subject: [PATCH 11/53] Fix module_name mapping in rollup_bundle, add own babel-wrapper for better & simpler cli behaviour. --- examples/devserver/WORKSPACE | 34 +- examples/devserver/src/BUILD.bazel | 13 +- examples/devserver/src/dir/BUILD.bazel | 4 - examples/devserver/src/dir/module.js | 2 - examples/devserver/src/my_lib_folder/index.js | 2 +- internal/js_library/v2/BUILD.bazel | 4 +- internal/js_library/v2/babel.js | 39 + internal/js_library/v2/babel.rc.js | 5 + internal/js_library/v2/js_library.bzl | 39 +- internal/js_library/v2/package.json | 7 +- internal/js_library/v2/yarn.lock | 1466 ++--------------- internal/rollup/rollup_bundle.bzl | 6 +- 12 files changed, 201 insertions(+), 1420 deletions(-) create mode 100644 internal/js_library/v2/babel.js diff --git a/examples/devserver/WORKSPACE b/examples/devserver/WORKSPACE index 99d884acdb..5c6388462e 100644 --- a/examples/devserver/WORKSPACE +++ b/examples/devserver/WORKSPACE @@ -1,5 +1,14 @@ workspace(name = "devserver_example") +load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") + +http_archive( + name = "bazel_skylib", + url = "https://github.com/bazelbuild/bazel-skylib/archive/0.3.1.zip", + strip_prefix = "bazel-skylib-0.3.1", + sha256 = "95518adafc9a2b656667bbf517a952e54ce7f350779d0dd95133db4eb5c27fb1", +) + local_repository( name = "build_bazel_rules_nodejs", path = "../..", @@ -7,22 +16,28 @@ local_repository( http_archive( name = "io_bazel_rules_webtesting", - url = "https://github.com/bazelbuild/rules_webtesting/archive/v0.2.0.zip", - strip_prefix = "rules_webtesting-0.2.0", - sha256 = "cecc12f07e95740750a40d38e8b14b76fefa1551bef9332cb432d564d693723c", + url = "https://github.com/bazelbuild/rules_webtesting/archive/0.2.1.zip", + strip_prefix = "rules_webtesting-0.2.1", + sha256 = "7d490aadff9b5262e5251fa69427ab2ffd1548422467cb9f9e1d110e2c36f0fa", ) http_archive( name = "io_bazel_rules_go", - url = "https://github.com/bazelbuild/rules_go/releases/download/0.8.1/rules_go-0.8.1.tar.gz", - sha256 = "90bb270d0a92ed5c83558b2797346917c46547f6f7103e648941ecdb6b9d0e72", + url = "https://github.com/bazelbuild/rules_go/releases/download/0.14.0/rules_go-0.14.0.tar.gz", + sha256 = "5756a4ad75b3703eb68249d50e23f5d64eaf1593e886b9aa931aa6e938c4e301", +) + +http_archive( + name = "bazel_gazelle", + urls = ["https://github.com/bazelbuild/bazel-gazelle/releases/download/0.14.0/bazel-gazelle-0.14.0.tar.gz"], + sha256 = "c0a5739d12c6d05b6c1ad56f2200cb0b57c5a70e03ebd2f7b87ce88cabf09c7b", ) http_archive( name = "build_bazel_rules_typescript", - url = "https://github.com/bazelbuild/rules_typescript/archive/v0.14.0.zip", - strip_prefix = "rules_typescript-0.14.0", - sha256 = "90aa6e1996a14cedfbe64445d5dcf8bbaeec8292cbb177bc9002e77543bc731f", + url = "https://github.com/bazelbuild/rules_typescript/archive/0.16.1.zip", + strip_prefix = "rules_typescript-0.16.1", + sha256 = "5b2b0bc63cfcffe7bf97cad2dad3b26a73362f806de66207051f66c87956a995", ) load("@build_bazel_rules_nodejs//:defs.bzl", "node_repositories") @@ -47,6 +62,9 @@ load("@io_bazel_rules_go//go:def.bzl", "go_rules_dependencies", "go_register_too go_rules_dependencies() go_register_toolchains() +load("@bazel_gazelle//:deps.bzl", "gazelle_dependencies") +gazelle_dependencies() + load("@io_bazel_rules_webtesting//web:repositories.bzl", "browser_repositories", "web_test_repositories") web_test_repositories() diff --git a/examples/devserver/src/BUILD.bazel b/examples/devserver/src/BUILD.bazel index e0ba071cee..f55a56f923 100644 --- a/examples/devserver/src/BUILD.bazel +++ b/examples/devserver/src/BUILD.bazel @@ -3,8 +3,6 @@ load("@build_bazel_rules_nodejs//:defs.bzl", "rollup_bundle") load("@build_bazel_rules_typescript//:defs.bzl", "ts_devserver") js_library( - # FIXME: should be named differently? - # this produces an output whose path collides with an input name = "module", srcs = ["module.js"], ) @@ -15,8 +13,7 @@ js_library( deps = [ ":module", "//src/dir:module", - # TODO: Add as dep here - # "//src/my_lib_folder:my_lib", + "//src/my_lib_folder:my_lib", ], ) @@ -24,6 +21,7 @@ ts_devserver( name = "devserver", entry_module = "./src/test", serving_path = "/bundle.min.js", + port = 8080, deps = [ ":test", ], @@ -32,14 +30,7 @@ ts_devserver( rollup_bundle( name = "bundle", entry_point = "src/test.js", - # srcs = [ - # "module.js", - # "test.js", - # "//src/dir:module.js", - # ], deps = [ ":test", - # TODO: Remove from deps here - "//src/my_lib_folder:my_lib", ], ) diff --git a/examples/devserver/src/dir/BUILD.bazel b/examples/devserver/src/dir/BUILD.bazel index 0cff06d518..183d2dcf3e 100644 --- a/examples/devserver/src/dir/BUILD.bazel +++ b/examples/devserver/src/dir/BUILD.bazel @@ -3,13 +3,9 @@ load("@build_bazel_rules_nodejs//internal/js_library/v2:js_library.bzl", "js_lib js_library( name = "module", srcs = ["module.js"], - #node_modules = "@place_I_installed_from_npm//:node_modules", visibility = ["//src:__subpackages__"], ) exports_files( ["module.js"], ) - -# -> devmode (babel) -# -> production (filegroup) diff --git a/examples/devserver/src/dir/module.js b/examples/devserver/src/dir/module.js index 7dad2712c2..54c2193d42 100644 --- a/examples/devserver/src/dir/module.js +++ b/examples/devserver/src/dir/module.js @@ -1,3 +1 @@ export default "EVIL"; -require('my_lib'); -require('something_from_npm'); diff --git a/examples/devserver/src/my_lib_folder/index.js b/examples/devserver/src/my_lib_folder/index.js index 4e7d1d2272..51c192859d 100644 --- a/examples/devserver/src/my_lib_folder/index.js +++ b/examples/devserver/src/my_lib_folder/index.js @@ -1 +1 @@ -export default fum = 'bazel module'; +export default 'bazel module'; diff --git a/internal/js_library/v2/BUILD.bazel b/internal/js_library/v2/BUILD.bazel index bdeaf1e0c6..40770bdfb1 100644 --- a/internal/js_library/v2/BUILD.bazel +++ b/internal/js_library/v2/BUILD.bazel @@ -8,6 +8,8 @@ exports_files(["babel.rc.js"]) nodejs_binary( name = "babel", - entry_point = "build_bazel_rules_nodejs_js_library_deps/node_modules/@babel/cli/bin/babel", + entry_point = "build_bazel_rules_nodejs/internal/js_library/v2/babel.js", + data = ["babel.js"], node_modules = "@build_bazel_rules_nodejs_js_library_deps//:node_modules", + install_source_map_support = False, ) diff --git a/internal/js_library/v2/babel.js b/internal/js_library/v2/babel.js new file mode 100644 index 0000000000..910d88613a --- /dev/null +++ b/internal/js_library/v2/babel.js @@ -0,0 +1,39 @@ +// A simple wrapper around babel-core due to https://github.com/babel/babel/issues/8193 + +const {writeFile, readFileSync} = require('fs'); +const path = require('path'); + +const babel = require('@babel/core'); +const program = require('commander'); + +program.version('1.0.0') + .usage('[options] ') + .option('-o, --out-dir ', 'Output directory for created files') + .option('-c, --config-file ', 'babel.rc.js config file') + .parse(process.argv); + +const outDir = program['outDir'] || ''; + +let babelConfig = {}; +if (program['configFile']) { + // Note: We do not want to use bazel resolve mechanisms, so use path resolve to get the absolute + // path and load that. + babelConfig = require(path.resolve(program['configFile'])); +} + +for (let i = 0; i < program.args.length; i += 1) { + const input = program.args[i]; + const output = input.startsWith(outDir) ? `${input.slice(0, -3)}.ajs` : + path.join(outDir, `${input.slice(0, -3)}.ajs`); + babel.transformFile(input, babelConfig, function(err, result) { + if (err) { + return console.error(err); + } + + return writeFile(output, result.code, (err) => { + if (err) { + console.error(err); + } + }) + }); +} diff --git a/internal/js_library/v2/babel.rc.js b/internal/js_library/v2/babel.rc.js index 8fd5d57e13..9bf2200294 100644 --- a/internal/js_library/v2/babel.rc.js +++ b/internal/js_library/v2/babel.rc.js @@ -3,6 +3,11 @@ var amd_plugin = require('@babel/plugin-transform-modules-amd') module.exports = { 'moduleIds': true, getModuleId(name) { + const moduleName = 'TMPL_module_name'; + if (moduleName) { + return moduleName; + } + const path = require("path"); const process = require("process"); const binDirPath = 'TMPL_bin_dir_path'; diff --git a/internal/js_library/v2/js_library.bzl b/internal/js_library/v2/js_library.bzl index ecb06de6d7..8498d3fa5e 100644 --- a/internal/js_library/v2/js_library.bzl +++ b/internal/js_library/v2/js_library.bzl @@ -3,16 +3,6 @@ load("@bazel_skylib//:lib.bzl", "paths") -def _get_path(f): - # filter out generated files as they are being passed in separately to babel - if f.is_source: - return f.path - else: - return None - -def _declare_file(ctx, path): - return ctx.actions.declare_file(paths.join("amd", path)) - def _write_config(ctx): output = ctx.actions.declare_file(paths.join(ctx.file._babelrc_tmpl.dirname, "_" + ctx.file._babelrc_tmpl.basename)) ctx.actions.expand_template( @@ -20,25 +10,22 @@ def _write_config(ctx): template = ctx.file._babelrc_tmpl, substitutions = { "TMPL_bin_dir_path": ctx.bin_dir.path, + "TMPL_module_name": ctx.attr.module_name, } ) return output def _js_library(ctx): config = _write_config(ctx) - # TODO: Babel has a bug currently, when you pass in a file directly it looses its path. - # See https://github.com/babel/babel/issues/8193 - outputs = [_declare_file(ctx, src.basename) if src.is_source else _declare_file(ctx, src.short_path) for src in ctx.files.srcs] + outputs = [ctx.actions.declare_file(src.basename[:-3] + ".ajs") for src in ctx.files.srcs] - out_dir = paths.join(ctx.bin_dir.path, "amd") + out_dir = paths.join(ctx.bin_dir.path) args = ctx.actions.args() - args.add(["--ignore", config.path]) args.add(["--out-dir", out_dir]) args.add(["--config-file", "./" + config.path]) - args.add(ctx.bin_dir.path) - args.add_all(ctx.files.srcs, map_each=_get_path) + args.add_all(ctx.files.srcs) - inputs = ctx.files.srcs + ctx.files.node_modules + [config] + inputs = ctx.files.srcs + [config] ctx.actions.run( executable = ctx.executable._babel, @@ -77,21 +64,21 @@ js_library = rule( "srcs": attr.label_list( doc = """JavaScript source files from the workspace. These can use ES2015 syntax and ES Modules (import/export)""", - allow_files = [".js"]), + allow_files = [".js"] + ), "deps": attr.label_list( - doc = """Other rules that produce JavaScript outputs, such as `ts_library`.""",), - # aspects = [rollup_module_mappings_aspect]), + doc = """Other rules that produce JavaScript outputs, such as `ts_library`.""", + ), "module_name": attr.string(), "module_root": attr.string(), - "node_modules": attr.label( - doc = """Dependencies from npm that provide some modules that must be resolved by babel.""", - default = Label("@//:node_modules")), "_babel": attr.label( executable = True, cfg="host", - default = Label("//internal/js_library/v2:babel")), + default = Label("//internal/js_library/v2:babel") + ), "_babelrc_tmpl": attr.label( allow_single_file = True, - default = Label("//internal/js_library/v2:babel.rc.js")), + default = Label("//internal/js_library/v2:babel.rc.js") + ), }, ) diff --git a/internal/js_library/v2/package.json b/internal/js_library/v2/package.json index 14596c5264..d8891ca8e0 100644 --- a/internal/js_library/v2/package.json +++ b/internal/js_library/v2/package.json @@ -1,9 +1,8 @@ { "description": "runtime dependencies for js_library", "devDependencies": { - "@babel/cli": "^7.0.0-beta.49", - "@babel/core": "^v7.0.0-beta.49", - "@babel/plugin-transform-modules-amd": "^v7.0.0-beta.49", - "source-map-support": "^0.5.6" + "@babel/core": "^7.0.0-rc.2", + "@babel/plugin-transform-modules-amd": "^7.0.0-rc.2", + "commander": "^2.17.1" } } diff --git a/internal/js_library/v2/yarn.lock b/internal/js_library/v2/yarn.lock index 529aa36e18..c04d451d8c 100644 --- a/internal/js_library/v2/yarn.lock +++ b/internal/js_library/v2/yarn.lock @@ -2,308 +2,152 @@ # yarn lockfile v1 -"@babel/cli@^7.0.0-beta.49": - version "7.0.0-beta.49" - resolved "https://registry.yarnpkg.com/@babel/cli/-/cli-7.0.0-beta.49.tgz#c8c3135f7bc48428436faf5e3f274227a99ef2a8" - dependencies: - commander "^2.8.1" - convert-source-map "^1.1.0" - fs-readdir-recursive "^1.0.0" - glob "^7.0.0" - lodash "^4.17.5" - output-file-sync "^2.0.0" - slash "^1.0.0" - source-map "^0.5.0" - optionalDependencies: - chokidar "^2.0.3" - -"@babel/code-frame@7.0.0-beta.49": - version "7.0.0-beta.49" - resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.0.0-beta.49.tgz#becd805482734440c9d137e46d77340e64d7f51b" - dependencies: - "@babel/highlight" "7.0.0-beta.49" - -"@babel/core@^v7.0.0-beta.49": - version "7.0.0-beta.49" - resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.0.0-beta.49.tgz#73de2081dd652489489f0cb4aa97829a1133314e" - dependencies: - "@babel/code-frame" "7.0.0-beta.49" - "@babel/generator" "7.0.0-beta.49" - "@babel/helpers" "7.0.0-beta.49" - "@babel/parser" "7.0.0-beta.49" - "@babel/template" "7.0.0-beta.49" - "@babel/traverse" "7.0.0-beta.49" - "@babel/types" "7.0.0-beta.49" +"@babel/code-frame@7.0.0-rc.2": + version "7.0.0-rc.2" + resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.0.0-rc.2.tgz#12b6daeb408238360744649d16c0e9fa7ab3859e" + dependencies: + "@babel/highlight" "7.0.0-rc.2" + +"@babel/core@^7.0.0-rc.2": + version "7.0.0-rc.2" + resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.0.0-rc.2.tgz#dcb46b3adb63e35b1e82c35d9130d9c27be58427" + dependencies: + "@babel/code-frame" "7.0.0-rc.2" + "@babel/generator" "7.0.0-rc.2" + "@babel/helpers" "7.0.0-rc.2" + "@babel/parser" "7.0.0-rc.2" + "@babel/template" "7.0.0-rc.2" + "@babel/traverse" "7.0.0-rc.2" + "@babel/types" "7.0.0-rc.2" convert-source-map "^1.1.0" debug "^3.1.0" json5 "^0.5.0" - lodash "^4.17.5" - micromatch "^2.3.11" + lodash "^4.17.10" resolve "^1.3.2" semver "^5.4.1" source-map "^0.5.0" -"@babel/generator@7.0.0-beta.49": - version "7.0.0-beta.49" - resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.0.0-beta.49.tgz#e9cffda913996accec793bbc25ab91bc19d0bf7a" +"@babel/generator@7.0.0-rc.2": + version "7.0.0-rc.2" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.0.0-rc.2.tgz#7aed8fb4ef1bdcc168225096b5b431744ba76bf8" dependencies: - "@babel/types" "7.0.0-beta.49" + "@babel/types" "7.0.0-rc.2" jsesc "^2.5.1" - lodash "^4.17.5" + lodash "^4.17.10" source-map "^0.5.0" trim-right "^1.0.1" -"@babel/helper-function-name@7.0.0-beta.49": - version "7.0.0-beta.49" - resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.0.0-beta.49.tgz#a25c1119b9f035278670126e0225c03041c8de32" +"@babel/helper-function-name@7.0.0-rc.2": + version "7.0.0-rc.2" + resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.0.0-rc.2.tgz#ad7bb9df383c5f53e4bf38c0fe0c7f93e6a27729" dependencies: - "@babel/helper-get-function-arity" "7.0.0-beta.49" - "@babel/template" "7.0.0-beta.49" - "@babel/types" "7.0.0-beta.49" + "@babel/helper-get-function-arity" "7.0.0-rc.2" + "@babel/template" "7.0.0-rc.2" + "@babel/types" "7.0.0-rc.2" -"@babel/helper-get-function-arity@7.0.0-beta.49": - version "7.0.0-beta.49" - resolved "https://registry.yarnpkg.com/@babel/helper-get-function-arity/-/helper-get-function-arity-7.0.0-beta.49.tgz#cf5023f32d2ad92d087374939cec0951bcb51441" +"@babel/helper-get-function-arity@7.0.0-rc.2": + version "7.0.0-rc.2" + resolved "https://registry.yarnpkg.com/@babel/helper-get-function-arity/-/helper-get-function-arity-7.0.0-rc.2.tgz#323cb82e2d805b40c0c36be1dfcb8ffcbd0434f3" dependencies: - "@babel/types" "7.0.0-beta.49" + "@babel/types" "7.0.0-rc.2" -"@babel/helper-module-imports@7.0.0-beta.49": - version "7.0.0-beta.49" - resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.0.0-beta.49.tgz#41d7d59891016c493432a46f7464446552890c75" +"@babel/helper-module-imports@7.0.0-rc.2": + version "7.0.0-rc.2" + resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.0.0-rc.2.tgz#982f30e71431d3ea7e00b1b48da774c60470a21d" dependencies: - "@babel/types" "7.0.0-beta.49" - lodash "^4.17.5" + "@babel/types" "7.0.0-rc.2" -"@babel/helper-module-transforms@7.0.0-beta.49": - version "7.0.0-beta.49" - resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.0.0-beta.49.tgz#fc660bda9d6497412e18776a71aed9a9e2e5f7ad" +"@babel/helper-module-transforms@7.0.0-rc.2": + version "7.0.0-rc.2" + resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.0.0-rc.2.tgz#d9b2697790875a014282973ed74343bb3ad3c7c5" dependencies: - "@babel/helper-module-imports" "7.0.0-beta.49" - "@babel/helper-simple-access" "7.0.0-beta.49" - "@babel/helper-split-export-declaration" "7.0.0-beta.49" - "@babel/template" "7.0.0-beta.49" - "@babel/types" "7.0.0-beta.49" - lodash "^4.17.5" + "@babel/helper-module-imports" "7.0.0-rc.2" + "@babel/helper-simple-access" "7.0.0-rc.2" + "@babel/helper-split-export-declaration" "7.0.0-rc.2" + "@babel/template" "7.0.0-rc.2" + "@babel/types" "7.0.0-rc.2" + lodash "^4.17.10" -"@babel/helper-plugin-utils@7.0.0-beta.49": - version "7.0.0-beta.49" - resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.0.0-beta.49.tgz#0e9fcbb834f878bb365d2a8ea90eee21ba3ccd23" +"@babel/helper-plugin-utils@7.0.0-rc.2": + version "7.0.0-rc.2" + resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.0.0-rc.2.tgz#95bc3225bf6aeda5a5ebc90af2546b5b9317c0b4" -"@babel/helper-simple-access@7.0.0-beta.49": - version "7.0.0-beta.49" - resolved "https://registry.yarnpkg.com/@babel/helper-simple-access/-/helper-simple-access-7.0.0-beta.49.tgz#97a41e2789a9bf8a6c30536a258b79e7444c5d82" +"@babel/helper-simple-access@7.0.0-rc.2": + version "7.0.0-rc.2" + resolved "https://registry.yarnpkg.com/@babel/helper-simple-access/-/helper-simple-access-7.0.0-rc.2.tgz#34043948cda9e6b883527bb827711bd427fea914" dependencies: - "@babel/template" "7.0.0-beta.49" - "@babel/types" "7.0.0-beta.49" - lodash "^4.17.5" + "@babel/template" "7.0.0-rc.2" + "@babel/types" "7.0.0-rc.2" -"@babel/helper-split-export-declaration@7.0.0-beta.49": - version "7.0.0-beta.49" - resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.0.0-beta.49.tgz#40d78eda0968d011b1c52866e5746cfb23e57548" +"@babel/helper-split-export-declaration@7.0.0-rc.2": + version "7.0.0-rc.2" + resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.0.0-rc.2.tgz#726b2dec4e46baeab32db67caa6e88b6521464f8" dependencies: - "@babel/types" "7.0.0-beta.49" + "@babel/types" "7.0.0-rc.2" -"@babel/helpers@7.0.0-beta.49": - version "7.0.0-beta.49" - resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.0.0-beta.49.tgz#054d84032d4e94286a80586500068e41005a51d0" +"@babel/helpers@7.0.0-rc.2": + version "7.0.0-rc.2" + resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.0.0-rc.2.tgz#e21f54451824f55b4f5022c6e9d6fa7df65e8746" dependencies: - "@babel/template" "7.0.0-beta.49" - "@babel/traverse" "7.0.0-beta.49" - "@babel/types" "7.0.0-beta.49" + "@babel/template" "7.0.0-rc.2" + "@babel/traverse" "7.0.0-rc.2" + "@babel/types" "7.0.0-rc.2" -"@babel/highlight@7.0.0-beta.49": - version "7.0.0-beta.49" - resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.0.0-beta.49.tgz#96bdc6b43e13482012ba6691b1018492d39622cc" +"@babel/highlight@7.0.0-rc.2": + version "7.0.0-rc.2" + resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.0.0-rc.2.tgz#0af688a69e3709d9cf392e1837cda18c08d34d4f" dependencies: chalk "^2.0.0" esutils "^2.0.2" - js-tokens "^3.0.0" + js-tokens "^4.0.0" -"@babel/parser@7.0.0-beta.49": - version "7.0.0-beta.49" - resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.0.0-beta.49.tgz#944d0c5ba2812bb159edbd226743afd265179bdc" +"@babel/parser@7.0.0-rc.2": + version "7.0.0-rc.2" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.0.0-rc.2.tgz#a98c01af5834e71d48a5108e3aeeee333cdf26c4" -"@babel/plugin-transform-modules-amd@^v7.0.0-beta.49": - version "7.0.0-beta.49" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.0.0-beta.49.tgz#16d07480954b0415ea70f1ec3edbd0597bd3ddfe" +"@babel/plugin-transform-modules-amd@^7.0.0-rc.2": + version "7.0.0-rc.2" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.0.0-rc.2.tgz#f3c37e6de732c8ac07df01ea164cf976409de469" dependencies: - "@babel/helper-module-transforms" "7.0.0-beta.49" - "@babel/helper-plugin-utils" "7.0.0-beta.49" + "@babel/helper-module-transforms" "7.0.0-rc.2" + "@babel/helper-plugin-utils" "7.0.0-rc.2" -"@babel/template@7.0.0-beta.49": - version "7.0.0-beta.49" - resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.0.0-beta.49.tgz#e38abe8217cb9793f461a5306d7ad745d83e1d27" +"@babel/template@7.0.0-rc.2": + version "7.0.0-rc.2" + resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.0.0-rc.2.tgz#53f6be6c1336ddc7744625c9bdca9d10be5d5d72" dependencies: - "@babel/code-frame" "7.0.0-beta.49" - "@babel/parser" "7.0.0-beta.49" - "@babel/types" "7.0.0-beta.49" - lodash "^4.17.5" + "@babel/code-frame" "7.0.0-rc.2" + "@babel/parser" "7.0.0-rc.2" + "@babel/types" "7.0.0-rc.2" -"@babel/traverse@7.0.0-beta.49": - version "7.0.0-beta.49" - resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.0.0-beta.49.tgz#4f2a73682a18334ed6625d100a8d27319f7c2d68" +"@babel/traverse@7.0.0-rc.2": + version "7.0.0-rc.2" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.0.0-rc.2.tgz#6e54ebe82aa1b3b3cf5ec05594bc14d7c59c9766" dependencies: - "@babel/code-frame" "7.0.0-beta.49" - "@babel/generator" "7.0.0-beta.49" - "@babel/helper-function-name" "7.0.0-beta.49" - "@babel/helper-split-export-declaration" "7.0.0-beta.49" - "@babel/parser" "7.0.0-beta.49" - "@babel/types" "7.0.0-beta.49" + "@babel/code-frame" "7.0.0-rc.2" + "@babel/generator" "7.0.0-rc.2" + "@babel/helper-function-name" "7.0.0-rc.2" + "@babel/helper-split-export-declaration" "7.0.0-rc.2" + "@babel/parser" "7.0.0-rc.2" + "@babel/types" "7.0.0-rc.2" debug "^3.1.0" globals "^11.1.0" - invariant "^2.2.0" - lodash "^4.17.5" + lodash "^4.17.10" -"@babel/types@7.0.0-beta.49": - version "7.0.0-beta.49" - resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.0.0-beta.49.tgz#b7e3b1c3f4d4cfe11bdf8c89f1efd5e1617b87a6" +"@babel/types@7.0.0-rc.2": + version "7.0.0-rc.2" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.0.0-rc.2.tgz#8e025b78764cee8751823e308558a3ca144ebd9d" dependencies: esutils "^2.0.2" - lodash "^4.17.5" + lodash "^4.17.10" to-fast-properties "^2.0.0" -abbrev@1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.1.1.tgz#f8f2c887ad10bf67f634f005b6987fed3179aac8" - -ansi-regex@^2.0.0: - version "2.1.1" - resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-2.1.1.tgz#c3b33ab5ee360d86e0e628f0468ae7ef27d654df" - -ansi-regex@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-3.0.0.tgz#ed0317c322064f79466c02966bddb605ab37d998" - ansi-styles@^3.2.1: version "3.2.1" resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d" dependencies: color-convert "^1.9.0" -anymatch@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-2.0.0.tgz#bcb24b4f37934d9aa7ac17b4adaf89e7c76ef2eb" - dependencies: - micromatch "^3.1.4" - normalize-path "^2.1.1" - -aproba@^1.0.3: - version "1.2.0" - resolved "https://registry.yarnpkg.com/aproba/-/aproba-1.2.0.tgz#6802e6264efd18c790a1b0d517f0f2627bf2c94a" - -are-we-there-yet@~1.1.2: - version "1.1.5" - resolved "https://registry.yarnpkg.com/are-we-there-yet/-/are-we-there-yet-1.1.5.tgz#4b35c2944f062a8bfcda66410760350fe9ddfc21" - dependencies: - delegates "^1.0.0" - readable-stream "^2.0.6" - -arr-diff@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/arr-diff/-/arr-diff-2.0.0.tgz#8f3b827f955a8bd669697e4a4256ac3ceae356cf" - dependencies: - arr-flatten "^1.0.1" - -arr-diff@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/arr-diff/-/arr-diff-4.0.0.tgz#d6461074febfec71e7e15235761a329a5dc7c520" - -arr-flatten@^1.0.1, arr-flatten@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/arr-flatten/-/arr-flatten-1.1.0.tgz#36048bbff4e7b47e136644316c99669ea5ae91f1" - -arr-union@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/arr-union/-/arr-union-3.1.0.tgz#e39b09aea9def866a8f206e288af63919bae39c4" - -array-unique@^0.2.1: - version "0.2.1" - resolved "https://registry.yarnpkg.com/array-unique/-/array-unique-0.2.1.tgz#a1d97ccafcbc2625cc70fadceb36a50c58b01a53" - -array-unique@^0.3.2: - version "0.3.2" - resolved "https://registry.yarnpkg.com/array-unique/-/array-unique-0.3.2.tgz#a894b75d4bc4f6cd679ef3244a9fd8f46ae2d428" - -assign-symbols@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/assign-symbols/-/assign-symbols-1.0.0.tgz#59667f41fadd4f20ccbc2bb96b8d4f7f78ec0367" - -async-each@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/async-each/-/async-each-1.0.1.tgz#19d386a1d9edc6e7c1c85d388aedbcc56d33602d" - -atob@^2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/atob/-/atob-2.1.1.tgz#ae2d5a729477f289d60dd7f96a6314a22dd6c22a" - -balanced-match@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767" - -base@^0.11.1: - version "0.11.2" - resolved "https://registry.yarnpkg.com/base/-/base-0.11.2.tgz#7bde5ced145b6d551a90db87f83c558b4eb48a8f" - dependencies: - cache-base "^1.0.1" - class-utils "^0.3.5" - component-emitter "^1.2.1" - define-property "^1.0.0" - isobject "^3.0.1" - mixin-deep "^1.2.0" - pascalcase "^0.1.1" - -binary-extensions@^1.0.0: - version "1.11.0" - resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-1.11.0.tgz#46aa1751fb6a2f93ee5e689bb1087d4b14c6c205" - -brace-expansion@^1.1.7: - version "1.1.11" - resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" - dependencies: - balanced-match "^1.0.0" - concat-map "0.0.1" - -braces@^1.8.2: - version "1.8.5" - resolved "https://registry.yarnpkg.com/braces/-/braces-1.8.5.tgz#ba77962e12dff969d6b76711e914b737857bf6a7" - dependencies: - expand-range "^1.8.1" - preserve "^0.2.0" - repeat-element "^1.1.2" - -braces@^2.3.0, braces@^2.3.1: - version "2.3.2" - resolved "https://registry.yarnpkg.com/braces/-/braces-2.3.2.tgz#5979fd3f14cd531565e5fa2df1abfff1dfaee729" - dependencies: - arr-flatten "^1.1.0" - array-unique "^0.3.2" - extend-shallow "^2.0.1" - fill-range "^4.0.0" - isobject "^3.0.1" - repeat-element "^1.1.2" - snapdragon "^0.8.1" - snapdragon-node "^2.0.1" - split-string "^3.0.2" - to-regex "^3.0.1" - -buffer-from@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.0.0.tgz#4cb8832d23612589b0406e9e2956c17f06fdf531" - -cache-base@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/cache-base/-/cache-base-1.0.1.tgz#0a7f46416831c8b662ee36fe4e7c59d76f666ab2" - dependencies: - collection-visit "^1.0.0" - component-emitter "^1.2.1" - get-value "^2.0.6" - has-value "^1.0.0" - isobject "^3.0.1" - set-value "^2.0.0" - to-object-path "^0.3.0" - union-value "^1.0.0" - unset-value "^1.0.0" - chalk@^2.0.0: version "2.4.1" resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.1.tgz#18c49ab16a037b6eb0152cc83e3471338215b66e" @@ -312,48 +156,6 @@ chalk@^2.0.0: escape-string-regexp "^1.0.5" supports-color "^5.3.0" -chokidar@^2.0.3: - version "2.0.3" - resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-2.0.3.tgz#dcbd4f6cbb2a55b4799ba8a840ac527e5f4b1176" - dependencies: - anymatch "^2.0.0" - async-each "^1.0.0" - braces "^2.3.0" - glob-parent "^3.1.0" - inherits "^2.0.1" - is-binary-path "^1.0.0" - is-glob "^4.0.0" - normalize-path "^2.1.1" - path-is-absolute "^1.0.0" - readdirp "^2.0.0" - upath "^1.0.0" - optionalDependencies: - fsevents "^1.1.2" - -chownr@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/chownr/-/chownr-1.0.1.tgz#e2a75042a9551908bebd25b8523d5f9769d79181" - -class-utils@^0.3.5: - version "0.3.6" - resolved "https://registry.yarnpkg.com/class-utils/-/class-utils-0.3.6.tgz#f93369ae8b9a7ce02fd41faad0ca83033190c463" - dependencies: - arr-union "^3.1.0" - define-property "^0.2.5" - isobject "^3.0.0" - static-extend "^0.1.1" - -code-point-at@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/code-point-at/-/code-point-at-1.1.0.tgz#0d070b4d043a5bea33a2f1a40e2edb3d9a4ccf77" - -collection-visit@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/collection-visit/-/collection-visit-1.0.0.tgz#4bc0373c164bc3291b4d368c829cf1a80a59dca0" - dependencies: - map-visit "^1.0.0" - object-visit "^1.0.0" - color-convert@^1.9.0: version "1.9.1" resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.1.tgz#c1261107aeb2f294ebffec9ed9ecad529a6097ed" @@ -364,81 +166,20 @@ color-name@^1.1.1: version "1.1.3" resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25" -commander@^2.8.1: - version "2.15.1" - resolved "https://registry.yarnpkg.com/commander/-/commander-2.15.1.tgz#df46e867d0fc2aec66a34662b406a9ccafff5b0f" - -component-emitter@^1.2.1: - version "1.2.1" - resolved "https://registry.yarnpkg.com/component-emitter/-/component-emitter-1.2.1.tgz#137918d6d78283f7df7a6b7c5a63e140e69425e6" - -concat-map@0.0.1: - version "0.0.1" - resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" - -console-control-strings@^1.0.0, console-control-strings@~1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/console-control-strings/-/console-control-strings-1.1.0.tgz#3d7cf4464db6446ea644bf4b39507f9851008e8e" +commander@^2.17.1: + version "2.17.1" + resolved "https://registry.yarnpkg.com/commander/-/commander-2.17.1.tgz#bd77ab7de6de94205ceacc72f1716d29f20a77bf" convert-source-map@^1.1.0: version "1.5.1" resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.5.1.tgz#b8278097b9bc229365de5c62cf5fcaed8b5599e5" -copy-descriptor@^0.1.0: - version "0.1.1" - resolved "https://registry.yarnpkg.com/copy-descriptor/-/copy-descriptor-0.1.1.tgz#676f6eb3c39997c2ee1ac3a924fd6124748f578d" - -core-util-is@~1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" - -debug@^2.1.2, debug@^2.2.0, debug@^2.3.3: - version "2.6.9" - resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" - dependencies: - ms "2.0.0" - debug@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/debug/-/debug-3.1.0.tgz#5bb5a0672628b64149566ba16819e61518c67261" dependencies: ms "2.0.0" -decode-uri-component@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/decode-uri-component/-/decode-uri-component-0.2.0.tgz#eb3913333458775cb84cd1a1fae062106bb87545" - -deep-extend@^0.6.0: - version "0.6.0" - resolved "https://registry.yarnpkg.com/deep-extend/-/deep-extend-0.6.0.tgz#c4fa7c95404a17a9c3e8ca7e1537312b736330ac" - -define-property@^0.2.5: - version "0.2.5" - resolved "https://registry.yarnpkg.com/define-property/-/define-property-0.2.5.tgz#c35b1ef918ec3c990f9a5bc57be04aacec5c8116" - dependencies: - is-descriptor "^0.1.0" - -define-property@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/define-property/-/define-property-1.0.0.tgz#769ebaaf3f4a63aad3af9e8d304c9bbe79bfb0e6" - dependencies: - is-descriptor "^1.0.0" - -define-property@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/define-property/-/define-property-2.0.2.tgz#d459689e8d654ba77e02a817f8710d702cb16e9d" - dependencies: - is-descriptor "^1.0.2" - isobject "^3.0.1" - -delegates@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/delegates/-/delegates-1.0.0.tgz#84c6e159b81904fdca59a0ef44cd870d31250f9a" - -detect-libc@^1.0.2: - version "1.0.3" - resolved "https://registry.yarnpkg.com/detect-libc/-/detect-libc-1.0.3.tgz#fa137c4bd698edf55cd5cd02ac559f91a4c4ba9b" - escape-string-regexp@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" @@ -447,413 +188,17 @@ esutils@^2.0.2: version "2.0.2" resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.2.tgz#0abf4f1caa5bcb1f7a9d8acc6dea4faaa04bac9b" -expand-brackets@^0.1.4: - version "0.1.5" - resolved "https://registry.yarnpkg.com/expand-brackets/-/expand-brackets-0.1.5.tgz#df07284e342a807cd733ac5af72411e581d1177b" - dependencies: - is-posix-bracket "^0.1.0" - -expand-brackets@^2.1.4: - version "2.1.4" - resolved "https://registry.yarnpkg.com/expand-brackets/-/expand-brackets-2.1.4.tgz#b77735e315ce30f6b6eff0f83b04151a22449622" - dependencies: - debug "^2.3.3" - define-property "^0.2.5" - extend-shallow "^2.0.1" - posix-character-classes "^0.1.0" - regex-not "^1.0.0" - snapdragon "^0.8.1" - to-regex "^3.0.1" - -expand-range@^1.8.1: - version "1.8.2" - resolved "https://registry.yarnpkg.com/expand-range/-/expand-range-1.8.2.tgz#a299effd335fe2721ebae8e257ec79644fc85337" - dependencies: - fill-range "^2.1.0" - -extend-shallow@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/extend-shallow/-/extend-shallow-2.0.1.tgz#51af7d614ad9a9f610ea1bafbb989d6b1c56890f" - dependencies: - is-extendable "^0.1.0" - -extend-shallow@^3.0.0, extend-shallow@^3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/extend-shallow/-/extend-shallow-3.0.2.tgz#26a71aaf073b39fb2127172746131c2704028db8" - dependencies: - assign-symbols "^1.0.0" - is-extendable "^1.0.1" - -extglob@^0.3.1: - version "0.3.2" - resolved "https://registry.yarnpkg.com/extglob/-/extglob-0.3.2.tgz#2e18ff3d2f49ab2765cec9023f011daa8d8349a1" - dependencies: - is-extglob "^1.0.0" - -extglob@^2.0.4: - version "2.0.4" - resolved "https://registry.yarnpkg.com/extglob/-/extglob-2.0.4.tgz#ad00fe4dc612a9232e8718711dc5cb5ab0285543" - dependencies: - array-unique "^0.3.2" - define-property "^1.0.0" - expand-brackets "^2.1.4" - extend-shallow "^2.0.1" - fragment-cache "^0.2.1" - regex-not "^1.0.0" - snapdragon "^0.8.1" - to-regex "^3.0.1" - -filename-regex@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/filename-regex/-/filename-regex-2.0.1.tgz#c1c4b9bee3e09725ddb106b75c1e301fe2f18b26" - -fill-range@^2.1.0: - version "2.2.4" - resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-2.2.4.tgz#eb1e773abb056dcd8df2bfdf6af59b8b3a936565" - dependencies: - is-number "^2.1.0" - isobject "^2.0.0" - randomatic "^3.0.0" - repeat-element "^1.1.2" - repeat-string "^1.5.2" - -fill-range@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-4.0.0.tgz#d544811d428f98eb06a63dc402d2403c328c38f7" - dependencies: - extend-shallow "^2.0.1" - is-number "^3.0.0" - repeat-string "^1.6.1" - to-regex-range "^2.1.0" - -for-in@^1.0.1, for-in@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/for-in/-/for-in-1.0.2.tgz#81068d295a8142ec0ac726c6e2200c30fb6d5e80" - -for-own@^0.1.4: - version "0.1.5" - resolved "https://registry.yarnpkg.com/for-own/-/for-own-0.1.5.tgz#5265c681a4f294dabbf17c9509b6763aa84510ce" - dependencies: - for-in "^1.0.1" - -fragment-cache@^0.2.1: - version "0.2.1" - resolved "https://registry.yarnpkg.com/fragment-cache/-/fragment-cache-0.2.1.tgz#4290fad27f13e89be7f33799c6bc5a0abfff0d19" - dependencies: - map-cache "^0.2.2" - -fs-minipass@^1.2.5: - version "1.2.5" - resolved "https://registry.yarnpkg.com/fs-minipass/-/fs-minipass-1.2.5.tgz#06c277218454ec288df77ada54a03b8702aacb9d" - dependencies: - minipass "^2.2.1" - -fs-readdir-recursive@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/fs-readdir-recursive/-/fs-readdir-recursive-1.1.0.tgz#e32fc030a2ccee44a6b5371308da54be0b397d27" - -fs.realpath@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" - -fsevents@^1.1.2: - version "1.2.4" - resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-1.2.4.tgz#f41dcb1af2582af3692da36fc55cbd8e1041c426" - dependencies: - nan "^2.9.2" - node-pre-gyp "^0.10.0" - -gauge@~2.7.3: - version "2.7.4" - resolved "https://registry.yarnpkg.com/gauge/-/gauge-2.7.4.tgz#2c03405c7538c39d7eb37b317022e325fb018bf7" - dependencies: - aproba "^1.0.3" - console-control-strings "^1.0.0" - has-unicode "^2.0.0" - object-assign "^4.1.0" - signal-exit "^3.0.0" - string-width "^1.0.1" - strip-ansi "^3.0.1" - wide-align "^1.1.0" - -get-value@^2.0.3, get-value@^2.0.6: - version "2.0.6" - resolved "https://registry.yarnpkg.com/get-value/-/get-value-2.0.6.tgz#dc15ca1c672387ca76bd37ac0a395ba2042a2c28" - -glob-base@^0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/glob-base/-/glob-base-0.3.0.tgz#dbb164f6221b1c0b1ccf82aea328b497df0ea3c4" - dependencies: - glob-parent "^2.0.0" - is-glob "^2.0.0" - -glob-parent@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-2.0.0.tgz#81383d72db054fcccf5336daa902f182f6edbb28" - dependencies: - is-glob "^2.0.0" - -glob-parent@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-3.1.0.tgz#9e6af6299d8d3bd2bd40430832bd113df906c5ae" - dependencies: - is-glob "^3.1.0" - path-dirname "^1.0.0" - -glob@^7.0.0, glob@^7.0.5: - version "7.1.2" - resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.2.tgz#c19c9df9a028702d678612384a6552404c636d15" - dependencies: - 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@^11.1.0: version "11.5.0" resolved "https://registry.yarnpkg.com/globals/-/globals-11.5.0.tgz#6bc840de6771173b191f13d3a9c94d441ee92642" -graceful-fs@^4.1.11, graceful-fs@^4.1.2: - version "4.1.11" - resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.1.11.tgz#0e8bdfe4d1ddb8854d64e04ea7c00e2a026e5658" - has-flag@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd" -has-unicode@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/has-unicode/-/has-unicode-2.0.1.tgz#e0e6fe6a28cf51138855e086d1691e771de2a8b9" - -has-value@^0.3.1: - version "0.3.1" - resolved "https://registry.yarnpkg.com/has-value/-/has-value-0.3.1.tgz#7b1f58bada62ca827ec0a2078025654845995e1f" - dependencies: - get-value "^2.0.3" - has-values "^0.1.4" - isobject "^2.0.0" - -has-value@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/has-value/-/has-value-1.0.0.tgz#18b281da585b1c5c51def24c930ed29a0be6b177" - dependencies: - get-value "^2.0.6" - has-values "^1.0.0" - isobject "^3.0.0" - -has-values@^0.1.4: - version "0.1.4" - resolved "https://registry.yarnpkg.com/has-values/-/has-values-0.1.4.tgz#6d61de95d91dfca9b9a02089ad384bff8f62b771" - -has-values@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/has-values/-/has-values-1.0.0.tgz#95b0b63fec2146619a6fe57fe75628d5a39efe4f" - dependencies: - is-number "^3.0.0" - kind-of "^4.0.0" - -iconv-lite@^0.4.4: - version "0.4.23" - resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.23.tgz#297871f63be507adcfbfca715d0cd0eed84e9a63" - dependencies: - safer-buffer ">= 2.1.2 < 3" - -ignore-walk@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/ignore-walk/-/ignore-walk-3.0.1.tgz#a83e62e7d272ac0e3b551aaa82831a19b69f82f8" - dependencies: - minimatch "^3.0.4" - -inflight@^1.0.4: - version "1.0.6" - resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" - dependencies: - once "^1.3.0" - wrappy "1" - -inherits@2, inherits@^2.0.1, inherits@~2.0.3: - version "2.0.3" - resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" - -ini@~1.3.0: - version "1.3.5" - resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.5.tgz#eee25f56db1c9ec6085e0c22778083f596abf927" - -invariant@^2.2.0: - version "2.2.4" - resolved "https://registry.yarnpkg.com/invariant/-/invariant-2.2.4.tgz#610f3c92c9359ce1db616e538008d23ff35158e6" - dependencies: - loose-envify "^1.0.0" - -is-accessor-descriptor@^0.1.6: - version "0.1.6" - resolved "https://registry.yarnpkg.com/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz#a9e12cb3ae8d876727eeef3843f8a0897b5c98d6" - dependencies: - kind-of "^3.0.2" - -is-accessor-descriptor@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz#169c2f6d3df1f992618072365c9b0ea1f6878656" - dependencies: - kind-of "^6.0.0" - -is-binary-path@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/is-binary-path/-/is-binary-path-1.0.1.tgz#75f16642b480f187a711c814161fd3a4a7655898" - dependencies: - binary-extensions "^1.0.0" - -is-buffer@^1.1.5: - version "1.1.6" - resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.6.tgz#efaa2ea9daa0d7ab2ea13a97b2b8ad51fefbe8be" - -is-data-descriptor@^0.1.4: - version "0.1.4" - resolved "https://registry.yarnpkg.com/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz#0b5ee648388e2c860282e793f1856fec3f301b56" - dependencies: - kind-of "^3.0.2" - -is-data-descriptor@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz#d84876321d0e7add03990406abbbbd36ba9268c7" - dependencies: - kind-of "^6.0.0" - -is-descriptor@^0.1.0: - version "0.1.6" - resolved "https://registry.yarnpkg.com/is-descriptor/-/is-descriptor-0.1.6.tgz#366d8240dde487ca51823b1ab9f07a10a78251ca" - dependencies: - is-accessor-descriptor "^0.1.6" - is-data-descriptor "^0.1.4" - kind-of "^5.0.0" - -is-descriptor@^1.0.0, is-descriptor@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/is-descriptor/-/is-descriptor-1.0.2.tgz#3b159746a66604b04f8c81524ba365c5f14d86ec" - dependencies: - is-accessor-descriptor "^1.0.0" - is-data-descriptor "^1.0.0" - kind-of "^6.0.2" - -is-dotfile@^1.0.0: - version "1.0.3" - resolved "https://registry.yarnpkg.com/is-dotfile/-/is-dotfile-1.0.3.tgz#a6a2f32ffd2dfb04f5ca25ecd0f6b83cf798a1e1" - -is-equal-shallow@^0.1.3: - version "0.1.3" - resolved "https://registry.yarnpkg.com/is-equal-shallow/-/is-equal-shallow-0.1.3.tgz#2238098fc221de0bcfa5d9eac4c45d638aa1c534" - dependencies: - is-primitive "^2.0.0" - -is-extendable@^0.1.0, is-extendable@^0.1.1: - version "0.1.1" - resolved "https://registry.yarnpkg.com/is-extendable/-/is-extendable-0.1.1.tgz#62b110e289a471418e3ec36a617d472e301dfc89" - -is-extendable@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/is-extendable/-/is-extendable-1.0.1.tgz#a7470f9e426733d81bd81e1155264e3a3507cab4" - dependencies: - is-plain-object "^2.0.4" - -is-extglob@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-1.0.0.tgz#ac468177c4943405a092fc8f29760c6ffc6206c0" - -is-extglob@^2.1.0, is-extglob@^2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2" - -is-fullwidth-code-point@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz#ef9e31386f031a7f0d643af82fde50c457ef00cb" - dependencies: - number-is-nan "^1.0.0" - -is-fullwidth-code-point@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz#a3b30a5c4f199183167aaab93beefae3ddfb654f" - -is-glob@^2.0.0, is-glob@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-2.0.1.tgz#d096f926a3ded5600f3fdfd91198cb0888c2d863" - dependencies: - is-extglob "^1.0.0" - -is-glob@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-3.1.0.tgz#7ba5ae24217804ac70707b96922567486cc3e84a" - dependencies: - is-extglob "^2.1.0" - -is-glob@^4.0.0: +js-tokens@^4.0.0: version "4.0.0" - resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.0.tgz#9521c76845cc2610a85203ddf080a958c2ffabc0" - dependencies: - is-extglob "^2.1.1" - -is-number@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/is-number/-/is-number-2.1.0.tgz#01fcbbb393463a548f2f466cce16dece49db908f" - dependencies: - kind-of "^3.0.2" - -is-number@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/is-number/-/is-number-3.0.0.tgz#24fd6201a4782cf50561c810276afc7d12d71195" - dependencies: - kind-of "^3.0.2" - -is-number@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/is-number/-/is-number-4.0.0.tgz#0026e37f5454d73e356dfe6564699867c6a7f0ff" - -is-odd@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/is-odd/-/is-odd-2.0.0.tgz#7646624671fd7ea558ccd9a2795182f2958f1b24" - dependencies: - is-number "^4.0.0" - -is-plain-obj@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/is-plain-obj/-/is-plain-obj-1.1.0.tgz#71a50c8429dfca773c92a390a4a03b39fcd51d3e" - -is-plain-object@^2.0.1, is-plain-object@^2.0.3, is-plain-object@^2.0.4: - version "2.0.4" - resolved "https://registry.yarnpkg.com/is-plain-object/-/is-plain-object-2.0.4.tgz#2c163b3fafb1b606d9d17928f05c2a1c38e07677" - dependencies: - isobject "^3.0.1" - -is-posix-bracket@^0.1.0: - version "0.1.1" - resolved "https://registry.yarnpkg.com/is-posix-bracket/-/is-posix-bracket-0.1.1.tgz#3334dc79774368e92f016e6fbc0a88f5cd6e6bc4" - -is-primitive@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/is-primitive/-/is-primitive-2.0.0.tgz#207bab91638499c07b2adf240a41a87210034575" - -is-windows@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/is-windows/-/is-windows-1.0.2.tgz#d1850eb9791ecd18e6182ce12a30f396634bb19d" - -isarray@1.0.0, isarray@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" - -isobject@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/isobject/-/isobject-2.1.0.tgz#f065561096a3f1da2ef46272f815c840d87e0c89" - dependencies: - isarray "1.0.0" - -isobject@^3.0.0, isobject@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/isobject/-/isobject-3.0.1.tgz#4e431e92b11a9731636aa1f9c8d1ccbcfdab78df" - -js-tokens@^3.0.0: - version "3.0.2" - resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-3.0.2.tgz#9866df395102130e38f7f996bceb65443209c25b" + resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" jsesc@^2.5.1: version "2.5.1" @@ -863,645 +208,42 @@ json5@^0.5.0: version "0.5.1" resolved "https://registry.yarnpkg.com/json5/-/json5-0.5.1.tgz#1eade7acc012034ad84e2396767ead9fa5495821" -kind-of@^3.0.2, kind-of@^3.0.3, kind-of@^3.2.0: - version "3.2.2" - resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-3.2.2.tgz#31ea21a734bab9bbb0f32466d893aea51e4a3c64" - dependencies: - is-buffer "^1.1.5" - -kind-of@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-4.0.0.tgz#20813df3d712928b207378691a45066fae72dd57" - dependencies: - is-buffer "^1.1.5" - -kind-of@^5.0.0: - version "5.1.0" - resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-5.1.0.tgz#729c91e2d857b7a419a1f9aa65685c4c33f5845d" - -kind-of@^6.0.0, kind-of@^6.0.2: - version "6.0.2" - resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-6.0.2.tgz#01146b36a6218e64e58f3a8d66de5d7fc6f6d051" - -lodash@^4.17.5: +lodash@^4.17.10: version "4.17.10" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.10.tgz#1b7793cf7259ea38fb3661d4d38b3260af8ae4e7" -loose-envify@^1.0.0: - version "1.3.1" - resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.3.1.tgz#d1a8ad33fa9ce0e713d65fdd0ac8b748d478c848" - dependencies: - js-tokens "^3.0.0" - -map-cache@^0.2.2: - version "0.2.2" - resolved "https://registry.yarnpkg.com/map-cache/-/map-cache-0.2.2.tgz#c32abd0bd6525d9b051645bb4f26ac5dc98a0dbf" - -map-visit@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/map-visit/-/map-visit-1.0.0.tgz#ecdca8f13144e660f1b5bd41f12f3479d98dfb8f" - dependencies: - object-visit "^1.0.0" - -math-random@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/math-random/-/math-random-1.0.1.tgz#8b3aac588b8a66e4975e3cdea67f7bb329601fac" - -micromatch@^2.3.11: - version "2.3.11" - resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-2.3.11.tgz#86677c97d1720b363431d04d0d15293bd38c1565" - dependencies: - arr-diff "^2.0.0" - array-unique "^0.2.1" - braces "^1.8.2" - expand-brackets "^0.1.4" - extglob "^0.3.1" - filename-regex "^2.0.0" - is-extglob "^1.0.0" - is-glob "^2.0.1" - kind-of "^3.0.2" - normalize-path "^2.0.1" - object.omit "^2.0.0" - parse-glob "^3.0.4" - regex-cache "^0.4.2" - -micromatch@^3.1.4: - version "3.1.10" - resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-3.1.10.tgz#70859bc95c9840952f359a068a3fc49f9ecfac23" - dependencies: - arr-diff "^4.0.0" - array-unique "^0.3.2" - braces "^2.3.1" - define-property "^2.0.2" - extend-shallow "^3.0.2" - extglob "^2.0.4" - fragment-cache "^0.2.1" - kind-of "^6.0.2" - nanomatch "^1.2.9" - object.pick "^1.3.0" - regex-not "^1.0.0" - snapdragon "^0.8.1" - to-regex "^3.0.2" - -minimatch@^3.0.2, minimatch@^3.0.4: - version "3.0.4" - resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083" - dependencies: - brace-expansion "^1.1.7" - -minimist@0.0.8: - version "0.0.8" - resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d" - -minimist@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284" - -minipass@^2.2.1, minipass@^2.3.3: - version "2.3.3" - resolved "https://registry.yarnpkg.com/minipass/-/minipass-2.3.3.tgz#a7dcc8b7b833f5d368759cce544dccb55f50f233" - dependencies: - safe-buffer "^5.1.2" - yallist "^3.0.0" - -minizlib@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/minizlib/-/minizlib-1.1.0.tgz#11e13658ce46bc3a70a267aac58359d1e0c29ceb" - dependencies: - minipass "^2.2.1" - -mixin-deep@^1.2.0: - version "1.3.1" - resolved "https://registry.yarnpkg.com/mixin-deep/-/mixin-deep-1.3.1.tgz#a49e7268dce1a0d9698e45326c5626df3543d0fe" - dependencies: - for-in "^1.0.2" - is-extendable "^1.0.1" - -mkdirp@^0.5.0, mkdirp@^0.5.1: - version "0.5.1" - resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903" - dependencies: - minimist "0.0.8" - ms@2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" -nan@^2.9.2: - version "2.10.0" - resolved "https://registry.yarnpkg.com/nan/-/nan-2.10.0.tgz#96d0cd610ebd58d4b4de9cc0c6828cda99c7548f" - -nanomatch@^1.2.9: - version "1.2.9" - resolved "https://registry.yarnpkg.com/nanomatch/-/nanomatch-1.2.9.tgz#879f7150cb2dab7a471259066c104eee6e0fa7c2" - dependencies: - arr-diff "^4.0.0" - array-unique "^0.3.2" - define-property "^2.0.2" - extend-shallow "^3.0.2" - fragment-cache "^0.2.1" - is-odd "^2.0.0" - is-windows "^1.0.2" - kind-of "^6.0.2" - object.pick "^1.3.0" - regex-not "^1.0.0" - snapdragon "^0.8.1" - to-regex "^3.0.1" - -needle@^2.2.0: - version "2.2.1" - resolved "https://registry.yarnpkg.com/needle/-/needle-2.2.1.tgz#b5e325bd3aae8c2678902fa296f729455d1d3a7d" - dependencies: - debug "^2.1.2" - iconv-lite "^0.4.4" - sax "^1.2.4" - -node-pre-gyp@^0.10.0: - version "0.10.0" - resolved "https://registry.yarnpkg.com/node-pre-gyp/-/node-pre-gyp-0.10.0.tgz#6e4ef5bb5c5203c6552448828c852c40111aac46" - dependencies: - detect-libc "^1.0.2" - mkdirp "^0.5.1" - needle "^2.2.0" - nopt "^4.0.1" - npm-packlist "^1.1.6" - npmlog "^4.0.2" - rc "^1.1.7" - rimraf "^2.6.1" - semver "^5.3.0" - tar "^4" - -nopt@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/nopt/-/nopt-4.0.1.tgz#d0d4685afd5415193c8c7505602d0d17cd64474d" - dependencies: - abbrev "1" - osenv "^0.1.4" - -normalize-path@^2.0.1, normalize-path@^2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-2.1.1.tgz#1ab28b556e198363a8c1a6f7e6fa20137fe6aed9" - dependencies: - remove-trailing-separator "^1.0.1" - -npm-bundled@^1.0.1: - version "1.0.3" - resolved "https://registry.yarnpkg.com/npm-bundled/-/npm-bundled-1.0.3.tgz#7e71703d973af3370a9591bafe3a63aca0be2308" - -npm-packlist@^1.1.6: - version "1.1.10" - resolved "https://registry.yarnpkg.com/npm-packlist/-/npm-packlist-1.1.10.tgz#1039db9e985727e464df066f4cf0ab6ef85c398a" - dependencies: - ignore-walk "^3.0.1" - npm-bundled "^1.0.1" - -npmlog@^4.0.2: - version "4.1.2" - resolved "https://registry.yarnpkg.com/npmlog/-/npmlog-4.1.2.tgz#08a7f2a8bf734604779a9efa4ad5cc717abb954b" - dependencies: - are-we-there-yet "~1.1.2" - console-control-strings "~1.1.0" - gauge "~2.7.3" - set-blocking "~2.0.0" - -number-is-nan@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/number-is-nan/-/number-is-nan-1.0.1.tgz#097b602b53422a522c1afb8790318336941a011d" - -object-assign@^4.1.0: - version "4.1.1" - resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" - -object-copy@^0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/object-copy/-/object-copy-0.1.0.tgz#7e7d858b781bd7c991a41ba975ed3812754e998c" - dependencies: - copy-descriptor "^0.1.0" - define-property "^0.2.5" - kind-of "^3.0.3" - -object-visit@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/object-visit/-/object-visit-1.0.1.tgz#f79c4493af0c5377b59fe39d395e41042dd045bb" - dependencies: - isobject "^3.0.0" - -object.omit@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/object.omit/-/object.omit-2.0.1.tgz#1a9c744829f39dbb858c76ca3579ae2a54ebd1fa" - dependencies: - for-own "^0.1.4" - is-extendable "^0.1.1" - -object.pick@^1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/object.pick/-/object.pick-1.3.0.tgz#87a10ac4c1694bd2e1cbf53591a66141fb5dd747" - dependencies: - isobject "^3.0.1" - -once@^1.3.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" - dependencies: - wrappy "1" - -os-homedir@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/os-homedir/-/os-homedir-1.0.2.tgz#ffbc4988336e0e833de0c168c7ef152121aa7fb3" - -os-tmpdir@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274" - -osenv@^0.1.4: - version "0.1.5" - resolved "https://registry.yarnpkg.com/osenv/-/osenv-0.1.5.tgz#85cdfafaeb28e8677f416e287592b5f3f49ea410" - dependencies: - os-homedir "^1.0.0" - os-tmpdir "^1.0.0" - -output-file-sync@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/output-file-sync/-/output-file-sync-2.0.1.tgz#f53118282f5f553c2799541792b723a4c71430c0" - dependencies: - graceful-fs "^4.1.11" - is-plain-obj "^1.1.0" - mkdirp "^0.5.1" - -parse-glob@^3.0.4: - version "3.0.4" - resolved "https://registry.yarnpkg.com/parse-glob/-/parse-glob-3.0.4.tgz#b2c376cfb11f35513badd173ef0bb6e3a388391c" - dependencies: - glob-base "^0.3.0" - is-dotfile "^1.0.0" - is-extglob "^1.0.0" - is-glob "^2.0.0" - -pascalcase@^0.1.1: - version "0.1.1" - resolved "https://registry.yarnpkg.com/pascalcase/-/pascalcase-0.1.1.tgz#b363e55e8006ca6fe21784d2db22bd15d7917f14" - -path-dirname@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/path-dirname/-/path-dirname-1.0.2.tgz#cc33d24d525e099a5388c0336c6e32b9160609e0" - -path-is-absolute@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" - path-parse@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.5.tgz#3c1adf871ea9cd6c9431b6ea2bd74a0ff055c4c1" -posix-character-classes@^0.1.0: - version "0.1.1" - resolved "https://registry.yarnpkg.com/posix-character-classes/-/posix-character-classes-0.1.1.tgz#01eac0fe3b5af71a2a6c02feabb8c1fef7e00eab" - -preserve@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/preserve/-/preserve-0.2.0.tgz#815ed1f6ebc65926f865b310c0713bcb3315ce4b" - -process-nextick-args@~2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.0.tgz#a37d732f4271b4ab1ad070d35508e8290788ffaa" - -randomatic@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/randomatic/-/randomatic-3.0.0.tgz#d35490030eb4f7578de292ce6dfb04a91a128923" - dependencies: - is-number "^4.0.0" - kind-of "^6.0.0" - math-random "^1.0.1" - -rc@^1.1.7: - version "1.2.8" - resolved "https://registry.yarnpkg.com/rc/-/rc-1.2.8.tgz#cd924bf5200a075b83c188cd6b9e211b7fc0d3ed" - dependencies: - deep-extend "^0.6.0" - ini "~1.3.0" - minimist "^1.2.0" - strip-json-comments "~2.0.1" - -readable-stream@^2.0.2, readable-stream@^2.0.6: - version "2.3.6" - resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.6.tgz#b11c27d88b8ff1fbe070643cf94b0c79ae1b0aaf" - dependencies: - 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" - -readdirp@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-2.1.0.tgz#4ed0ad060df3073300c48440373f72d1cc642d78" - dependencies: - graceful-fs "^4.1.2" - minimatch "^3.0.2" - readable-stream "^2.0.2" - set-immediate-shim "^1.0.1" - -regex-cache@^0.4.2: - version "0.4.4" - resolved "https://registry.yarnpkg.com/regex-cache/-/regex-cache-0.4.4.tgz#75bdc58a2a1496cec48a12835bc54c8d562336dd" - dependencies: - is-equal-shallow "^0.1.3" - -regex-not@^1.0.0, regex-not@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/regex-not/-/regex-not-1.0.2.tgz#1f4ece27e00b0b65e0247a6810e6a85d83a5752c" - dependencies: - extend-shallow "^3.0.2" - safe-regex "^1.1.0" - -remove-trailing-separator@^1.0.1: - version "1.1.0" - resolved "https://registry.yarnpkg.com/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz#c24bce2a283adad5bc3f58e0d48249b92379d8ef" - -repeat-element@^1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/repeat-element/-/repeat-element-1.1.2.tgz#ef089a178d1483baae4d93eb98b4f9e4e11d990a" - -repeat-string@^1.5.2, repeat-string@^1.6.1: - version "1.6.1" - resolved "https://registry.yarnpkg.com/repeat-string/-/repeat-string-1.6.1.tgz#8dcae470e1c88abc2d600fff4a776286da75e637" - -resolve-url@^0.2.1: - version "0.2.1" - resolved "https://registry.yarnpkg.com/resolve-url/-/resolve-url-0.2.1.tgz#2c637fe77c893afd2a663fe21aa9080068e2052a" - resolve@^1.3.2: version "1.7.1" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.7.1.tgz#aadd656374fd298aee895bc026b8297418677fd3" dependencies: path-parse "^1.0.5" -ret@~0.1.10: - version "0.1.15" - resolved "https://registry.yarnpkg.com/ret/-/ret-0.1.15.tgz#b8a4825d5bdb1fc3f6f53c2bc33f81388681c7bc" - -rimraf@^2.6.1: - version "2.6.2" - resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.2.tgz#2ed8150d24a16ea8651e6d6ef0f47c4158ce7a36" - dependencies: - glob "^7.0.5" - -safe-buffer@^5.1.2, safe-buffer@~5.1.0, safe-buffer@~5.1.1: - version "5.1.2" - resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d" - -safe-regex@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/safe-regex/-/safe-regex-1.1.0.tgz#40a3669f3b077d1e943d44629e157dd48023bf2e" - dependencies: - ret "~0.1.10" - -"safer-buffer@>= 2.1.2 < 3": - version "2.1.2" - resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" - -sax@^1.2.4: - version "1.2.4" - resolved "https://registry.yarnpkg.com/sax/-/sax-1.2.4.tgz#2816234e2378bddc4e5354fab5caa895df7100d9" - -semver@^5.3.0, semver@^5.4.1: +semver@^5.4.1: version "5.5.0" resolved "https://registry.yarnpkg.com/semver/-/semver-5.5.0.tgz#dc4bbc7a6ca9d916dee5d43516f0092b58f7b8ab" -set-blocking@~2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7" - -set-immediate-shim@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/set-immediate-shim/-/set-immediate-shim-1.0.1.tgz#4b2b1b27eb808a9f8dcc481a58e5e56f599f3f61" - -set-value@^0.4.3: - version "0.4.3" - resolved "https://registry.yarnpkg.com/set-value/-/set-value-0.4.3.tgz#7db08f9d3d22dc7f78e53af3c3bf4666ecdfccf1" - dependencies: - extend-shallow "^2.0.1" - is-extendable "^0.1.1" - is-plain-object "^2.0.1" - to-object-path "^0.3.0" - -set-value@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/set-value/-/set-value-2.0.0.tgz#71ae4a88f0feefbbf52d1ea604f3fb315ebb6274" - dependencies: - extend-shallow "^2.0.1" - is-extendable "^0.1.1" - is-plain-object "^2.0.3" - split-string "^3.0.1" - -signal-exit@^3.0.0: - version "3.0.2" - resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.2.tgz#b5fdc08f1287ea1178628e415e25132b73646c6d" - -slash@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/slash/-/slash-1.0.0.tgz#c41f2f6c39fc16d1cd17ad4b5d896114ae470d55" - -snapdragon-node@^2.0.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/snapdragon-node/-/snapdragon-node-2.1.1.tgz#6c175f86ff14bdb0724563e8f3c1b021a286853b" - dependencies: - define-property "^1.0.0" - isobject "^3.0.0" - snapdragon-util "^3.0.1" - -snapdragon-util@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/snapdragon-util/-/snapdragon-util-3.0.1.tgz#f956479486f2acd79700693f6f7b805e45ab56e2" - dependencies: - kind-of "^3.2.0" - -snapdragon@^0.8.1: - version "0.8.2" - resolved "https://registry.yarnpkg.com/snapdragon/-/snapdragon-0.8.2.tgz#64922e7c565b0e14204ba1aa7d6964278d25182d" - dependencies: - base "^0.11.1" - debug "^2.2.0" - define-property "^0.2.5" - extend-shallow "^2.0.1" - map-cache "^0.2.2" - source-map "^0.5.6" - source-map-resolve "^0.5.0" - use "^3.1.0" - -source-map-resolve@^0.5.0: - version "0.5.2" - resolved "https://registry.yarnpkg.com/source-map-resolve/-/source-map-resolve-0.5.2.tgz#72e2cc34095543e43b2c62b2c4c10d4a9054f259" - dependencies: - atob "^2.1.1" - decode-uri-component "^0.2.0" - resolve-url "^0.2.1" - source-map-url "^0.4.0" - urix "^0.1.0" - -source-map-support@^0.5.6: - version "0.5.6" - resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.6.tgz#4435cee46b1aab62b8e8610ce60f788091c51c13" - dependencies: - buffer-from "^1.0.0" - source-map "^0.6.0" - -source-map-url@^0.4.0: - version "0.4.0" - resolved "https://registry.yarnpkg.com/source-map-url/-/source-map-url-0.4.0.tgz#3e935d7ddd73631b97659956d55128e87b5084a3" - -source-map@^0.5.0, source-map@^0.5.6: +source-map@^0.5.0: version "0.5.7" resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc" -source-map@^0.6.0: - version "0.6.1" - resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" - -split-string@^3.0.1, split-string@^3.0.2: - version "3.1.0" - resolved "https://registry.yarnpkg.com/split-string/-/split-string-3.1.0.tgz#7cb09dda3a86585705c64b39a6466038682e8fe2" - dependencies: - extend-shallow "^3.0.0" - -static-extend@^0.1.1: - version "0.1.2" - resolved "https://registry.yarnpkg.com/static-extend/-/static-extend-0.1.2.tgz#60809c39cbff55337226fd5e0b520f341f1fb5c6" - dependencies: - define-property "^0.2.5" - object-copy "^0.1.0" - -string-width@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/string-width/-/string-width-1.0.2.tgz#118bdf5b8cdc51a2a7e70d211e07e2b0b9b107d3" - dependencies: - code-point-at "^1.0.0" - is-fullwidth-code-point "^1.0.0" - strip-ansi "^3.0.0" - -"string-width@^1.0.2 || 2": - version "2.1.1" - resolved "https://registry.yarnpkg.com/string-width/-/string-width-2.1.1.tgz#ab93f27a8dc13d28cac815c462143a6d9012ae9e" - dependencies: - is-fullwidth-code-point "^2.0.0" - strip-ansi "^4.0.0" - -string_decoder@~1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.1.1.tgz#9cf1611ba62685d7030ae9e4ba34149c3af03fc8" - dependencies: - safe-buffer "~5.1.0" - -strip-ansi@^3.0.0, strip-ansi@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-3.0.1.tgz#6a385fb8853d952d5ff05d0e8aaf94278dc63dcf" - dependencies: - ansi-regex "^2.0.0" - -strip-ansi@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-4.0.0.tgz#a8479022eb1ac368a871389b635262c505ee368f" - dependencies: - ansi-regex "^3.0.0" - -strip-json-comments@~2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a" - supports-color@^5.3.0: version "5.4.0" resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.4.0.tgz#1c6b337402c2137605efe19f10fec390f6faab54" dependencies: has-flag "^3.0.0" -tar@^4: - version "4.4.4" - resolved "https://registry.yarnpkg.com/tar/-/tar-4.4.4.tgz#ec8409fae9f665a4355cc3b4087d0820232bb8cd" - dependencies: - chownr "^1.0.1" - fs-minipass "^1.2.5" - minipass "^2.3.3" - minizlib "^1.1.0" - mkdirp "^0.5.0" - safe-buffer "^5.1.2" - yallist "^3.0.2" - to-fast-properties@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-2.0.0.tgz#dc5e698cbd079265bc73e0377681a4e4e83f616e" -to-object-path@^0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/to-object-path/-/to-object-path-0.3.0.tgz#297588b7b0e7e0ac08e04e672f85c1f4999e17af" - dependencies: - kind-of "^3.0.2" - -to-regex-range@^2.1.0: - version "2.1.1" - resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-2.1.1.tgz#7c80c17b9dfebe599e27367e0d4dd5590141db38" - dependencies: - is-number "^3.0.0" - repeat-string "^1.6.1" - -to-regex@^3.0.1, to-regex@^3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/to-regex/-/to-regex-3.0.2.tgz#13cfdd9b336552f30b51f33a8ae1b42a7a7599ce" - dependencies: - define-property "^2.0.2" - extend-shallow "^3.0.2" - regex-not "^1.0.2" - safe-regex "^1.1.0" - trim-right@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/trim-right/-/trim-right-1.0.1.tgz#cb2e1203067e0c8de1f614094b9fe45704ea6003" - -union-value@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/union-value/-/union-value-1.0.0.tgz#5c71c34cb5bad5dcebe3ea0cd08207ba5aa1aea4" - dependencies: - arr-union "^3.1.0" - get-value "^2.0.6" - is-extendable "^0.1.1" - set-value "^0.4.3" - -unset-value@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/unset-value/-/unset-value-1.0.0.tgz#8376873f7d2335179ffb1e6fc3a8ed0dfc8ab559" - dependencies: - has-value "^0.3.1" - isobject "^3.0.0" - -upath@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/upath/-/upath-1.1.0.tgz#35256597e46a581db4793d0ce47fa9aebfc9fabd" - -urix@^0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/urix/-/urix-0.1.0.tgz#da937f7a62e21fec1fd18d49b35c2935067a6c72" - -use@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/use/-/use-3.1.0.tgz#14716bf03fdfefd03040aef58d8b4b85f3a7c544" - dependencies: - kind-of "^6.0.2" - -util-deprecate@~1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" - -wide-align@^1.1.0: - version "1.1.3" - resolved "https://registry.yarnpkg.com/wide-align/-/wide-align-1.1.3.tgz#ae074e6bdc0c14a431e804e624549c633b000457" - dependencies: - string-width "^1.0.2 || 2" - -wrappy@1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" - -yallist@^3.0.0, yallist@^3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/yallist/-/yallist-3.0.2.tgz#8452b4bb7e83c7c188d8041c1a837c773d6d8bb9" diff --git a/internal/rollup/rollup_bundle.bzl b/internal/rollup/rollup_bundle.bzl index 23287add1e..89219cb446 100644 --- a/internal/rollup/rollup_bundle.bzl +++ b/internal/rollup/rollup_bundle.bzl @@ -24,6 +24,10 @@ _ROLLUP_MODULE_MAPPINGS_ATTR = "rollup_module_mappings" def _rollup_module_mappings_aspect_impl(target, ctx): mappings = get_module_mappings(target.label, ctx.rule.attr) + + for dep in ctx.rule.attr.deps: + mappings.update(dep.rollup_module_mappings) + return struct(rollup_module_mappings = mappings) rollup_module_mappings_aspect = aspect( @@ -61,7 +65,7 @@ def write_rollup_config(ctx, plugins=[], root_dir=None, filename="_%s.rollup.con fail(("duplicate module mapping at %s: %s maps to both %s and %s" % (dep.label, k, mappings[k], v)), "deps") mappings[k] = v - + if not root_dir: root_dir = "/".join([ctx.bin_dir.path, build_file_dirname, ctx.label.name + ".es6"]) From 963716ff204d2e39859b4c073a3898aa881e339e Mon Sep 17 00:00:00 2001 From: Globegitter Date: Fri, 24 Aug 2018 00:53:12 +0200 Subject: [PATCH 12/53] Ran buildifier. --- examples/devserver/src/BUILD.bazel | 2 +- examples/devserver/src/my_lib_folder/BUILD.bazel | 2 +- internal/js_library/v2/BUILD.bazel | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/devserver/src/BUILD.bazel b/examples/devserver/src/BUILD.bazel index f55a56f923..9359f512ca 100644 --- a/examples/devserver/src/BUILD.bazel +++ b/examples/devserver/src/BUILD.bazel @@ -20,8 +20,8 @@ js_library( ts_devserver( name = "devserver", entry_module = "./src/test", - serving_path = "/bundle.min.js", port = 8080, + serving_path = "/bundle.min.js", deps = [ ":test", ], diff --git a/examples/devserver/src/my_lib_folder/BUILD.bazel b/examples/devserver/src/my_lib_folder/BUILD.bazel index ca9ad84acf..c9c27f3aaf 100644 --- a/examples/devserver/src/my_lib_folder/BUILD.bazel +++ b/examples/devserver/src/my_lib_folder/BUILD.bazel @@ -2,7 +2,7 @@ load("@build_bazel_rules_nodejs//internal/js_library/v2:js_library.bzl", "js_lib js_library( name = "my_lib", - module_name = "my-lib", srcs = ["index.js"], + module_name = "my-lib", visibility = ["//src:__subpackages__"], ) diff --git a/internal/js_library/v2/BUILD.bazel b/internal/js_library/v2/BUILD.bazel index 40770bdfb1..6ad50066fe 100644 --- a/internal/js_library/v2/BUILD.bazel +++ b/internal/js_library/v2/BUILD.bazel @@ -8,8 +8,8 @@ exports_files(["babel.rc.js"]) nodejs_binary( name = "babel", - entry_point = "build_bazel_rules_nodejs/internal/js_library/v2/babel.js", data = ["babel.js"], - node_modules = "@build_bazel_rules_nodejs_js_library_deps//:node_modules", + entry_point = "build_bazel_rules_nodejs/internal/js_library/v2/babel.js", install_source_map_support = False, + node_modules = "@build_bazel_rules_nodejs_js_library_deps//:node_modules", ) From 5588507879ea5bbdc31f13769c44335378606051 Mon Sep 17 00:00:00 2001 From: Globegitter Date: Fri, 24 Aug 2018 00:58:34 +0200 Subject: [PATCH 13/53] Ensure rule has deps attr. --- internal/rollup/rollup_bundle.bzl | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/internal/rollup/rollup_bundle.bzl b/internal/rollup/rollup_bundle.bzl index 89219cb446..6013e40483 100644 --- a/internal/rollup/rollup_bundle.bzl +++ b/internal/rollup/rollup_bundle.bzl @@ -25,8 +25,9 @@ _ROLLUP_MODULE_MAPPINGS_ATTR = "rollup_module_mappings" def _rollup_module_mappings_aspect_impl(target, ctx): mappings = get_module_mappings(target.label, ctx.rule.attr) - for dep in ctx.rule.attr.deps: - mappings.update(dep.rollup_module_mappings) + if hasattr(ctx.rule.attr, "deps"): + for dep in ctx.rule.attr.deps: + mappings.update(dep.rollup_module_mappings) return struct(rollup_module_mappings = mappings) From ee09e126b525536acb91c3aa334a92295e0bc142 Mon Sep 17 00:00:00 2001 From: Globegitter Date: Fri, 24 Aug 2018 09:38:20 +0200 Subject: [PATCH 14/53] Remove whitespace. --- internal/rollup/rollup_bundle.bzl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/rollup/rollup_bundle.bzl b/internal/rollup/rollup_bundle.bzl index 6013e40483..62210ffc57 100644 --- a/internal/rollup/rollup_bundle.bzl +++ b/internal/rollup/rollup_bundle.bzl @@ -66,7 +66,7 @@ def write_rollup_config(ctx, plugins=[], root_dir=None, filename="_%s.rollup.con fail(("duplicate module mapping at %s: %s maps to both %s and %s" % (dep.label, k, mappings[k], v)), "deps") mappings[k] = v - + if not root_dir: root_dir = "/".join([ctx.bin_dir.path, build_file_dirname, ctx.label.name + ".es6"]) From 99e24a2ae436cb85d5b3ce2e200a8ed5ffcf744a Mon Sep 17 00:00:00 2001 From: Globegitter Date: Sun, 26 Aug 2018 14:32:02 +0200 Subject: [PATCH 15/53] Fix example workspace dependencies. --- WORKSPACE | 19 +++++++++++++++++++ examples/devserver/WORKSPACE | 4 ---- examples/devserver/src/BUILD.bazel | 1 + internal/e2e/node/lib1/BUILD.bazel | 2 +- internal/e2e/rollup/BUILD.bazel | 3 +-- internal/npm_package/test/BUILD.bazel | 4 ++-- internal/rollup/BUILD.bazel | 2 +- package.bzl | 26 ++++++++++++++++++++++++++ 8 files changed, 51 insertions(+), 10 deletions(-) diff --git a/WORKSPACE b/WORKSPACE index a817e6b97f..3ac1206017 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -80,8 +80,27 @@ load("@packages_example//:setup_workspace.bzl", "packages_example_setup_workspac packages_example_setup_workspace() +load("@devserver_example//:setup_workspace.bzl", "devserver_example_setup_workspace") +devserver_example_setup_workspace() + load("@io_bazel_rules_sass//sass:sass_repositories.bzl", "sass_repositories") sass_repositories() load("@io_bazel_skydoc//skylark:skylark.bzl", "skydoc_repositories") skydoc_repositories() + +load("@io_bazel_rules_go//go:def.bzl", "go_rules_dependencies", "go_register_toolchains") +go_rules_dependencies() +go_register_toolchains() + +load("@bazel_gazelle//:deps.bzl", "gazelle_dependencies") +gazelle_dependencies() + +load("@io_bazel_rules_webtesting//web:repositories.bzl", "browser_repositories", "web_test_repositories") +web_test_repositories() +browser_repositories( + chromium = True, +) + +load("@build_bazel_rules_typescript//:defs.bzl", "ts_setup_workspace") +ts_setup_workspace() diff --git a/examples/devserver/WORKSPACE b/examples/devserver/WORKSPACE index 5c6388462e..a8696f7fb1 100644 --- a/examples/devserver/WORKSPACE +++ b/examples/devserver/WORKSPACE @@ -58,7 +58,6 @@ node_repositories(package_json = ["//:package.json"], node_version = "8.11.1", y # bazel run @nodejs//:npm load("@io_bazel_rules_go//go:def.bzl", "go_rules_dependencies", "go_register_toolchains") - go_rules_dependencies() go_register_toolchains() @@ -66,13 +65,10 @@ load("@bazel_gazelle//:deps.bzl", "gazelle_dependencies") gazelle_dependencies() load("@io_bazel_rules_webtesting//web:repositories.bzl", "browser_repositories", "web_test_repositories") - web_test_repositories() browser_repositories( chromium = True, ) - load("@build_bazel_rules_typescript//:defs.bzl", "ts_setup_workspace") - ts_setup_workspace() diff --git a/examples/devserver/src/BUILD.bazel b/examples/devserver/src/BUILD.bazel index 9359f512ca..8547999e95 100644 --- a/examples/devserver/src/BUILD.bazel +++ b/examples/devserver/src/BUILD.bazel @@ -33,4 +33,5 @@ rollup_bundle( deps = [ ":test", ], + node_modules = "@devserver_example_yarn_install//:node_modules", ) diff --git a/internal/e2e/node/lib1/BUILD.bazel b/internal/e2e/node/lib1/BUILD.bazel index fcb1e9a10f..09e857e99a 100644 --- a/internal/e2e/node/lib1/BUILD.bazel +++ b/internal/e2e/node/lib1/BUILD.bazel @@ -1,6 +1,6 @@ package(default_visibility = ["//internal:__subpackages__"]) -load("//internal/js_library:js_library.bzl", "js_library") +load("@build_bazel_rules_nodejs//internal/js_library:js_library.bzl", "js_library") js_library( name = "lib1", diff --git a/internal/e2e/rollup/BUILD.bazel b/internal/e2e/rollup/BUILD.bazel index f12121ffaf..faedb47d06 100644 --- a/internal/e2e/rollup/BUILD.bazel +++ b/internal/e2e/rollup/BUILD.bazel @@ -1,5 +1,4 @@ -load("@build_bazel_rules_nodejs//:defs.bzl", "jasmine_node_test") -load("//:defs.bzl", "rollup_bundle") +load("@build_bazel_rules_nodejs//:defs.bzl", "jasmine_node_test", "rollup_bundle") # The local package node_modules filegroup contains just one depenedency to test # importing from a non-WORKSPACE-root node_modules folder. This makes it more clear diff --git a/internal/npm_package/test/BUILD.bazel b/internal/npm_package/test/BUILD.bazel index 2814f5857f..709460b8fc 100644 --- a/internal/npm_package/test/BUILD.bazel +++ b/internal/npm_package/test/BUILD.bazel @@ -1,5 +1,5 @@ -load("//:defs.bzl", "jasmine_node_test", "npm_package") -load("//internal/common:typescript_mock_lib.bzl", "mock_typescript_lib") +load("@build_bazel_rules_nodejs//:defs.bzl", "jasmine_node_test", "npm_package") +load("@build_bazel_rules_nodejs//internal/common:typescript_mock_lib.bzl", "mock_typescript_lib") genrule( name = "produces_files", diff --git a/internal/rollup/BUILD.bazel b/internal/rollup/BUILD.bazel index 6d09064025..44808eef17 100644 --- a/internal/rollup/BUILD.bazel +++ b/internal/rollup/BUILD.bazel @@ -14,7 +14,7 @@ licenses(["notice"]) # Apache 2.0 -load("//:defs.bzl", "jasmine_node_test", "nodejs_binary") +load("@build_bazel_rules_nodejs//:defs.bzl", "jasmine_node_test", "nodejs_binary") package(default_visibility = ["//internal:__subpackages__"]) diff --git a/package.bzl b/package.bzl index 9af9ac9769..7f57e69ca0 100644 --- a/package.bzl +++ b/package.bzl @@ -105,6 +105,32 @@ def rules_nodejs_dev_dependencies(): sha256 = "491f9e142b870b18a0ec8eb3d66636eeceabe5f0c73025706c86f91a1a2acb4d", ) + http_archive( + name = "build_bazel_rules_typescript", + url = "https://github.com/bazelbuild/rules_typescript/archive/0.16.1.zip", + strip_prefix = "rules_typescript-0.16.1", + sha256 = "5b2b0bc63cfcffe7bf97cad2dad3b26a73362f806de66207051f66c87956a995", + ) + + http_archive( + name = "io_bazel_rules_webtesting", + url = "https://github.com/bazelbuild/rules_webtesting/archive/0.2.1.zip", + strip_prefix = "rules_webtesting-0.2.1", + sha256 = "7d490aadff9b5262e5251fa69427ab2ffd1548422467cb9f9e1d110e2c36f0fa", + ) + + http_archive( + name = "bazel_gazelle", + urls = ["https://github.com/bazelbuild/bazel-gazelle/releases/download/0.14.0/bazel-gazelle-0.14.0.tar.gz"], + sha256 = "c0a5739d12c6d05b6c1ad56f2200cb0b57c5a70e03ebd2f7b87ce88cabf09c7b", + ) + + http_archive( + name = "io_bazel_rules_go", + url = "https://github.com/bazelbuild/rules_go/releases/download/0.14.0/rules_go-0.14.0.tar.gz", + sha256 = "5756a4ad75b3703eb68249d50e23f5d64eaf1593e886b9aa931aa6e938c4e301", + ) + def _maybe(repo_rule, name, **kwargs): if name not in native.existing_rules(): repo_rule(name = name, **kwargs) From e42b5231eb4632ab6d3bd335a30d2d58c01b6b7d Mon Sep 17 00:00:00 2001 From: Globegitter Date: Sun, 26 Aug 2018 14:39:47 +0200 Subject: [PATCH 16/53] Fix example workspace dependencies. --- examples/devserver/src/BUILD.bazel | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/devserver/src/BUILD.bazel b/examples/devserver/src/BUILD.bazel index 8547999e95..1951eedbdd 100644 --- a/examples/devserver/src/BUILD.bazel +++ b/examples/devserver/src/BUILD.bazel @@ -29,7 +29,7 @@ ts_devserver( rollup_bundle( name = "bundle", - entry_point = "src/test.js", + entry_point = "external/devserver_example/src/test.js", deps = [ ":test", ], From 9bd01c44eb47bd183b39f59c53c65b03a81a2752 Mon Sep 17 00:00:00 2001 From: Globegitter Date: Sun, 26 Aug 2018 14:42:00 +0200 Subject: [PATCH 17/53] Add comment about entry_point in rollup_bundle example. --- examples/devserver/src/BUILD.bazel | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/examples/devserver/src/BUILD.bazel b/examples/devserver/src/BUILD.bazel index 1951eedbdd..62fd3769b4 100644 --- a/examples/devserver/src/BUILD.bazel +++ b/examples/devserver/src/BUILD.bazel @@ -29,9 +29,11 @@ ts_devserver( rollup_bundle( name = "bundle", + # Note: This will only work now when called from the top-level workspace, otherwise it would + # just be src/test.js entry_point = "external/devserver_example/src/test.js", deps = [ ":test", ], - node_modules = "@devserver_example_yarn_install//:node_modules", + node_modules = "@devserver_example_yarn_install//:node_modules" ) From 1ad41ebf6e94df55a699455c461513c132718975 Mon Sep 17 00:00:00 2001 From: Globegitter Date: Sun, 26 Aug 2018 14:42:09 +0200 Subject: [PATCH 18/53] Add missing file. --- examples/devserver/setup_workspace.bzl | 28 ++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 examples/devserver/setup_workspace.bzl diff --git a/examples/devserver/setup_workspace.bzl b/examples/devserver/setup_workspace.bzl new file mode 100644 index 0000000000..4e68cb0b27 --- /dev/null +++ b/examples/devserver/setup_workspace.bzl @@ -0,0 +1,28 @@ +# Copyright 2017 The Bazel Authors. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +"""Helper function to setup @package_example workspace. +""" + +load("@build_bazel_rules_nodejs//:defs.bzl", "yarn_install") + +def devserver_example_setup_workspace(): + """Node repositories for @devserver_examples + """ + yarn_install( + name = "devserver_example_yarn_install", + package_json = "@devserver_example//:package.json", + yarn_lock = "@devserver_example//:yarn.lock", + ) + From 545a8679400b69454ee7e4a26836afbd0dca81c9 Mon Sep 17 00:00:00 2001 From: Globegitter Date: Mon, 27 Aug 2018 09:16:17 +0200 Subject: [PATCH 19/53] Cleanup and get everything working again. --- examples/devserver/.browserslistrc | 4 + examples/devserver/BUILD.bazel | 8 +- examples/devserver/src/BUILD.bazel | 16 +- examples/devserver/src/dir/BUILD.bazel | 4 - examples/devserver/src/dir/module.js | 2 +- internal/js_library/v2/babel.js | 9 +- internal/js_library/v2/babel.rc.js | 54 +- internal/js_library/v2/js_library.bzl | 107 +++- internal/js_library/v2/package.json | 5 +- internal/js_library/v2/yarn.lock | 664 +++++++++++++++++++++---- 10 files changed, 722 insertions(+), 151 deletions(-) create mode 100644 examples/devserver/.browserslistrc diff --git a/examples/devserver/.browserslistrc b/examples/devserver/.browserslistrc new file mode 100644 index 0000000000..225691c756 --- /dev/null +++ b/examples/devserver/.browserslistrc @@ -0,0 +1,4 @@ +> 0.5% +last 2 versions +Firefox ESR +not dead diff --git a/examples/devserver/BUILD.bazel b/examples/devserver/BUILD.bazel index c5fb14dd3d..9afe082718 100644 --- a/examples/devserver/BUILD.bazel +++ b/examples/devserver/BUILD.bazel @@ -1,7 +1 @@ -filegroup( - name = "node_modules", - srcs = glob([ - "node_modules/**/*", - ]), - visibility = ["//:__subpackages__"], -) +exports_files([".browserslistrc"]) diff --git a/examples/devserver/src/BUILD.bazel b/examples/devserver/src/BUILD.bazel index 62fd3769b4..24d17d43ff 100644 --- a/examples/devserver/src/BUILD.bazel +++ b/examples/devserver/src/BUILD.bazel @@ -1,3 +1,8 @@ +# For the notes in this file see: +# https://github.com/bazelbuild/rules_nodejs/issues/84 +# https://github.com/bazelbuild/bazel/issues/1262 +# https://docs.google.com/document/d/1qPOUeoqDA3eWFFXS1shWX1FT3e4BQB8yuSMrfQL4QrA + load("@build_bazel_rules_nodejs//internal/js_library/v2:js_library.bzl", "js_library") load("@build_bazel_rules_nodejs//:defs.bzl", "rollup_bundle") load("@build_bazel_rules_typescript//:defs.bzl", "ts_devserver") @@ -15,13 +20,20 @@ js_library( "//src/dir:module", "//src/my_lib_folder:my_lib", ], + # Note: This rc file will only be found by babel when run in the devserver_example workspace + # but not in the top-level one, due to how bazel currently handels pathing + data = [ + "//:.browserslistrc", + ] ) ts_devserver( name = "devserver", - entry_module = "./src/test", + # Note: This will only work now when called from the top-level workspace, otherwise it would + # just be src/test.js + entry_module = "external/devserver_example/src/test", port = 8080, - serving_path = "/bundle.min.js", + serving_path = "/bundle.js", deps = [ ":test", ], diff --git a/examples/devserver/src/dir/BUILD.bazel b/examples/devserver/src/dir/BUILD.bazel index 183d2dcf3e..e5ed7fdd9a 100644 --- a/examples/devserver/src/dir/BUILD.bazel +++ b/examples/devserver/src/dir/BUILD.bazel @@ -5,7 +5,3 @@ js_library( srcs = ["module.js"], visibility = ["//src:__subpackages__"], ) - -exports_files( - ["module.js"], -) diff --git a/examples/devserver/src/dir/module.js b/examples/devserver/src/dir/module.js index 54c2193d42..9939948651 100644 --- a/examples/devserver/src/dir/module.js +++ b/examples/devserver/src/dir/module.js @@ -1 +1 @@ -export default "EVIL"; +export default 'and'; diff --git a/internal/js_library/v2/babel.js b/internal/js_library/v2/babel.js index 910d88613a..ef04bdf0a2 100644 --- a/internal/js_library/v2/babel.js +++ b/internal/js_library/v2/babel.js @@ -9,6 +9,7 @@ const program = require('commander'); program.version('1.0.0') .usage('[options] ') .option('-o, --out-dir ', 'Output directory for created files') + .option('-e, --out-files-extension ', 'Change file extension for created files') .option('-c, --config-file ', 'babel.rc.js config file') .parse(process.argv); @@ -23,8 +24,12 @@ if (program['configFile']) { for (let i = 0; i < program.args.length; i += 1) { const input = program.args[i]; - const output = input.startsWith(outDir) ? `${input.slice(0, -3)}.ajs` : - path.join(outDir, `${input.slice(0, -3)}.ajs`); + // Note: For now we assume .js file extensions + const outputFile = program['outFilesExtension'] ? + `${input.slice(0, -3)}.${program['outFilesExtension']}` : + input; + const output = input.startsWith(outDir) ? outputFile : path.join(outDir, outputFile); + babel.transformFile(input, babelConfig, function(err, result) { if (err) { return console.error(err); diff --git a/internal/js_library/v2/babel.rc.js b/internal/js_library/v2/babel.rc.js index 9bf2200294..400e06a2f2 100644 --- a/internal/js_library/v2/babel.rc.js +++ b/internal/js_library/v2/babel.rc.js @@ -1,24 +1,36 @@ var amd_plugin = require('@babel/plugin-transform-modules-amd') +var env_preset = require('@babel/preset-env') -module.exports = { - 'moduleIds': true, - getModuleId(name) { - const moduleName = 'TMPL_module_name'; - if (moduleName) { - return moduleName; - } +const babelConfig = {}; - const path = require("path"); - const process = require("process"); - const binDirPath = 'TMPL_bin_dir_path'; - // TODO: Add workspace name to the id - moduleId = path.relative(process.cwd(), name); - if (moduleId.startsWith(binDirPath)) { - // For generated files we take out the bin dir path - return moduleId.slice(binDirPath.length + 1); - } else { - return moduleId - } - }, - 'plugins': [amd_plugin] -}; +if (process.env.BAZEL_ES5_TARGET) { + babelConfig.presets = [env_preset]; +} + +if (process.env.BAZEL_AMD_TARGET) { + const amdConfig = { + moduleIds: true, + getModuleId(name) { + const moduleName = 'TMPL_module_name'; + if (moduleName) { + return moduleName; + } + + const path = require('path'); + const process = require('process'); + const binDirPath = 'TMPL_bin_dir_path'; + // TODO: Add workspace name to the id + moduleId = path.relative(process.cwd(), name); + if (moduleId.startsWith(binDirPath)) { + // For generated files we take out the bin dir path + return moduleId.slice(binDirPath.length + 1); + } else { + return moduleId + } + }, + plugins: [amd_plugin], + }; + Object.assign(babelConfig, amdConfig); +} + +module.exports = babelConfig; diff --git a/internal/js_library/v2/js_library.bzl b/internal/js_library/v2/js_library.bzl index 8498d3fa5e..34ec7d6cca 100644 --- a/internal/js_library/v2/js_library.bzl +++ b/internal/js_library/v2/js_library.bzl @@ -15,47 +15,108 @@ def _write_config(ctx): ) return output -def _js_library(ctx): - config = _write_config(ctx) - outputs = [ctx.actions.declare_file(src.basename[:-3] + ".ajs") for src in ctx.files.srcs] - - out_dir = paths.join(ctx.bin_dir.path) +def _create_babel_args(ctx, config_path, out_files_extenstion): args = ctx.actions.args() - args.add(["--out-dir", out_dir]) - args.add(["--config-file", "./" + config.path]) + args.add("--out-dir", ctx.bin_dir.path) + args.add("--config-file", config_path) + args.add("--out-files-extension", out_files_extenstion) args.add_all(ctx.files.srcs) + return args - inputs = ctx.files.srcs + [config] +def _declare_babel_outputs(ctx, file_extenstion): + return [ctx.actions.declare_file(src.basename[:-2] + file_extenstion) for src in ctx.files.srcs] +def _run_babel(ctx, inputs, outputs, args, env, mnemonic, description): ctx.actions.run( executable = ctx.executable._babel, inputs = inputs, outputs = outputs, arguments = [args], + env = env, + mnemonic = mnemonic, + progress_message = "Compiling Javascript (%s) %s" % (description, ctx.label), ) - transitive_es6_sources = depset(ctx.files.srcs, - transitive = [ - dep.typescript.transitive_es6_sources - for dep in ctx.attr.deps - if hasattr(dep, "typescript") - ], +def _babel_conversion(ctx, inputs, config, file_extenstion, env, mnemonic, description): + outputs = _declare_babel_outputs(ctx, file_extenstion) + args = _create_babel_args(ctx, config.path, file_extenstion) + _run_babel(ctx, inputs, outputs, args, env, mnemonic, description) + return outputs + +def _amd_conversion(ctx, inputs, config): + file_extenstion = "ajs" + env = { + "BAZEL_AMD_TARGET": "true", + } + return _babel_conversion(ctx, inputs, config, file_extenstion, env, "JsAmdCompile", "devmode") + +def _es5_conversion(ctx, inputs, config): + file_extenstion = "es5.js" + env = { + "BAZEL_ES5_TARGET": "true", + } + return _babel_conversion(ctx, inputs, config, file_extenstion, env, "JsEs5Compile", "prodmode") + +def _collect_sources(ctx, es5_outputs, amd_outputs): + amd_sources = depset(amd_outputs) + es5_sources = depset(es5_outputs) + es6_sources = depset(ctx.files.srcs) + transitive_es5_sources = depset() + transitive_es6_sources = depset() + for dep in ctx.attr.deps: + if hasattr(dep, "typescript"): + transitive_es5_sources = depset(transitive = [ + transitive_es5_sources, + dep.typescript.transitive_es5_sources, + ]) + transitive_es6_sources = depset(transitive = [ + transitive_es6_sources, + dep.typescript.transitive_es6_sources, + ]) + + return struct( + amd_sources = amd_sources, + es5_sources = es5_sources, + transitive_es5_sources = depset(transitive = [transitive_es5_sources, es5_sources]), + es6_sources = es6_sources, + transitive_es6_sources = depset(transitive = [transitive_es6_sources, es6_sources]) ) - files = depset(outputs) + + +def _js_library(ctx): + config = _write_config(ctx) + inputs = ctx.files.srcs + ctx.files.data + [config] + + amd_outputs = _amd_conversion(ctx, inputs, config) + es5_outputs = _es5_conversion(ctx, inputs, config) + + js_providers = _collect_sources(ctx, es5_outputs, amd_outputs) # Return legacy providers as ts_devserver still uses legacy format return struct( typescript = struct( - transitive_es6_sources = transitive_es6_sources, - # TODO: Actually convert to es5 - es5_sources = files, + es6_sources = js_providers.es6_sources, + transitive_es6_sources = js_providers.transitive_es6_sources, + # Note: this returning the amd sources here for ts_devserver compatibility, should be + # js_porivders.es5_sources + es5_sources = js_providers.amd_sources, + transitive_es5_sources = js_providers.transitive_es5_sources, ), legacy_info = struct( - files = outputs, + files = js_providers.amd_sources, + tags = ctx.attr.tags, + module_name = ctx.attr.module_name, ), providers = [ - DefaultInfo(files=files), - ] + DefaultInfo( + files = depset(amd_outputs + es5_outputs), + runfiles = ctx.runfiles(), + ), + OutputGroupInfo( + es5_sources = js_providers.es5_sources, + amd_sources = js_providers.amd_sources, + ), + ], ) js_library = rule( @@ -69,6 +130,10 @@ js_library = rule( "deps": attr.label_list( doc = """Other rules that produce JavaScript outputs, such as `ts_library`.""", ), + "data": attr.label_list( + doc = """Other files useful for babel such as .browserslistrc""", + allow_files = True, + ), "module_name": attr.string(), "module_root": attr.string(), "_babel": attr.label( diff --git a/internal/js_library/v2/package.json b/internal/js_library/v2/package.json index d8891ca8e0..9b953c3b2d 100644 --- a/internal/js_library/v2/package.json +++ b/internal/js_library/v2/package.json @@ -1,8 +1,9 @@ { "description": "runtime dependencies for js_library", "devDependencies": { - "@babel/core": "^7.0.0-rc.2", - "@babel/plugin-transform-modules-amd": "^7.0.0-rc.2", + "@babel/core": "^7.0.0-rc.3", + "@babel/plugin-transform-modules-amd": "^7.0.0-rc.3", + "@babel/preset-env": "^7.0.0-rc.3", "commander": "^2.17.1" } } diff --git a/internal/js_library/v2/yarn.lock b/internal/js_library/v2/yarn.lock index c04d451d8c..ef87b66981 100644 --- a/internal/js_library/v2/yarn.lock +++ b/internal/js_library/v2/yarn.lock @@ -2,23 +2,23 @@ # yarn lockfile v1 -"@babel/code-frame@7.0.0-rc.2": - version "7.0.0-rc.2" - resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.0.0-rc.2.tgz#12b6daeb408238360744649d16c0e9fa7ab3859e" - dependencies: - "@babel/highlight" "7.0.0-rc.2" - -"@babel/core@^7.0.0-rc.2": - version "7.0.0-rc.2" - resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.0.0-rc.2.tgz#dcb46b3adb63e35b1e82c35d9130d9c27be58427" - dependencies: - "@babel/code-frame" "7.0.0-rc.2" - "@babel/generator" "7.0.0-rc.2" - "@babel/helpers" "7.0.0-rc.2" - "@babel/parser" "7.0.0-rc.2" - "@babel/template" "7.0.0-rc.2" - "@babel/traverse" "7.0.0-rc.2" - "@babel/types" "7.0.0-rc.2" +"@babel/code-frame@7.0.0-rc.3": + version "7.0.0-rc.3" + resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.0.0-rc.3.tgz#d77a587401f818a3168700f596e41cd6905947b2" + dependencies: + "@babel/highlight" "7.0.0-rc.3" + +"@babel/core@^7.0.0-rc.3": + version "7.0.0-rc.3" + resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.0.0-rc.3.tgz#0c3b5c4fcc65ea3fc7c019202aca6cd0b17705e7" + dependencies: + "@babel/code-frame" "7.0.0-rc.3" + "@babel/generator" "7.0.0-rc.3" + "@babel/helpers" "7.0.0-rc.3" + "@babel/parser" "7.0.0-rc.3" + "@babel/template" "7.0.0-rc.3" + "@babel/traverse" "7.0.0-rc.3" + "@babel/types" "7.0.0-rc.3" convert-source-map "^1.1.0" debug "^3.1.0" json5 "^0.5.0" @@ -27,116 +27,492 @@ semver "^5.4.1" source-map "^0.5.0" -"@babel/generator@7.0.0-rc.2": - version "7.0.0-rc.2" - resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.0.0-rc.2.tgz#7aed8fb4ef1bdcc168225096b5b431744ba76bf8" +"@babel/generator@7.0.0-rc.3": + version "7.0.0-rc.3" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.0.0-rc.3.tgz#3267085de2d9b8779bde79052ee5f7070d99a5ab" dependencies: - "@babel/types" "7.0.0-rc.2" + "@babel/types" "7.0.0-rc.3" jsesc "^2.5.1" lodash "^4.17.10" source-map "^0.5.0" trim-right "^1.0.1" -"@babel/helper-function-name@7.0.0-rc.2": - version "7.0.0-rc.2" - resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.0.0-rc.2.tgz#ad7bb9df383c5f53e4bf38c0fe0c7f93e6a27729" +"@babel/helper-annotate-as-pure@7.0.0-rc.3": + version "7.0.0-rc.3" + resolved "https://registry.yarnpkg.com/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.0.0-rc.3.tgz#0251d48d2f6d175ffdd9601fc032e3bdaa4e580a" + dependencies: + "@babel/types" "7.0.0-rc.3" + +"@babel/helper-builder-binary-assignment-operator-visitor@7.0.0-rc.3": + version "7.0.0-rc.3" + resolved "https://registry.yarnpkg.com/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.0.0-rc.3.tgz#2df11e360f20fb636383f7edd37a439d81c3e694" + dependencies: + "@babel/helper-explode-assignable-expression" "7.0.0-rc.3" + "@babel/types" "7.0.0-rc.3" + +"@babel/helper-call-delegate@7.0.0-rc.3": + version "7.0.0-rc.3" + resolved "https://registry.yarnpkg.com/@babel/helper-call-delegate/-/helper-call-delegate-7.0.0-rc.3.tgz#6a96c63e5a72138f1cfcd9c4bfa99cdd1f650f19" + dependencies: + "@babel/helper-hoist-variables" "7.0.0-rc.3" + "@babel/traverse" "7.0.0-rc.3" + "@babel/types" "7.0.0-rc.3" + +"@babel/helper-define-map@7.0.0-rc.3": + version "7.0.0-rc.3" + resolved "https://registry.yarnpkg.com/@babel/helper-define-map/-/helper-define-map-7.0.0-rc.3.tgz#fea0abc72c8728887873770d3939dc8bf49c3e92" + dependencies: + "@babel/helper-function-name" "7.0.0-rc.3" + "@babel/types" "7.0.0-rc.3" + lodash "^4.17.10" + +"@babel/helper-explode-assignable-expression@7.0.0-rc.3": + version "7.0.0-rc.3" + resolved "https://registry.yarnpkg.com/@babel/helper-explode-assignable-expression/-/helper-explode-assignable-expression-7.0.0-rc.3.tgz#987b3295b68e380acdab6ff5923f9cad8764c74c" + dependencies: + "@babel/traverse" "7.0.0-rc.3" + "@babel/types" "7.0.0-rc.3" + +"@babel/helper-function-name@7.0.0-rc.3": + version "7.0.0-rc.3" + resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.0.0-rc.3.tgz#ddfb3793fe6ca13be7161afa045971b8e82f96e8" + dependencies: + "@babel/helper-get-function-arity" "7.0.0-rc.3" + "@babel/template" "7.0.0-rc.3" + "@babel/types" "7.0.0-rc.3" + +"@babel/helper-get-function-arity@7.0.0-rc.3": + version "7.0.0-rc.3" + resolved "https://registry.yarnpkg.com/@babel/helper-get-function-arity/-/helper-get-function-arity-7.0.0-rc.3.tgz#b9fb083977e1639aac6c9c06b2de7b849aa6fea5" dependencies: - "@babel/helper-get-function-arity" "7.0.0-rc.2" - "@babel/template" "7.0.0-rc.2" - "@babel/types" "7.0.0-rc.2" + "@babel/types" "7.0.0-rc.3" -"@babel/helper-get-function-arity@7.0.0-rc.2": - version "7.0.0-rc.2" - resolved "https://registry.yarnpkg.com/@babel/helper-get-function-arity/-/helper-get-function-arity-7.0.0-rc.2.tgz#323cb82e2d805b40c0c36be1dfcb8ffcbd0434f3" +"@babel/helper-hoist-variables@7.0.0-rc.3": + version "7.0.0-rc.3" + resolved "https://registry.yarnpkg.com/@babel/helper-hoist-variables/-/helper-hoist-variables-7.0.0-rc.3.tgz#cea012ebe83116623609311858a11dd8adc10dfa" dependencies: - "@babel/types" "7.0.0-rc.2" + "@babel/types" "7.0.0-rc.3" -"@babel/helper-module-imports@7.0.0-rc.2": - version "7.0.0-rc.2" - resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.0.0-rc.2.tgz#982f30e71431d3ea7e00b1b48da774c60470a21d" +"@babel/helper-member-expression-to-functions@7.0.0-rc.3": + version "7.0.0-rc.3" + resolved "https://registry.yarnpkg.com/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.0.0-rc.3.tgz#65a455f0d35e40ee205a89e7c991472e85ffe09a" dependencies: - "@babel/types" "7.0.0-rc.2" + "@babel/types" "7.0.0-rc.3" -"@babel/helper-module-transforms@7.0.0-rc.2": - version "7.0.0-rc.2" - resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.0.0-rc.2.tgz#d9b2697790875a014282973ed74343bb3ad3c7c5" +"@babel/helper-module-imports@7.0.0-rc.3": + version "7.0.0-rc.3" + resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.0.0-rc.3.tgz#09207a1d2c528abddd74c259af1836bf34194ff5" dependencies: - "@babel/helper-module-imports" "7.0.0-rc.2" - "@babel/helper-simple-access" "7.0.0-rc.2" - "@babel/helper-split-export-declaration" "7.0.0-rc.2" - "@babel/template" "7.0.0-rc.2" - "@babel/types" "7.0.0-rc.2" + "@babel/types" "7.0.0-rc.3" + +"@babel/helper-module-transforms@7.0.0-rc.3": + version "7.0.0-rc.3" + resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.0.0-rc.3.tgz#dc92b603f42d3567b2d091241569bbf420221cd9" + dependencies: + "@babel/helper-module-imports" "7.0.0-rc.3" + "@babel/helper-simple-access" "7.0.0-rc.3" + "@babel/helper-split-export-declaration" "7.0.0-rc.3" + "@babel/template" "7.0.0-rc.3" + "@babel/types" "7.0.0-rc.3" lodash "^4.17.10" -"@babel/helper-plugin-utils@7.0.0-rc.2": - version "7.0.0-rc.2" - resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.0.0-rc.2.tgz#95bc3225bf6aeda5a5ebc90af2546b5b9317c0b4" +"@babel/helper-optimise-call-expression@7.0.0-rc.3": + version "7.0.0-rc.3" + resolved "https://registry.yarnpkg.com/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.0.0-rc.3.tgz#6a594f922c73c3266f5c59c3374b0e176aefd8a5" + dependencies: + "@babel/types" "7.0.0-rc.3" + +"@babel/helper-plugin-utils@7.0.0-rc.3": + version "7.0.0-rc.3" + resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.0.0-rc.3.tgz#f68392896f4f3b90bdf7e72e5cc7127cdd5441fd" -"@babel/helper-simple-access@7.0.0-rc.2": - version "7.0.0-rc.2" - resolved "https://registry.yarnpkg.com/@babel/helper-simple-access/-/helper-simple-access-7.0.0-rc.2.tgz#34043948cda9e6b883527bb827711bd427fea914" +"@babel/helper-regex@7.0.0-rc.3": + version "7.0.0-rc.3" + resolved "https://registry.yarnpkg.com/@babel/helper-regex/-/helper-regex-7.0.0-rc.3.tgz#1f2e11de94fc2481fc6932c07994444f6b627854" + dependencies: + lodash "^4.17.10" + +"@babel/helper-remap-async-to-generator@7.0.0-rc.3": + version "7.0.0-rc.3" + resolved "https://registry.yarnpkg.com/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.0.0-rc.3.tgz#085d673b34b9e57a15325ec0b32dc0bb40836b39" + dependencies: + "@babel/helper-annotate-as-pure" "7.0.0-rc.3" + "@babel/helper-wrap-function" "7.0.0-rc.3" + "@babel/template" "7.0.0-rc.3" + "@babel/traverse" "7.0.0-rc.3" + "@babel/types" "7.0.0-rc.3" + +"@babel/helper-replace-supers@7.0.0-rc.3": + version "7.0.0-rc.3" + resolved "https://registry.yarnpkg.com/@babel/helper-replace-supers/-/helper-replace-supers-7.0.0-rc.3.tgz#0172cdf556093b8e0245041bd2d76a12af756bf8" dependencies: - "@babel/template" "7.0.0-rc.2" - "@babel/types" "7.0.0-rc.2" + "@babel/helper-member-expression-to-functions" "7.0.0-rc.3" + "@babel/helper-optimise-call-expression" "7.0.0-rc.3" + "@babel/traverse" "7.0.0-rc.3" + "@babel/types" "7.0.0-rc.3" + +"@babel/helper-simple-access@7.0.0-rc.3": + version "7.0.0-rc.3" + resolved "https://registry.yarnpkg.com/@babel/helper-simple-access/-/helper-simple-access-7.0.0-rc.3.tgz#c5a316c0838785eab896b7578ee05b1ac8193f2b" + dependencies: + "@babel/template" "7.0.0-rc.3" + "@babel/types" "7.0.0-rc.3" -"@babel/helper-split-export-declaration@7.0.0-rc.2": - version "7.0.0-rc.2" - resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.0.0-rc.2.tgz#726b2dec4e46baeab32db67caa6e88b6521464f8" +"@babel/helper-split-export-declaration@7.0.0-rc.3": + version "7.0.0-rc.3" + resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.0.0-rc.3.tgz#42ca01340ddb68ab471f81e6ff2c6270dbdbd113" dependencies: - "@babel/types" "7.0.0-rc.2" + "@babel/types" "7.0.0-rc.3" -"@babel/helpers@7.0.0-rc.2": - version "7.0.0-rc.2" - resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.0.0-rc.2.tgz#e21f54451824f55b4f5022c6e9d6fa7df65e8746" +"@babel/helper-wrap-function@7.0.0-rc.3": + version "7.0.0-rc.3" + resolved "https://registry.yarnpkg.com/@babel/helper-wrap-function/-/helper-wrap-function-7.0.0-rc.3.tgz#3abcc29bc93c46d61125f994d8667e297f7081fa" + dependencies: + "@babel/helper-function-name" "7.0.0-rc.3" + "@babel/template" "7.0.0-rc.3" + "@babel/traverse" "7.0.0-rc.3" + "@babel/types" "7.0.0-rc.3" + +"@babel/helpers@7.0.0-rc.3": + version "7.0.0-rc.3" + resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.0.0-rc.3.tgz#321c6b575d4d2c0e7b9f33ea085b8ecaa1965b24" dependencies: - "@babel/template" "7.0.0-rc.2" - "@babel/traverse" "7.0.0-rc.2" - "@babel/types" "7.0.0-rc.2" + "@babel/template" "7.0.0-rc.3" + "@babel/traverse" "7.0.0-rc.3" + "@babel/types" "7.0.0-rc.3" -"@babel/highlight@7.0.0-rc.2": - version "7.0.0-rc.2" - resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.0.0-rc.2.tgz#0af688a69e3709d9cf392e1837cda18c08d34d4f" +"@babel/highlight@7.0.0-rc.3": + version "7.0.0-rc.3" + resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.0.0-rc.3.tgz#c2ee83f8e5c0c387279a8c48e06fef2e32027004" dependencies: chalk "^2.0.0" esutils "^2.0.2" js-tokens "^4.0.0" -"@babel/parser@7.0.0-rc.2": - version "7.0.0-rc.2" - resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.0.0-rc.2.tgz#a98c01af5834e71d48a5108e3aeeee333cdf26c4" +"@babel/parser@7.0.0-rc.3": + version "7.0.0-rc.3" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.0.0-rc.3.tgz#859d7b60ef6b939aab5f6d4f4bffbb7bafdc418b" + +"@babel/plugin-proposal-async-generator-functions@7.0.0-rc.3": + version "7.0.0-rc.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.0.0-rc.3.tgz#22c8a89c8e660c3ff42cd5f5c5921d192a92e190" + dependencies: + "@babel/helper-plugin-utils" "7.0.0-rc.3" + "@babel/helper-remap-async-to-generator" "7.0.0-rc.3" + "@babel/plugin-syntax-async-generators" "7.0.0-rc.3" + +"@babel/plugin-proposal-json-strings@7.0.0-rc.3": + version "7.0.0-rc.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-json-strings/-/plugin-proposal-json-strings-7.0.0-rc.3.tgz#0b1d313981d6f4dca6b1419ee0b61d57dc368308" + dependencies: + "@babel/helper-plugin-utils" "7.0.0-rc.3" + "@babel/plugin-syntax-json-strings" "7.0.0-rc.3" + +"@babel/plugin-proposal-object-rest-spread@7.0.0-rc.3": + version "7.0.0-rc.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.0.0-rc.3.tgz#c51a93b86d59eb35ea4f123c5f18f0953a25d761" + dependencies: + "@babel/helper-plugin-utils" "7.0.0-rc.3" + "@babel/plugin-syntax-object-rest-spread" "7.0.0-rc.3" + +"@babel/plugin-proposal-optional-catch-binding@7.0.0-rc.3": + version "7.0.0-rc.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-optional-catch-binding/-/plugin-proposal-optional-catch-binding-7.0.0-rc.3.tgz#47f81c6549661c99dc74c3f5161ae90b76b6ca66" + dependencies: + "@babel/helper-plugin-utils" "7.0.0-rc.3" + "@babel/plugin-syntax-optional-catch-binding" "7.0.0-rc.3" + +"@babel/plugin-proposal-unicode-property-regex@7.0.0-rc.3": + version "7.0.0-rc.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.0.0-rc.3.tgz#27a6e328ab018dc0128fcbde9cfff0e67d87da94" + dependencies: + "@babel/helper-plugin-utils" "7.0.0-rc.3" + "@babel/helper-regex" "7.0.0-rc.3" + regexpu-core "^4.2.0" + +"@babel/plugin-syntax-async-generators@7.0.0-rc.3": + version "7.0.0-rc.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.0.0-rc.3.tgz#7d768f8bb18597781ade989c87519181b69764bf" + dependencies: + "@babel/helper-plugin-utils" "7.0.0-rc.3" + +"@babel/plugin-syntax-json-strings@7.0.0-rc.3": + version "7.0.0-rc.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.0.0-rc.3.tgz#5dc7b1f713de140451446a6c36739c15de857a95" + dependencies: + "@babel/helper-plugin-utils" "7.0.0-rc.3" + +"@babel/plugin-syntax-object-rest-spread@7.0.0-rc.3": + version "7.0.0-rc.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.0.0-rc.3.tgz#4458bb8b61849a81de4a90f98f4cb4f87d1d95c5" + dependencies: + "@babel/helper-plugin-utils" "7.0.0-rc.3" + +"@babel/plugin-syntax-optional-catch-binding@7.0.0-rc.3": + version "7.0.0-rc.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.0.0-rc.3.tgz#5fe5ed7c95a98e2e0b8fc38c4c64904045580ae3" + dependencies: + "@babel/helper-plugin-utils" "7.0.0-rc.3" + +"@babel/plugin-transform-arrow-functions@7.0.0-rc.3": + version "7.0.0-rc.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.0.0-rc.3.tgz#e6c22148d0c2873522a2db8e21ba39d9db188d74" + dependencies: + "@babel/helper-plugin-utils" "7.0.0-rc.3" + +"@babel/plugin-transform-async-to-generator@7.0.0-rc.3": + version "7.0.0-rc.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.0.0-rc.3.tgz#df63901f6071324f1b2ac5b5b36fc79108772a98" + dependencies: + "@babel/helper-module-imports" "7.0.0-rc.3" + "@babel/helper-plugin-utils" "7.0.0-rc.3" + "@babel/helper-remap-async-to-generator" "7.0.0-rc.3" + +"@babel/plugin-transform-block-scoped-functions@7.0.0-rc.3": + version "7.0.0-rc.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.0.0-rc.3.tgz#f3a6df435012bb5fc8cc77b17c670c32dcc8a350" + dependencies: + "@babel/helper-plugin-utils" "7.0.0-rc.3" + +"@babel/plugin-transform-block-scoping@7.0.0-rc.3": + version "7.0.0-rc.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.0.0-rc.3.tgz#65ea3edc061b09375218ae86edf6e0897769abc0" + dependencies: + "@babel/helper-plugin-utils" "7.0.0-rc.3" + lodash "^4.17.10" + +"@babel/plugin-transform-classes@7.0.0-rc.3": + version "7.0.0-rc.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-classes/-/plugin-transform-classes-7.0.0-rc.3.tgz#4bc40e0ab871169e72a847a1d031fef8c34f3fb8" + dependencies: + "@babel/helper-annotate-as-pure" "7.0.0-rc.3" + "@babel/helper-define-map" "7.0.0-rc.3" + "@babel/helper-function-name" "7.0.0-rc.3" + "@babel/helper-optimise-call-expression" "7.0.0-rc.3" + "@babel/helper-plugin-utils" "7.0.0-rc.3" + "@babel/helper-replace-supers" "7.0.0-rc.3" + "@babel/helper-split-export-declaration" "7.0.0-rc.3" + globals "^11.1.0" + +"@babel/plugin-transform-computed-properties@7.0.0-rc.3": + version "7.0.0-rc.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.0.0-rc.3.tgz#f8349aeca43c1062b2d4527a2aab0c892bc94deb" + dependencies: + "@babel/helper-plugin-utils" "7.0.0-rc.3" + +"@babel/plugin-transform-destructuring@7.0.0-rc.3": + version "7.0.0-rc.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.0.0-rc.3.tgz#5924f10e29a1d2017f5d970c7769d2639bf16bf1" + dependencies: + "@babel/helper-plugin-utils" "7.0.0-rc.3" + +"@babel/plugin-transform-dotall-regex@7.0.0-rc.3": + version "7.0.0-rc.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.0.0-rc.3.tgz#7c7acf5cc4279831eabf3817daa85f7862e647cd" + dependencies: + "@babel/helper-plugin-utils" "7.0.0-rc.3" + "@babel/helper-regex" "7.0.0-rc.3" + regexpu-core "^4.1.3" + +"@babel/plugin-transform-duplicate-keys@7.0.0-rc.3": + version "7.0.0-rc.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.0.0-rc.3.tgz#39bc3d271d392d8b2c34a9a9dab66f4b68641c3f" + dependencies: + "@babel/helper-plugin-utils" "7.0.0-rc.3" -"@babel/plugin-transform-modules-amd@^7.0.0-rc.2": - version "7.0.0-rc.2" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.0.0-rc.2.tgz#f3c37e6de732c8ac07df01ea164cf976409de469" +"@babel/plugin-transform-exponentiation-operator@7.0.0-rc.3": + version "7.0.0-rc.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.0.0-rc.3.tgz#494cc71920f8e31e02f99548c40935cf699f5be5" dependencies: - "@babel/helper-module-transforms" "7.0.0-rc.2" - "@babel/helper-plugin-utils" "7.0.0-rc.2" + "@babel/helper-builder-binary-assignment-operator-visitor" "7.0.0-rc.3" + "@babel/helper-plugin-utils" "7.0.0-rc.3" -"@babel/template@7.0.0-rc.2": - version "7.0.0-rc.2" - resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.0.0-rc.2.tgz#53f6be6c1336ddc7744625c9bdca9d10be5d5d72" +"@babel/plugin-transform-for-of@7.0.0-rc.3": + version "7.0.0-rc.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.0.0-rc.3.tgz#e4444180fe6f4a2a5244e9398cf8cfd3b7b9b1ae" dependencies: - "@babel/code-frame" "7.0.0-rc.2" - "@babel/parser" "7.0.0-rc.2" - "@babel/types" "7.0.0-rc.2" + "@babel/helper-plugin-utils" "7.0.0-rc.3" -"@babel/traverse@7.0.0-rc.2": - version "7.0.0-rc.2" - resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.0.0-rc.2.tgz#6e54ebe82aa1b3b3cf5ec05594bc14d7c59c9766" +"@babel/plugin-transform-function-name@7.0.0-rc.3": + version "7.0.0-rc.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.0.0-rc.3.tgz#d947d63e9d50e900885cfe86df7e5d3f772cf66e" dependencies: - "@babel/code-frame" "7.0.0-rc.2" - "@babel/generator" "7.0.0-rc.2" - "@babel/helper-function-name" "7.0.0-rc.2" - "@babel/helper-split-export-declaration" "7.0.0-rc.2" - "@babel/parser" "7.0.0-rc.2" - "@babel/types" "7.0.0-rc.2" + "@babel/helper-function-name" "7.0.0-rc.3" + "@babel/helper-plugin-utils" "7.0.0-rc.3" + +"@babel/plugin-transform-literals@7.0.0-rc.3": + version "7.0.0-rc.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-literals/-/plugin-transform-literals-7.0.0-rc.3.tgz#ec4df668a5065935aa80327ffc8265570361f8de" + dependencies: + "@babel/helper-plugin-utils" "7.0.0-rc.3" + +"@babel/plugin-transform-modules-amd@7.0.0-rc.3", "@babel/plugin-transform-modules-amd@^7.0.0-rc.3": + version "7.0.0-rc.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.0.0-rc.3.tgz#1b4188bfaca1edccfb2787db396522ac7055a095" + dependencies: + "@babel/helper-module-transforms" "7.0.0-rc.3" + "@babel/helper-plugin-utils" "7.0.0-rc.3" + +"@babel/plugin-transform-modules-commonjs@7.0.0-rc.3": + version "7.0.0-rc.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.0.0-rc.3.tgz#11792a4314820bb5f149e3f5c7eed10b342220ca" + dependencies: + "@babel/helper-module-transforms" "7.0.0-rc.3" + "@babel/helper-plugin-utils" "7.0.0-rc.3" + "@babel/helper-simple-access" "7.0.0-rc.3" + +"@babel/plugin-transform-modules-systemjs@7.0.0-rc.3": + version "7.0.0-rc.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.0.0-rc.3.tgz#36a9ca740fcf9989e02f0341a02b438cd8e9528e" + dependencies: + "@babel/helper-hoist-variables" "7.0.0-rc.3" + "@babel/helper-plugin-utils" "7.0.0-rc.3" + +"@babel/plugin-transform-modules-umd@7.0.0-rc.3": + version "7.0.0-rc.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.0.0-rc.3.tgz#35d04236716708b620dfca12f009b961b531f1d9" + dependencies: + "@babel/helper-module-transforms" "7.0.0-rc.3" + "@babel/helper-plugin-utils" "7.0.0-rc.3" + +"@babel/plugin-transform-new-target@7.0.0-rc.3": + version "7.0.0-rc.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.0.0-rc.3.tgz#5d107e54bc636ebb1af2a026f45fecba47b3e4f0" + dependencies: + "@babel/helper-plugin-utils" "7.0.0-rc.3" + +"@babel/plugin-transform-object-super@7.0.0-rc.3": + version "7.0.0-rc.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.0.0-rc.3.tgz#3c938c9e97df14c3d340d4be90087ee0c71eb871" + dependencies: + "@babel/helper-plugin-utils" "7.0.0-rc.3" + "@babel/helper-replace-supers" "7.0.0-rc.3" + +"@babel/plugin-transform-parameters@7.0.0-rc.3": + version "7.0.0-rc.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.0.0-rc.3.tgz#a4a6a013c98376f521f231e8710316903e1a00e2" + dependencies: + "@babel/helper-call-delegate" "7.0.0-rc.3" + "@babel/helper-get-function-arity" "7.0.0-rc.3" + "@babel/helper-plugin-utils" "7.0.0-rc.3" + +"@babel/plugin-transform-regenerator@7.0.0-rc.3": + version "7.0.0-rc.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.0.0-rc.3.tgz#d28f5dae6a2cbb3748abf4b8b89678ea3b1ff029" + dependencies: + regenerator-transform "^0.13.3" + +"@babel/plugin-transform-shorthand-properties@7.0.0-rc.3": + version "7.0.0-rc.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.0.0-rc.3.tgz#84c3529e15e0e285b446448ac45872886ea914c1" + dependencies: + "@babel/helper-plugin-utils" "7.0.0-rc.3" + +"@babel/plugin-transform-spread@7.0.0-rc.3": + version "7.0.0-rc.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-spread/-/plugin-transform-spread-7.0.0-rc.3.tgz#5479b400ec2401327af90d881c04ce450589d402" + dependencies: + "@babel/helper-plugin-utils" "7.0.0-rc.3" + +"@babel/plugin-transform-sticky-regex@7.0.0-rc.3": + version "7.0.0-rc.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.0.0-rc.3.tgz#d1c2d8cadb2783ee774d04e8504d05cf2b20b1b8" + dependencies: + "@babel/helper-plugin-utils" "7.0.0-rc.3" + "@babel/helper-regex" "7.0.0-rc.3" + +"@babel/plugin-transform-template-literals@7.0.0-rc.3": + version "7.0.0-rc.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.0.0-rc.3.tgz#da10dedd6c51e9e4d35d71e6abe6cc436e4de029" + dependencies: + "@babel/helper-annotate-as-pure" "7.0.0-rc.3" + "@babel/helper-plugin-utils" "7.0.0-rc.3" + +"@babel/plugin-transform-typeof-symbol@7.0.0-rc.3": + version "7.0.0-rc.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.0.0-rc.3.tgz#6ce43fa10a4a2651c35bd4913cefd238b3610e39" + dependencies: + "@babel/helper-plugin-utils" "7.0.0-rc.3" + +"@babel/plugin-transform-unicode-regex@7.0.0-rc.3": + version "7.0.0-rc.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.0.0-rc.3.tgz#91764a332c1c1c5c9265668ef3004432006ce5c5" + dependencies: + "@babel/helper-plugin-utils" "7.0.0-rc.3" + "@babel/helper-regex" "7.0.0-rc.3" + regexpu-core "^4.1.3" + +"@babel/preset-env@^7.0.0-rc.3": + version "7.0.0-rc.3" + resolved "https://registry.yarnpkg.com/@babel/preset-env/-/preset-env-7.0.0-rc.3.tgz#b05748a412614bca9f754266610b6cba8f49af10" + dependencies: + "@babel/helper-module-imports" "7.0.0-rc.3" + "@babel/helper-plugin-utils" "7.0.0-rc.3" + "@babel/plugin-proposal-async-generator-functions" "7.0.0-rc.3" + "@babel/plugin-proposal-json-strings" "7.0.0-rc.3" + "@babel/plugin-proposal-object-rest-spread" "7.0.0-rc.3" + "@babel/plugin-proposal-optional-catch-binding" "7.0.0-rc.3" + "@babel/plugin-proposal-unicode-property-regex" "7.0.0-rc.3" + "@babel/plugin-syntax-async-generators" "7.0.0-rc.3" + "@babel/plugin-syntax-object-rest-spread" "7.0.0-rc.3" + "@babel/plugin-syntax-optional-catch-binding" "7.0.0-rc.3" + "@babel/plugin-transform-arrow-functions" "7.0.0-rc.3" + "@babel/plugin-transform-async-to-generator" "7.0.0-rc.3" + "@babel/plugin-transform-block-scoped-functions" "7.0.0-rc.3" + "@babel/plugin-transform-block-scoping" "7.0.0-rc.3" + "@babel/plugin-transform-classes" "7.0.0-rc.3" + "@babel/plugin-transform-computed-properties" "7.0.0-rc.3" + "@babel/plugin-transform-destructuring" "7.0.0-rc.3" + "@babel/plugin-transform-dotall-regex" "7.0.0-rc.3" + "@babel/plugin-transform-duplicate-keys" "7.0.0-rc.3" + "@babel/plugin-transform-exponentiation-operator" "7.0.0-rc.3" + "@babel/plugin-transform-for-of" "7.0.0-rc.3" + "@babel/plugin-transform-function-name" "7.0.0-rc.3" + "@babel/plugin-transform-literals" "7.0.0-rc.3" + "@babel/plugin-transform-modules-amd" "7.0.0-rc.3" + "@babel/plugin-transform-modules-commonjs" "7.0.0-rc.3" + "@babel/plugin-transform-modules-systemjs" "7.0.0-rc.3" + "@babel/plugin-transform-modules-umd" "7.0.0-rc.3" + "@babel/plugin-transform-new-target" "7.0.0-rc.3" + "@babel/plugin-transform-object-super" "7.0.0-rc.3" + "@babel/plugin-transform-parameters" "7.0.0-rc.3" + "@babel/plugin-transform-regenerator" "7.0.0-rc.3" + "@babel/plugin-transform-shorthand-properties" "7.0.0-rc.3" + "@babel/plugin-transform-spread" "7.0.0-rc.3" + "@babel/plugin-transform-sticky-regex" "7.0.0-rc.3" + "@babel/plugin-transform-template-literals" "7.0.0-rc.3" + "@babel/plugin-transform-typeof-symbol" "7.0.0-rc.3" + "@babel/plugin-transform-unicode-regex" "7.0.0-rc.3" + browserslist "^4.1.0" + invariant "^2.2.2" + js-levenshtein "^1.1.3" + semver "^5.3.0" + +"@babel/template@7.0.0-rc.3": + version "7.0.0-rc.3" + resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.0.0-rc.3.tgz#2ba7d00f86744762632d06a0ffb0494f8443581f" + dependencies: + "@babel/code-frame" "7.0.0-rc.3" + "@babel/parser" "7.0.0-rc.3" + "@babel/types" "7.0.0-rc.3" + +"@babel/traverse@7.0.0-rc.3": + version "7.0.0-rc.3" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.0.0-rc.3.tgz#bcf659e46d24244ab51379c849093f8c4e54d239" + dependencies: + "@babel/code-frame" "7.0.0-rc.3" + "@babel/generator" "7.0.0-rc.3" + "@babel/helper-function-name" "7.0.0-rc.3" + "@babel/helper-split-export-declaration" "7.0.0-rc.3" + "@babel/parser" "7.0.0-rc.3" + "@babel/types" "7.0.0-rc.3" debug "^3.1.0" globals "^11.1.0" lodash "^4.17.10" -"@babel/types@7.0.0-rc.2": - version "7.0.0-rc.2" - resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.0.0-rc.2.tgz#8e025b78764cee8751823e308558a3ca144ebd9d" +"@babel/types@7.0.0-rc.3": + version "7.0.0-rc.3" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.0.0-rc.3.tgz#877ebc543b139f4a1e4c9bd8849c25ab9aea8f41" dependencies: esutils "^2.0.2" lodash "^4.17.10" @@ -148,6 +524,18 @@ ansi-styles@^3.2.1: dependencies: color-convert "^1.9.0" +browserslist@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.1.0.tgz#81cbb8e52dfa09918f93c6e051d779cb7360785d" + dependencies: + caniuse-lite "^1.0.30000878" + electron-to-chromium "^1.3.61" + node-releases "^1.0.0-alpha.11" + +caniuse-lite@^1.0.30000878: + version "1.0.30000878" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30000878.tgz#c644c39588dd42d3498e952234c372e5a40a4123" + chalk@^2.0.0: version "2.4.1" resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.1.tgz#18c49ab16a037b6eb0152cc83e3471338215b66e" @@ -180,6 +568,10 @@ debug@^3.1.0: dependencies: ms "2.0.0" +electron-to-chromium@^1.3.61: + version "1.3.61" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.61.tgz#a8ac295b28d0f03d85e37326fd16b6b6b17a1795" + escape-string-regexp@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" @@ -196,7 +588,17 @@ has-flag@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd" -js-tokens@^4.0.0: +invariant@^2.2.2: + version "2.2.4" + resolved "https://registry.yarnpkg.com/invariant/-/invariant-2.2.4.tgz#610f3c92c9359ce1db616e538008d23ff35158e6" + dependencies: + loose-envify "^1.0.0" + +js-levenshtein@^1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/js-levenshtein/-/js-levenshtein-1.1.3.tgz#3ef627df48ec8cf24bacf05c0f184ff30ef413c5" + +"js-tokens@^3.0.0 || ^4.0.0", js-tokens@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" @@ -204,6 +606,10 @@ jsesc@^2.5.1: version "2.5.1" resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-2.5.1.tgz#e421a2a8e20d6b0819df28908f782526b96dd1fe" +jsesc@~0.5.0: + version "0.5.0" + resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-0.5.0.tgz#e7dee66e35d6fc16f710fe91d5cf69f70f08911d" + json5@^0.5.0: version "0.5.1" resolved "https://registry.yarnpkg.com/json5/-/json5-0.5.1.tgz#1eade7acc012034ad84e2396767ead9fa5495821" @@ -212,20 +618,77 @@ lodash@^4.17.10: version "4.17.10" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.10.tgz#1b7793cf7259ea38fb3661d4d38b3260af8ae4e7" +loose-envify@^1.0.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.4.0.tgz#71ee51fa7be4caec1a63839f7e682d8132d30caf" + dependencies: + js-tokens "^3.0.0 || ^4.0.0" + ms@2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" +node-releases@^1.0.0-alpha.11: + version "1.0.0-alpha.11" + resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-1.0.0-alpha.11.tgz#73c810acc2e5b741a17ddfbb39dfca9ab9359d8a" + dependencies: + semver "^5.3.0" + path-parse@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.5.tgz#3c1adf871ea9cd6c9431b6ea2bd74a0ff055c4c1" +private@^0.1.6: + version "0.1.8" + resolved "https://registry.yarnpkg.com/private/-/private-0.1.8.tgz#2381edb3689f7a53d653190060fcf822d2f368ff" + +regenerate-unicode-properties@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/regenerate-unicode-properties/-/regenerate-unicode-properties-7.0.0.tgz#107405afcc4a190ec5ed450ecaa00ed0cafa7a4c" + dependencies: + regenerate "^1.4.0" + +regenerate@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/regenerate/-/regenerate-1.4.0.tgz#4a856ec4b56e4077c557589cae85e7a4c8869a11" + +regenerator-transform@^0.13.3: + version "0.13.3" + resolved "https://registry.yarnpkg.com/regenerator-transform/-/regenerator-transform-0.13.3.tgz#264bd9ff38a8ce24b06e0636496b2c856b57bcbb" + dependencies: + private "^0.1.6" + +regexpu-core@^4.1.3, regexpu-core@^4.2.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/regexpu-core/-/regexpu-core-4.2.0.tgz#a3744fa03806cffe146dea4421a3e73bdcc47b1d" + dependencies: + regenerate "^1.4.0" + regenerate-unicode-properties "^7.0.0" + regjsgen "^0.4.0" + regjsparser "^0.3.0" + unicode-match-property-ecmascript "^1.0.4" + unicode-match-property-value-ecmascript "^1.0.2" + +regjsgen@^0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/regjsgen/-/regjsgen-0.4.0.tgz#c1eb4c89a209263f8717c782591523913ede2561" + +regjsparser@^0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/regjsparser/-/regjsparser-0.3.0.tgz#3c326da7fcfd69fa0d332575a41c8c0cdf588c96" + dependencies: + jsesc "~0.5.0" + resolve@^1.3.2: version "1.7.1" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.7.1.tgz#aadd656374fd298aee895bc026b8297418677fd3" dependencies: path-parse "^1.0.5" +semver@^5.3.0: + version "5.5.1" + resolved "https://registry.yarnpkg.com/semver/-/semver-5.5.1.tgz#7dfdd8814bdb7cabc7be0fb1d734cfb66c940477" + semver@^5.4.1: version "5.5.0" resolved "https://registry.yarnpkg.com/semver/-/semver-5.5.0.tgz#dc4bbc7a6ca9d916dee5d43516f0092b58f7b8ab" @@ -247,3 +710,22 @@ to-fast-properties@^2.0.0: trim-right@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/trim-right/-/trim-right-1.0.1.tgz#cb2e1203067e0c8de1f614094b9fe45704ea6003" + +unicode-canonical-property-names-ecmascript@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-1.0.4.tgz#2619800c4c825800efdd8343af7dd9933cbe2818" + +unicode-match-property-ecmascript@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/unicode-match-property-ecmascript/-/unicode-match-property-ecmascript-1.0.4.tgz#8ed2a32569961bce9227d09cd3ffbb8fed5f020c" + dependencies: + unicode-canonical-property-names-ecmascript "^1.0.4" + unicode-property-aliases-ecmascript "^1.0.4" + +unicode-match-property-value-ecmascript@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/unicode-match-property-value-ecmascript/-/unicode-match-property-value-ecmascript-1.0.2.tgz#9f1dc76926d6ccf452310564fd834ace059663d4" + +unicode-property-aliases-ecmascript@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/unicode-property-aliases-ecmascript/-/unicode-property-aliases-ecmascript-1.0.4.tgz#5a533f31b4317ea76f17d807fa0d116546111dd0" From ae3476f06e089090f9ab6ac211b1ff6f4bd6451a Mon Sep 17 00:00:00 2001 From: Globegitter Date: Mon, 27 Aug 2018 09:19:05 +0200 Subject: [PATCH 20/53] Run buildifier. --- examples/devserver/src/BUILD.bazel | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/examples/devserver/src/BUILD.bazel b/examples/devserver/src/BUILD.bazel index 24d17d43ff..5640d3fce3 100644 --- a/examples/devserver/src/BUILD.bazel +++ b/examples/devserver/src/BUILD.bazel @@ -15,16 +15,16 @@ js_library( js_library( name = "test", srcs = ["test.js"], + # Note: This rc file will only be found by babel when run in the devserver_example workspace + # but not in the top-level one, due to how bazel currently handels pathing + data = [ + "//:.browserslistrc", + ], deps = [ ":module", "//src/dir:module", "//src/my_lib_folder:my_lib", ], - # Note: This rc file will only be found by babel when run in the devserver_example workspace - # but not in the top-level one, due to how bazel currently handels pathing - data = [ - "//:.browserslistrc", - ] ) ts_devserver( @@ -44,8 +44,8 @@ rollup_bundle( # Note: This will only work now when called from the top-level workspace, otherwise it would # just be src/test.js entry_point = "external/devserver_example/src/test.js", + node_modules = "@devserver_example_yarn_install//:node_modules", deps = [ ":test", ], - node_modules = "@devserver_example_yarn_install//:node_modules" ) From 4d4227b3ffa590e9b60b9d0337cf0048f78e8ca2 Mon Sep 17 00:00:00 2001 From: Globegitter Date: Mon, 27 Aug 2018 10:46:19 +0200 Subject: [PATCH 21/53] Combine es5 and umd conversion. --- internal/js_library/v2/babel.rc.js | 52 +++++++++++---------------- internal/js_library/v2/js_library.bzl | 40 +++++++-------------- internal/js_library/v2/package.json | 1 - internal/js_library/v2/yarn.lock | 2 +- 4 files changed, 35 insertions(+), 60 deletions(-) diff --git a/internal/js_library/v2/babel.rc.js b/internal/js_library/v2/babel.rc.js index 400e06a2f2..95e6cea18c 100644 --- a/internal/js_library/v2/babel.rc.js +++ b/internal/js_library/v2/babel.rc.js @@ -1,36 +1,26 @@ -var amd_plugin = require('@babel/plugin-transform-modules-amd') var env_preset = require('@babel/preset-env') -const babelConfig = {}; +const babelConfig = { + moduleIds: true, + getModuleId(name) { + const moduleName = 'TMPL_module_name'; + if (moduleName) { + return moduleName; + } -if (process.env.BAZEL_ES5_TARGET) { - babelConfig.presets = [env_preset]; -} - -if (process.env.BAZEL_AMD_TARGET) { - const amdConfig = { - moduleIds: true, - getModuleId(name) { - const moduleName = 'TMPL_module_name'; - if (moduleName) { - return moduleName; - } - - const path = require('path'); - const process = require('process'); - const binDirPath = 'TMPL_bin_dir_path'; - // TODO: Add workspace name to the id - moduleId = path.relative(process.cwd(), name); - if (moduleId.startsWith(binDirPath)) { - // For generated files we take out the bin dir path - return moduleId.slice(binDirPath.length + 1); - } else { - return moduleId - } - }, - plugins: [amd_plugin], - }; - Object.assign(babelConfig, amdConfig); -} + const path = require('path'); + const process = require('process'); + const binDirPath = 'TMPL_bin_dir_path'; + // TODO: Add workspace name to the id + moduleId = path.relative(process.cwd(), name); + if (moduleId.startsWith(binDirPath)) { + // For generated files we take out the bin dir path + return moduleId.slice(binDirPath.length + 1); + } else { + return moduleId + } + }, + presets: [[env_preset, {modules: 'umd'}]], +}; module.exports = babelConfig; diff --git a/internal/js_library/v2/js_library.bzl b/internal/js_library/v2/js_library.bzl index 34ec7d6cca..4d623104a2 100644 --- a/internal/js_library/v2/js_library.bzl +++ b/internal/js_library/v2/js_library.bzl @@ -26,39 +26,27 @@ def _create_babel_args(ctx, config_path, out_files_extenstion): def _declare_babel_outputs(ctx, file_extenstion): return [ctx.actions.declare_file(src.basename[:-2] + file_extenstion) for src in ctx.files.srcs] -def _run_babel(ctx, inputs, outputs, args, env, mnemonic, description): +def _run_babel(ctx, inputs, outputs, args, mnemonic, description): ctx.actions.run( executable = ctx.executable._babel, inputs = inputs, outputs = outputs, arguments = [args], - env = env, mnemonic = mnemonic, progress_message = "Compiling Javascript (%s) %s" % (description, ctx.label), ) -def _babel_conversion(ctx, inputs, config, file_extenstion, env, mnemonic, description): +def _babel_conversion(ctx, inputs, config, file_extenstion, mnemonic, description): outputs = _declare_babel_outputs(ctx, file_extenstion) args = _create_babel_args(ctx, config.path, file_extenstion) - _run_babel(ctx, inputs, outputs, args, env, mnemonic, description) + _run_babel(ctx, inputs, outputs, args, mnemonic, description) return outputs -def _amd_conversion(ctx, inputs, config): - file_extenstion = "ajs" - env = { - "BAZEL_AMD_TARGET": "true", - } - return _babel_conversion(ctx, inputs, config, file_extenstion, env, "JsAmdCompile", "devmode") - def _es5_conversion(ctx, inputs, config): file_extenstion = "es5.js" - env = { - "BAZEL_ES5_TARGET": "true", - } - return _babel_conversion(ctx, inputs, config, file_extenstion, env, "JsEs5Compile", "prodmode") + return _babel_conversion(ctx, inputs, config, file_extenstion, "JsCompile", "Babel") -def _collect_sources(ctx, es5_outputs, amd_outputs): - amd_sources = depset(amd_outputs) +def _collect_sources(ctx, es5_outputs): es5_sources = depset(es5_outputs) es6_sources = depset(ctx.files.srcs) transitive_es5_sources = depset() @@ -75,7 +63,6 @@ def _collect_sources(ctx, es5_outputs, amd_outputs): ]) return struct( - amd_sources = amd_sources, es5_sources = es5_sources, transitive_es5_sources = depset(transitive = [transitive_es5_sources, es5_sources]), es6_sources = es6_sources, @@ -87,34 +74,33 @@ def _js_library(ctx): config = _write_config(ctx) inputs = ctx.files.srcs + ctx.files.data + [config] - amd_outputs = _amd_conversion(ctx, inputs, config) es5_outputs = _es5_conversion(ctx, inputs, config) - js_providers = _collect_sources(ctx, es5_outputs, amd_outputs) + js_providers = _collect_sources(ctx, es5_outputs) # Return legacy providers as ts_devserver still uses legacy format return struct( typescript = struct( es6_sources = js_providers.es6_sources, transitive_es6_sources = js_providers.transitive_es6_sources, - # Note: this returning the amd sources here for ts_devserver compatibility, should be - # js_porivders.es5_sources - es5_sources = js_providers.amd_sources, + es5_sources = js_providers.es5_sources, transitive_es5_sources = js_providers.transitive_es5_sources, ), legacy_info = struct( - files = js_providers.amd_sources, + files = js_providers.es5_sources, tags = ctx.attr.tags, module_name = ctx.attr.module_name, ), providers = [ DefaultInfo( - files = depset(amd_outputs + es5_outputs), - runfiles = ctx.runfiles(), + files = js_providers.es5_sources, + runfiles = ctx.runfiles( + collect_data = True, + collect_default = True, + ), ), OutputGroupInfo( es5_sources = js_providers.es5_sources, - amd_sources = js_providers.amd_sources, ), ], ) diff --git a/internal/js_library/v2/package.json b/internal/js_library/v2/package.json index 9b953c3b2d..3076555cf3 100644 --- a/internal/js_library/v2/package.json +++ b/internal/js_library/v2/package.json @@ -2,7 +2,6 @@ "description": "runtime dependencies for js_library", "devDependencies": { "@babel/core": "^7.0.0-rc.3", - "@babel/plugin-transform-modules-amd": "^7.0.0-rc.3", "@babel/preset-env": "^7.0.0-rc.3", "commander": "^2.17.1" } diff --git a/internal/js_library/v2/yarn.lock b/internal/js_library/v2/yarn.lock index ef87b66981..697b83e181 100644 --- a/internal/js_library/v2/yarn.lock +++ b/internal/js_library/v2/yarn.lock @@ -346,7 +346,7 @@ dependencies: "@babel/helper-plugin-utils" "7.0.0-rc.3" -"@babel/plugin-transform-modules-amd@7.0.0-rc.3", "@babel/plugin-transform-modules-amd@^7.0.0-rc.3": +"@babel/plugin-transform-modules-amd@7.0.0-rc.3": version "7.0.0-rc.3" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.0.0-rc.3.tgz#1b4188bfaca1edccfb2787db396522ac7055a095" dependencies: From d9d5fed74bffd5c930e1abdc1fb1be5af2a6eb96 Mon Sep 17 00:00:00 2001 From: Globegitter Date: Mon, 27 Aug 2018 15:15:19 +0200 Subject: [PATCH 22/53] Put converted files into an es5 dir. --- examples/devserver/WORKSPACE | 3 +++ examples/devserver/src/BUILD.bazel | 4 +--- internal/js_library/v2/babel.js | 25 +++++++++++---------- internal/js_library/v2/js_library.bzl | 32 ++++++++++++++++++--------- internal/js_library/v2/package.json | 3 ++- internal/js_library/v2/yarn.lock | 10 +++++++++ internal/rollup/rollup_bundle.bzl | 2 +- 7 files changed, 51 insertions(+), 28 deletions(-) diff --git a/examples/devserver/WORKSPACE b/examples/devserver/WORKSPACE index a8696f7fb1..062b89c1da 100644 --- a/examples/devserver/WORKSPACE +++ b/examples/devserver/WORKSPACE @@ -72,3 +72,6 @@ browser_repositories( load("@build_bazel_rules_typescript//:defs.bzl", "ts_setup_workspace") ts_setup_workspace() + +load("//:setup_workspace.bzl", "devserver_example_setup_workspace") +devserver_example_setup_workspace() diff --git a/examples/devserver/src/BUILD.bazel b/examples/devserver/src/BUILD.bazel index 5640d3fce3..661f1a05da 100644 --- a/examples/devserver/src/BUILD.bazel +++ b/examples/devserver/src/BUILD.bazel @@ -41,9 +41,7 @@ ts_devserver( rollup_bundle( name = "bundle", - # Note: This will only work now when called from the top-level workspace, otherwise it would - # just be src/test.js - entry_point = "external/devserver_example/src/test.js", + entry_point = "$(location :test)", node_modules = "@devserver_example_yarn_install//:node_modules", deps = [ ":test", diff --git a/internal/js_library/v2/babel.js b/internal/js_library/v2/babel.js index ef04bdf0a2..79b3ac95a2 100644 --- a/internal/js_library/v2/babel.js +++ b/internal/js_library/v2/babel.js @@ -1,15 +1,15 @@ // A simple wrapper around babel-core due to https://github.com/babel/babel/issues/8193 -const {writeFile, readFileSync} = require('fs'); +const {writeFile} = require('fs'); const path = require('path'); const babel = require('@babel/core'); +const mkdirp = require('mkdirp'); const program = require('commander'); program.version('1.0.0') .usage('[options] ') .option('-o, --out-dir ', 'Output directory for created files') - .option('-e, --out-files-extension ', 'Change file extension for created files') .option('-c, --config-file ', 'babel.rc.js config file') .parse(process.argv); @@ -24,21 +24,22 @@ if (program['configFile']) { for (let i = 0; i < program.args.length; i += 1) { const input = program.args[i]; - // Note: For now we assume .js file extensions - const outputFile = program['outFilesExtension'] ? - `${input.slice(0, -3)}.${program['outFilesExtension']}` : - input; - const output = input.startsWith(outDir) ? outputFile : path.join(outDir, outputFile); + const output = path.join(outDir, path.basename(input)); - babel.transformFile(input, babelConfig, function(err, result) { + return babel.transformFile(input, babelConfig, function(err, result) { if (err) { return console.error(err); } - - return writeFile(output, result.code, (err) => { + // Ensure directory exists + return mkdirp(path.dirname(output), function(err) { if (err) { - console.error(err); + return console.error(err); } - }) + return writeFile(output, result.code, (err) => { + if (err) { + return console.error(err); + } + }); + }); }); } diff --git a/internal/js_library/v2/js_library.bzl b/internal/js_library/v2/js_library.bzl index 4d623104a2..6daec5940b 100644 --- a/internal/js_library/v2/js_library.bzl +++ b/internal/js_library/v2/js_library.bzl @@ -15,16 +15,25 @@ def _write_config(ctx): ) return output -def _create_babel_args(ctx, config_path, out_files_extenstion): +def _create_babel_args(ctx, config_path, out_dir): + out = paths.join(ctx.bin_dir.path, ctx.label.workspace_root, ctx.label.package, out_dir) args = ctx.actions.args() - args.add("--out-dir", ctx.bin_dir.path) + args.add("--out-dir", out) args.add("--config-file", config_path) - args.add("--out-files-extension", out_files_extenstion) args.add_all(ctx.files.srcs) return args -def _declare_babel_outputs(ctx, file_extenstion): - return [ctx.actions.declare_file(src.basename[:-2] + file_extenstion) for src in ctx.files.srcs] +def _trim(out_dir, src, trim, bin_dir_trim): + if src.is_source: + src_path = src.path[trim:] + else: + src_path = src.path[bin_dir_trim:] + return paths.join(out_dir, src_path) + +def _declare_babel_outputs(ctx, out_dir): + trim = len(paths.join(ctx.label.workspace_root, ctx.label.package) + "/") + bin_dir_trim = trim + len(ctx.bin_dir.path + "/") + return [ctx.actions.declare_file(_trim(out_dir, src, trim, bin_dir_trim)) for src in ctx.files.srcs] def _run_babel(ctx, inputs, outputs, args, mnemonic, description): ctx.actions.run( @@ -36,15 +45,15 @@ def _run_babel(ctx, inputs, outputs, args, mnemonic, description): progress_message = "Compiling Javascript (%s) %s" % (description, ctx.label), ) -def _babel_conversion(ctx, inputs, config, file_extenstion, mnemonic, description): - outputs = _declare_babel_outputs(ctx, file_extenstion) - args = _create_babel_args(ctx, config.path, file_extenstion) +def _babel_conversion(ctx, inputs, config, out_dir, mnemonic, description): + outputs = _declare_babel_outputs(ctx, out_dir) + args = _create_babel_args(ctx, config.path, out_dir) _run_babel(ctx, inputs, outputs, args, mnemonic, description) return outputs def _es5_conversion(ctx, inputs, config): - file_extenstion = "es5.js" - return _babel_conversion(ctx, inputs, config, file_extenstion, "JsCompile", "Babel") + out_dir = "es5" + return _babel_conversion(ctx, inputs, config, out_dir, "JsCompile", "Babel") def _collect_sources(ctx, es5_outputs): es5_sources = depset(es5_outputs) @@ -93,7 +102,7 @@ def _js_library(ctx): ), providers = [ DefaultInfo( - files = js_providers.es5_sources, + files = js_providers.es6_sources, runfiles = ctx.runfiles( collect_data = True, collect_default = True, @@ -101,6 +110,7 @@ def _js_library(ctx): ), OutputGroupInfo( es5_sources = js_providers.es5_sources, + es6_sources = js_providers.es6_sources, ), ], ) diff --git a/internal/js_library/v2/package.json b/internal/js_library/v2/package.json index 3076555cf3..7280f278da 100644 --- a/internal/js_library/v2/package.json +++ b/internal/js_library/v2/package.json @@ -3,6 +3,7 @@ "devDependencies": { "@babel/core": "^7.0.0-rc.3", "@babel/preset-env": "^7.0.0-rc.3", - "commander": "^2.17.1" + "commander": "^2.17.1", + "mkdirp": "^0.5.1" } } diff --git a/internal/js_library/v2/yarn.lock b/internal/js_library/v2/yarn.lock index 697b83e181..f57830187f 100644 --- a/internal/js_library/v2/yarn.lock +++ b/internal/js_library/v2/yarn.lock @@ -624,6 +624,16 @@ loose-envify@^1.0.0: dependencies: js-tokens "^3.0.0 || ^4.0.0" +minimist@0.0.8: + version "0.0.8" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d" + +mkdirp@^0.5.1: + version "0.5.1" + resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903" + dependencies: + minimist "0.0.8" + ms@2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" diff --git a/internal/rollup/rollup_bundle.bzl b/internal/rollup/rollup_bundle.bzl index 62210ffc57..e77ec5256b 100644 --- a/internal/rollup/rollup_bundle.bzl +++ b/internal/rollup/rollup_bundle.bzl @@ -113,7 +113,7 @@ def run_rollup(ctx, sources, config, output): args.add(["--config", config.path]) args.add(["--output.file", output.path]) args.add(["--output.sourcemap", "--output.sourcemapFile", map_output.path]) - args.add(["--input", ctx.attr.entry_point]) + args.add(["--input", ctx.expand_location(ctx.attr.entry_point)]) # We will produce errors as needed. Anything else is spammy: a well-behaved # bazel rule prints nothing on success. args.add("--silent") From de43be139527046ffa64ec2c0cd5724a7b054b23 Mon Sep 17 00:00:00 2001 From: Globegitter Date: Sat, 22 Sep 2018 22:22:51 +0200 Subject: [PATCH 23/53] Rever expand_location change. --- examples/devserver/src/BUILD.bazel | 6 ++++-- internal/rollup/rollup_bundle.bzl | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/examples/devserver/src/BUILD.bazel b/examples/devserver/src/BUILD.bazel index 661f1a05da..cde1ff6dfa 100644 --- a/examples/devserver/src/BUILD.bazel +++ b/examples/devserver/src/BUILD.bazel @@ -30,7 +30,7 @@ js_library( ts_devserver( name = "devserver", # Note: This will only work now when called from the top-level workspace, otherwise it would - # just be src/test.js + # just be src/test entry_module = "external/devserver_example/src/test", port = 8080, serving_path = "/bundle.js", @@ -41,7 +41,9 @@ ts_devserver( rollup_bundle( name = "bundle", - entry_point = "$(location :test)", + # Note: This will only work now when called from the top-level workspace, otherwise it would + # just be src/test.js + entry_point = "external/devserver_example/src/test.js", node_modules = "@devserver_example_yarn_install//:node_modules", deps = [ ":test", diff --git a/internal/rollup/rollup_bundle.bzl b/internal/rollup/rollup_bundle.bzl index e77ec5256b..62210ffc57 100644 --- a/internal/rollup/rollup_bundle.bzl +++ b/internal/rollup/rollup_bundle.bzl @@ -113,7 +113,7 @@ def run_rollup(ctx, sources, config, output): args.add(["--config", config.path]) args.add(["--output.file", output.path]) args.add(["--output.sourcemap", "--output.sourcemapFile", map_output.path]) - args.add(["--input", ctx.expand_location(ctx.attr.entry_point)]) + args.add(["--input", ctx.attr.entry_point]) # We will produce errors as needed. Anything else is spammy: a well-behaved # bazel rule prints nothing on success. args.add("--silent") From bb5da4f7e7b2447ae269f6aa4cb4dbe4d15e5a0e Mon Sep 17 00:00:00 2001 From: Globegitter Date: Sat, 22 Sep 2018 22:52:02 +0200 Subject: [PATCH 24/53] Update deps. --- internal/js_library/v2/package.json | 6 +- internal/js_library/v2/yarn.lock | 726 ++++++++++++++-------------- 2 files changed, 366 insertions(+), 366 deletions(-) diff --git a/internal/js_library/v2/package.json b/internal/js_library/v2/package.json index 7280f278da..f3e18ff4e9 100644 --- a/internal/js_library/v2/package.json +++ b/internal/js_library/v2/package.json @@ -1,9 +1,9 @@ { "description": "runtime dependencies for js_library", "devDependencies": { - "@babel/core": "^7.0.0-rc.3", - "@babel/preset-env": "^7.0.0-rc.3", - "commander": "^2.17.1", + "@babel/core": "^7.1.0", + "@babel/preset-env": "^7.1.0", + "commander": "^2.18.0", "mkdirp": "^0.5.1" } } diff --git a/internal/js_library/v2/yarn.lock b/internal/js_library/v2/yarn.lock index f57830187f..a9218e6d5a 100644 --- a/internal/js_library/v2/yarn.lock +++ b/internal/js_library/v2/yarn.lock @@ -2,23 +2,23 @@ # yarn lockfile v1 -"@babel/code-frame@7.0.0-rc.3": - version "7.0.0-rc.3" - resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.0.0-rc.3.tgz#d77a587401f818a3168700f596e41cd6905947b2" - dependencies: - "@babel/highlight" "7.0.0-rc.3" - -"@babel/core@^7.0.0-rc.3": - version "7.0.0-rc.3" - resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.0.0-rc.3.tgz#0c3b5c4fcc65ea3fc7c019202aca6cd0b17705e7" - dependencies: - "@babel/code-frame" "7.0.0-rc.3" - "@babel/generator" "7.0.0-rc.3" - "@babel/helpers" "7.0.0-rc.3" - "@babel/parser" "7.0.0-rc.3" - "@babel/template" "7.0.0-rc.3" - "@babel/traverse" "7.0.0-rc.3" - "@babel/types" "7.0.0-rc.3" +"@babel/code-frame@^7.0.0": + version "7.0.0" + resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.0.0.tgz#06e2ab19bdb535385559aabb5ba59729482800f8" + dependencies: + "@babel/highlight" "^7.0.0" + +"@babel/core@^7.1.0": + version "7.1.0" + resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.1.0.tgz#08958f1371179f62df6966d8a614003d11faeb04" + dependencies: + "@babel/code-frame" "^7.0.0" + "@babel/generator" "^7.0.0" + "@babel/helpers" "^7.1.0" + "@babel/parser" "^7.1.0" + "@babel/template" "^7.1.0" + "@babel/traverse" "^7.1.0" + "@babel/types" "^7.0.0" convert-source-map "^1.1.0" debug "^3.1.0" json5 "^0.5.0" @@ -27,492 +27,492 @@ semver "^5.4.1" source-map "^0.5.0" -"@babel/generator@7.0.0-rc.3": - version "7.0.0-rc.3" - resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.0.0-rc.3.tgz#3267085de2d9b8779bde79052ee5f7070d99a5ab" +"@babel/generator@^7.0.0": + version "7.0.0" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.0.0.tgz#1efd58bffa951dc846449e58ce3a1d7f02d393aa" dependencies: - "@babel/types" "7.0.0-rc.3" + "@babel/types" "^7.0.0" jsesc "^2.5.1" lodash "^4.17.10" source-map "^0.5.0" trim-right "^1.0.1" -"@babel/helper-annotate-as-pure@7.0.0-rc.3": - version "7.0.0-rc.3" - resolved "https://registry.yarnpkg.com/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.0.0-rc.3.tgz#0251d48d2f6d175ffdd9601fc032e3bdaa4e580a" +"@babel/helper-annotate-as-pure@^7.0.0": + version "7.0.0" + resolved "https://registry.yarnpkg.com/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.0.0.tgz#323d39dd0b50e10c7c06ca7d7638e6864d8c5c32" dependencies: - "@babel/types" "7.0.0-rc.3" + "@babel/types" "^7.0.0" -"@babel/helper-builder-binary-assignment-operator-visitor@7.0.0-rc.3": - version "7.0.0-rc.3" - resolved "https://registry.yarnpkg.com/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.0.0-rc.3.tgz#2df11e360f20fb636383f7edd37a439d81c3e694" +"@babel/helper-builder-binary-assignment-operator-visitor@^7.1.0": + version "7.1.0" + resolved "https://registry.yarnpkg.com/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.1.0.tgz#6b69628dfe4087798e0c4ed98e3d4a6b2fbd2f5f" dependencies: - "@babel/helper-explode-assignable-expression" "7.0.0-rc.3" - "@babel/types" "7.0.0-rc.3" + "@babel/helper-explode-assignable-expression" "^7.1.0" + "@babel/types" "^7.0.0" -"@babel/helper-call-delegate@7.0.0-rc.3": - version "7.0.0-rc.3" - resolved "https://registry.yarnpkg.com/@babel/helper-call-delegate/-/helper-call-delegate-7.0.0-rc.3.tgz#6a96c63e5a72138f1cfcd9c4bfa99cdd1f650f19" +"@babel/helper-call-delegate@^7.1.0": + version "7.1.0" + resolved "https://registry.yarnpkg.com/@babel/helper-call-delegate/-/helper-call-delegate-7.1.0.tgz#6a957f105f37755e8645343d3038a22e1449cc4a" dependencies: - "@babel/helper-hoist-variables" "7.0.0-rc.3" - "@babel/traverse" "7.0.0-rc.3" - "@babel/types" "7.0.0-rc.3" + "@babel/helper-hoist-variables" "^7.0.0" + "@babel/traverse" "^7.1.0" + "@babel/types" "^7.0.0" -"@babel/helper-define-map@7.0.0-rc.3": - version "7.0.0-rc.3" - resolved "https://registry.yarnpkg.com/@babel/helper-define-map/-/helper-define-map-7.0.0-rc.3.tgz#fea0abc72c8728887873770d3939dc8bf49c3e92" +"@babel/helper-define-map@^7.1.0": + version "7.1.0" + resolved "https://registry.yarnpkg.com/@babel/helper-define-map/-/helper-define-map-7.1.0.tgz#3b74caec329b3c80c116290887c0dd9ae468c20c" dependencies: - "@babel/helper-function-name" "7.0.0-rc.3" - "@babel/types" "7.0.0-rc.3" + "@babel/helper-function-name" "^7.1.0" + "@babel/types" "^7.0.0" lodash "^4.17.10" -"@babel/helper-explode-assignable-expression@7.0.0-rc.3": - version "7.0.0-rc.3" - resolved "https://registry.yarnpkg.com/@babel/helper-explode-assignable-expression/-/helper-explode-assignable-expression-7.0.0-rc.3.tgz#987b3295b68e380acdab6ff5923f9cad8764c74c" +"@babel/helper-explode-assignable-expression@^7.1.0": + version "7.1.0" + resolved "https://registry.yarnpkg.com/@babel/helper-explode-assignable-expression/-/helper-explode-assignable-expression-7.1.0.tgz#537fa13f6f1674df745b0c00ec8fe4e99681c8f6" dependencies: - "@babel/traverse" "7.0.0-rc.3" - "@babel/types" "7.0.0-rc.3" + "@babel/traverse" "^7.1.0" + "@babel/types" "^7.0.0" -"@babel/helper-function-name@7.0.0-rc.3": - version "7.0.0-rc.3" - resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.0.0-rc.3.tgz#ddfb3793fe6ca13be7161afa045971b8e82f96e8" +"@babel/helper-function-name@^7.1.0": + version "7.1.0" + resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.1.0.tgz#a0ceb01685f73355d4360c1247f582bfafc8ff53" dependencies: - "@babel/helper-get-function-arity" "7.0.0-rc.3" - "@babel/template" "7.0.0-rc.3" - "@babel/types" "7.0.0-rc.3" + "@babel/helper-get-function-arity" "^7.0.0" + "@babel/template" "^7.1.0" + "@babel/types" "^7.0.0" -"@babel/helper-get-function-arity@7.0.0-rc.3": - version "7.0.0-rc.3" - resolved "https://registry.yarnpkg.com/@babel/helper-get-function-arity/-/helper-get-function-arity-7.0.0-rc.3.tgz#b9fb083977e1639aac6c9c06b2de7b849aa6fea5" +"@babel/helper-get-function-arity@^7.0.0": + version "7.0.0" + resolved "https://registry.yarnpkg.com/@babel/helper-get-function-arity/-/helper-get-function-arity-7.0.0.tgz#83572d4320e2a4657263734113c42868b64e49c3" dependencies: - "@babel/types" "7.0.0-rc.3" + "@babel/types" "^7.0.0" -"@babel/helper-hoist-variables@7.0.0-rc.3": - version "7.0.0-rc.3" - resolved "https://registry.yarnpkg.com/@babel/helper-hoist-variables/-/helper-hoist-variables-7.0.0-rc.3.tgz#cea012ebe83116623609311858a11dd8adc10dfa" +"@babel/helper-hoist-variables@^7.0.0": + version "7.0.0" + resolved "https://registry.yarnpkg.com/@babel/helper-hoist-variables/-/helper-hoist-variables-7.0.0.tgz#46adc4c5e758645ae7a45deb92bab0918c23bb88" dependencies: - "@babel/types" "7.0.0-rc.3" + "@babel/types" "^7.0.0" -"@babel/helper-member-expression-to-functions@7.0.0-rc.3": - version "7.0.0-rc.3" - resolved "https://registry.yarnpkg.com/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.0.0-rc.3.tgz#65a455f0d35e40ee205a89e7c991472e85ffe09a" +"@babel/helper-member-expression-to-functions@^7.0.0": + version "7.0.0" + resolved "https://registry.yarnpkg.com/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.0.0.tgz#8cd14b0a0df7ff00f009e7d7a436945f47c7a16f" dependencies: - "@babel/types" "7.0.0-rc.3" + "@babel/types" "^7.0.0" -"@babel/helper-module-imports@7.0.0-rc.3": - version "7.0.0-rc.3" - resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.0.0-rc.3.tgz#09207a1d2c528abddd74c259af1836bf34194ff5" +"@babel/helper-module-imports@^7.0.0": + version "7.0.0" + resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.0.0.tgz#96081b7111e486da4d2cd971ad1a4fe216cc2e3d" dependencies: - "@babel/types" "7.0.0-rc.3" + "@babel/types" "^7.0.0" -"@babel/helper-module-transforms@7.0.0-rc.3": - version "7.0.0-rc.3" - resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.0.0-rc.3.tgz#dc92b603f42d3567b2d091241569bbf420221cd9" +"@babel/helper-module-transforms@^7.1.0": + version "7.1.0" + resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.1.0.tgz#470d4f9676d9fad50b324cdcce5fbabbc3da5787" dependencies: - "@babel/helper-module-imports" "7.0.0-rc.3" - "@babel/helper-simple-access" "7.0.0-rc.3" - "@babel/helper-split-export-declaration" "7.0.0-rc.3" - "@babel/template" "7.0.0-rc.3" - "@babel/types" "7.0.0-rc.3" + "@babel/helper-module-imports" "^7.0.0" + "@babel/helper-simple-access" "^7.1.0" + "@babel/helper-split-export-declaration" "^7.0.0" + "@babel/template" "^7.1.0" + "@babel/types" "^7.0.0" lodash "^4.17.10" -"@babel/helper-optimise-call-expression@7.0.0-rc.3": - version "7.0.0-rc.3" - resolved "https://registry.yarnpkg.com/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.0.0-rc.3.tgz#6a594f922c73c3266f5c59c3374b0e176aefd8a5" +"@babel/helper-optimise-call-expression@^7.0.0": + version "7.0.0" + resolved "https://registry.yarnpkg.com/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.0.0.tgz#a2920c5702b073c15de51106200aa8cad20497d5" dependencies: - "@babel/types" "7.0.0-rc.3" + "@babel/types" "^7.0.0" -"@babel/helper-plugin-utils@7.0.0-rc.3": - version "7.0.0-rc.3" - resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.0.0-rc.3.tgz#f68392896f4f3b90bdf7e72e5cc7127cdd5441fd" +"@babel/helper-plugin-utils@^7.0.0": + version "7.0.0" + resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.0.0.tgz#bbb3fbee98661c569034237cc03967ba99b4f250" -"@babel/helper-regex@7.0.0-rc.3": - version "7.0.0-rc.3" - resolved "https://registry.yarnpkg.com/@babel/helper-regex/-/helper-regex-7.0.0-rc.3.tgz#1f2e11de94fc2481fc6932c07994444f6b627854" +"@babel/helper-regex@^7.0.0": + version "7.0.0" + resolved "https://registry.yarnpkg.com/@babel/helper-regex/-/helper-regex-7.0.0.tgz#2c1718923b57f9bbe64705ffe5640ac64d9bdb27" dependencies: lodash "^4.17.10" -"@babel/helper-remap-async-to-generator@7.0.0-rc.3": - version "7.0.0-rc.3" - resolved "https://registry.yarnpkg.com/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.0.0-rc.3.tgz#085d673b34b9e57a15325ec0b32dc0bb40836b39" +"@babel/helper-remap-async-to-generator@^7.1.0": + version "7.1.0" + resolved "https://registry.yarnpkg.com/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.1.0.tgz#361d80821b6f38da75bd3f0785ece20a88c5fe7f" dependencies: - "@babel/helper-annotate-as-pure" "7.0.0-rc.3" - "@babel/helper-wrap-function" "7.0.0-rc.3" - "@babel/template" "7.0.0-rc.3" - "@babel/traverse" "7.0.0-rc.3" - "@babel/types" "7.0.0-rc.3" + "@babel/helper-annotate-as-pure" "^7.0.0" + "@babel/helper-wrap-function" "^7.1.0" + "@babel/template" "^7.1.0" + "@babel/traverse" "^7.1.0" + "@babel/types" "^7.0.0" -"@babel/helper-replace-supers@7.0.0-rc.3": - version "7.0.0-rc.3" - resolved "https://registry.yarnpkg.com/@babel/helper-replace-supers/-/helper-replace-supers-7.0.0-rc.3.tgz#0172cdf556093b8e0245041bd2d76a12af756bf8" +"@babel/helper-replace-supers@^7.1.0": + version "7.1.0" + resolved "https://registry.yarnpkg.com/@babel/helper-replace-supers/-/helper-replace-supers-7.1.0.tgz#5fc31de522ec0ef0899dc9b3e7cf6a5dd655f362" dependencies: - "@babel/helper-member-expression-to-functions" "7.0.0-rc.3" - "@babel/helper-optimise-call-expression" "7.0.0-rc.3" - "@babel/traverse" "7.0.0-rc.3" - "@babel/types" "7.0.0-rc.3" + "@babel/helper-member-expression-to-functions" "^7.0.0" + "@babel/helper-optimise-call-expression" "^7.0.0" + "@babel/traverse" "^7.1.0" + "@babel/types" "^7.0.0" -"@babel/helper-simple-access@7.0.0-rc.3": - version "7.0.0-rc.3" - resolved "https://registry.yarnpkg.com/@babel/helper-simple-access/-/helper-simple-access-7.0.0-rc.3.tgz#c5a316c0838785eab896b7578ee05b1ac8193f2b" +"@babel/helper-simple-access@^7.1.0": + version "7.1.0" + resolved "https://registry.yarnpkg.com/@babel/helper-simple-access/-/helper-simple-access-7.1.0.tgz#65eeb954c8c245beaa4e859da6188f39d71e585c" dependencies: - "@babel/template" "7.0.0-rc.3" - "@babel/types" "7.0.0-rc.3" + "@babel/template" "^7.1.0" + "@babel/types" "^7.0.0" -"@babel/helper-split-export-declaration@7.0.0-rc.3": - version "7.0.0-rc.3" - resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.0.0-rc.3.tgz#42ca01340ddb68ab471f81e6ff2c6270dbdbd113" +"@babel/helper-split-export-declaration@^7.0.0": + version "7.0.0" + resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.0.0.tgz#3aae285c0311c2ab095d997b8c9a94cad547d813" dependencies: - "@babel/types" "7.0.0-rc.3" + "@babel/types" "^7.0.0" -"@babel/helper-wrap-function@7.0.0-rc.3": - version "7.0.0-rc.3" - resolved "https://registry.yarnpkg.com/@babel/helper-wrap-function/-/helper-wrap-function-7.0.0-rc.3.tgz#3abcc29bc93c46d61125f994d8667e297f7081fa" +"@babel/helper-wrap-function@^7.1.0": + version "7.1.0" + resolved "https://registry.yarnpkg.com/@babel/helper-wrap-function/-/helper-wrap-function-7.1.0.tgz#8cf54e9190706067f016af8f75cb3df829cc8c66" dependencies: - "@babel/helper-function-name" "7.0.0-rc.3" - "@babel/template" "7.0.0-rc.3" - "@babel/traverse" "7.0.0-rc.3" - "@babel/types" "7.0.0-rc.3" + "@babel/helper-function-name" "^7.1.0" + "@babel/template" "^7.1.0" + "@babel/traverse" "^7.1.0" + "@babel/types" "^7.0.0" -"@babel/helpers@7.0.0-rc.3": - version "7.0.0-rc.3" - resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.0.0-rc.3.tgz#321c6b575d4d2c0e7b9f33ea085b8ecaa1965b24" +"@babel/helpers@^7.1.0": + version "7.1.0" + resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.1.0.tgz#429bf0f0020be56a4242883432084e3d70a8a141" dependencies: - "@babel/template" "7.0.0-rc.3" - "@babel/traverse" "7.0.0-rc.3" - "@babel/types" "7.0.0-rc.3" + "@babel/template" "^7.1.0" + "@babel/traverse" "^7.1.0" + "@babel/types" "^7.0.0" -"@babel/highlight@7.0.0-rc.3": - version "7.0.0-rc.3" - resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.0.0-rc.3.tgz#c2ee83f8e5c0c387279a8c48e06fef2e32027004" +"@babel/highlight@^7.0.0": + version "7.0.0" + resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.0.0.tgz#f710c38c8d458e6dd9a201afb637fcb781ce99e4" dependencies: chalk "^2.0.0" esutils "^2.0.2" js-tokens "^4.0.0" -"@babel/parser@7.0.0-rc.3": - version "7.0.0-rc.3" - resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.0.0-rc.3.tgz#859d7b60ef6b939aab5f6d4f4bffbb7bafdc418b" +"@babel/parser@^7.1.0": + version "7.1.0" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.1.0.tgz#a7cd42cb3c12aec52e24375189a47b39759b783e" -"@babel/plugin-proposal-async-generator-functions@7.0.0-rc.3": - version "7.0.0-rc.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.0.0-rc.3.tgz#22c8a89c8e660c3ff42cd5f5c5921d192a92e190" +"@babel/plugin-proposal-async-generator-functions@^7.1.0": + version "7.1.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.1.0.tgz#41c1a702e10081456e23a7b74d891922dd1bb6ce" dependencies: - "@babel/helper-plugin-utils" "7.0.0-rc.3" - "@babel/helper-remap-async-to-generator" "7.0.0-rc.3" - "@babel/plugin-syntax-async-generators" "7.0.0-rc.3" + "@babel/helper-plugin-utils" "^7.0.0" + "@babel/helper-remap-async-to-generator" "^7.1.0" + "@babel/plugin-syntax-async-generators" "^7.0.0" -"@babel/plugin-proposal-json-strings@7.0.0-rc.3": - version "7.0.0-rc.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-json-strings/-/plugin-proposal-json-strings-7.0.0-rc.3.tgz#0b1d313981d6f4dca6b1419ee0b61d57dc368308" +"@babel/plugin-proposal-json-strings@^7.0.0": + version "7.0.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-json-strings/-/plugin-proposal-json-strings-7.0.0.tgz#3b4d7b5cf51e1f2e70f52351d28d44fc2970d01e" dependencies: - "@babel/helper-plugin-utils" "7.0.0-rc.3" - "@babel/plugin-syntax-json-strings" "7.0.0-rc.3" + "@babel/helper-plugin-utils" "^7.0.0" + "@babel/plugin-syntax-json-strings" "^7.0.0" -"@babel/plugin-proposal-object-rest-spread@7.0.0-rc.3": - version "7.0.0-rc.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.0.0-rc.3.tgz#c51a93b86d59eb35ea4f123c5f18f0953a25d761" +"@babel/plugin-proposal-object-rest-spread@^7.0.0": + version "7.0.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.0.0.tgz#9a17b547f64d0676b6c9cecd4edf74a82ab85e7e" dependencies: - "@babel/helper-plugin-utils" "7.0.0-rc.3" - "@babel/plugin-syntax-object-rest-spread" "7.0.0-rc.3" + "@babel/helper-plugin-utils" "^7.0.0" + "@babel/plugin-syntax-object-rest-spread" "^7.0.0" -"@babel/plugin-proposal-optional-catch-binding@7.0.0-rc.3": - version "7.0.0-rc.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-optional-catch-binding/-/plugin-proposal-optional-catch-binding-7.0.0-rc.3.tgz#47f81c6549661c99dc74c3f5161ae90b76b6ca66" +"@babel/plugin-proposal-optional-catch-binding@^7.0.0": + version "7.0.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-optional-catch-binding/-/plugin-proposal-optional-catch-binding-7.0.0.tgz#b610d928fe551ff7117d42c8bb410eec312a6425" dependencies: - "@babel/helper-plugin-utils" "7.0.0-rc.3" - "@babel/plugin-syntax-optional-catch-binding" "7.0.0-rc.3" + "@babel/helper-plugin-utils" "^7.0.0" + "@babel/plugin-syntax-optional-catch-binding" "^7.0.0" -"@babel/plugin-proposal-unicode-property-regex@7.0.0-rc.3": - version "7.0.0-rc.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.0.0-rc.3.tgz#27a6e328ab018dc0128fcbde9cfff0e67d87da94" +"@babel/plugin-proposal-unicode-property-regex@^7.0.0": + version "7.0.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.0.0.tgz#498b39cd72536cd7c4b26177d030226eba08cd33" dependencies: - "@babel/helper-plugin-utils" "7.0.0-rc.3" - "@babel/helper-regex" "7.0.0-rc.3" + "@babel/helper-plugin-utils" "^7.0.0" + "@babel/helper-regex" "^7.0.0" regexpu-core "^4.2.0" -"@babel/plugin-syntax-async-generators@7.0.0-rc.3": - version "7.0.0-rc.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.0.0-rc.3.tgz#7d768f8bb18597781ade989c87519181b69764bf" +"@babel/plugin-syntax-async-generators@^7.0.0": + version "7.0.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.0.0.tgz#bf0891dcdbf59558359d0c626fdc9490e20bc13c" dependencies: - "@babel/helper-plugin-utils" "7.0.0-rc.3" + "@babel/helper-plugin-utils" "^7.0.0" -"@babel/plugin-syntax-json-strings@7.0.0-rc.3": - version "7.0.0-rc.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.0.0-rc.3.tgz#5dc7b1f713de140451446a6c36739c15de857a95" +"@babel/plugin-syntax-json-strings@^7.0.0": + version "7.0.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.0.0.tgz#0d259a68090e15b383ce3710e01d5b23f3770cbd" dependencies: - "@babel/helper-plugin-utils" "7.0.0-rc.3" + "@babel/helper-plugin-utils" "^7.0.0" -"@babel/plugin-syntax-object-rest-spread@7.0.0-rc.3": - version "7.0.0-rc.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.0.0-rc.3.tgz#4458bb8b61849a81de4a90f98f4cb4f87d1d95c5" +"@babel/plugin-syntax-object-rest-spread@^7.0.0": + version "7.0.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.0.0.tgz#37d8fbcaf216bd658ea1aebbeb8b75e88ebc549b" dependencies: - "@babel/helper-plugin-utils" "7.0.0-rc.3" + "@babel/helper-plugin-utils" "^7.0.0" -"@babel/plugin-syntax-optional-catch-binding@7.0.0-rc.3": - version "7.0.0-rc.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.0.0-rc.3.tgz#5fe5ed7c95a98e2e0b8fc38c4c64904045580ae3" +"@babel/plugin-syntax-optional-catch-binding@^7.0.0": + version "7.0.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.0.0.tgz#886f72008b3a8b185977f7cb70713b45e51ee475" dependencies: - "@babel/helper-plugin-utils" "7.0.0-rc.3" + "@babel/helper-plugin-utils" "^7.0.0" -"@babel/plugin-transform-arrow-functions@7.0.0-rc.3": - version "7.0.0-rc.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.0.0-rc.3.tgz#e6c22148d0c2873522a2db8e21ba39d9db188d74" +"@babel/plugin-transform-arrow-functions@^7.0.0": + version "7.0.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.0.0.tgz#a6c14875848c68a3b4b3163a486535ef25c7e749" dependencies: - "@babel/helper-plugin-utils" "7.0.0-rc.3" + "@babel/helper-plugin-utils" "^7.0.0" -"@babel/plugin-transform-async-to-generator@7.0.0-rc.3": - version "7.0.0-rc.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.0.0-rc.3.tgz#df63901f6071324f1b2ac5b5b36fc79108772a98" +"@babel/plugin-transform-async-to-generator@^7.1.0": + version "7.1.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.1.0.tgz#109e036496c51dd65857e16acab3bafdf3c57811" dependencies: - "@babel/helper-module-imports" "7.0.0-rc.3" - "@babel/helper-plugin-utils" "7.0.0-rc.3" - "@babel/helper-remap-async-to-generator" "7.0.0-rc.3" + "@babel/helper-module-imports" "^7.0.0" + "@babel/helper-plugin-utils" "^7.0.0" + "@babel/helper-remap-async-to-generator" "^7.1.0" -"@babel/plugin-transform-block-scoped-functions@7.0.0-rc.3": - version "7.0.0-rc.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.0.0-rc.3.tgz#f3a6df435012bb5fc8cc77b17c670c32dcc8a350" +"@babel/plugin-transform-block-scoped-functions@^7.0.0": + version "7.0.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.0.0.tgz#482b3f75103927e37288b3b67b65f848e2aa0d07" dependencies: - "@babel/helper-plugin-utils" "7.0.0-rc.3" + "@babel/helper-plugin-utils" "^7.0.0" -"@babel/plugin-transform-block-scoping@7.0.0-rc.3": - version "7.0.0-rc.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.0.0-rc.3.tgz#65ea3edc061b09375218ae86edf6e0897769abc0" +"@babel/plugin-transform-block-scoping@^7.0.0": + version "7.0.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.0.0.tgz#1745075edffd7cdaf69fab2fb6f9694424b7e9bc" dependencies: - "@babel/helper-plugin-utils" "7.0.0-rc.3" + "@babel/helper-plugin-utils" "^7.0.0" lodash "^4.17.10" -"@babel/plugin-transform-classes@7.0.0-rc.3": - version "7.0.0-rc.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-classes/-/plugin-transform-classes-7.0.0-rc.3.tgz#4bc40e0ab871169e72a847a1d031fef8c34f3fb8" - dependencies: - "@babel/helper-annotate-as-pure" "7.0.0-rc.3" - "@babel/helper-define-map" "7.0.0-rc.3" - "@babel/helper-function-name" "7.0.0-rc.3" - "@babel/helper-optimise-call-expression" "7.0.0-rc.3" - "@babel/helper-plugin-utils" "7.0.0-rc.3" - "@babel/helper-replace-supers" "7.0.0-rc.3" - "@babel/helper-split-export-declaration" "7.0.0-rc.3" +"@babel/plugin-transform-classes@^7.1.0": + version "7.1.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-classes/-/plugin-transform-classes-7.1.0.tgz#ab3f8a564361800cbc8ab1ca6f21108038432249" + dependencies: + "@babel/helper-annotate-as-pure" "^7.0.0" + "@babel/helper-define-map" "^7.1.0" + "@babel/helper-function-name" "^7.1.0" + "@babel/helper-optimise-call-expression" "^7.0.0" + "@babel/helper-plugin-utils" "^7.0.0" + "@babel/helper-replace-supers" "^7.1.0" + "@babel/helper-split-export-declaration" "^7.0.0" globals "^11.1.0" -"@babel/plugin-transform-computed-properties@7.0.0-rc.3": - version "7.0.0-rc.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.0.0-rc.3.tgz#f8349aeca43c1062b2d4527a2aab0c892bc94deb" +"@babel/plugin-transform-computed-properties@^7.0.0": + version "7.0.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.0.0.tgz#2fbb8900cd3e8258f2a2ede909b90e7556185e31" dependencies: - "@babel/helper-plugin-utils" "7.0.0-rc.3" + "@babel/helper-plugin-utils" "^7.0.0" -"@babel/plugin-transform-destructuring@7.0.0-rc.3": - version "7.0.0-rc.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.0.0-rc.3.tgz#5924f10e29a1d2017f5d970c7769d2639bf16bf1" +"@babel/plugin-transform-destructuring@^7.0.0": + version "7.0.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.0.0.tgz#68e911e1935dda2f06b6ccbbf184ffb024e9d43a" dependencies: - "@babel/helper-plugin-utils" "7.0.0-rc.3" + "@babel/helper-plugin-utils" "^7.0.0" -"@babel/plugin-transform-dotall-regex@7.0.0-rc.3": - version "7.0.0-rc.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.0.0-rc.3.tgz#7c7acf5cc4279831eabf3817daa85f7862e647cd" +"@babel/plugin-transform-dotall-regex@^7.0.0": + version "7.0.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.0.0.tgz#73a24da69bc3c370251f43a3d048198546115e58" dependencies: - "@babel/helper-plugin-utils" "7.0.0-rc.3" - "@babel/helper-regex" "7.0.0-rc.3" + "@babel/helper-plugin-utils" "^7.0.0" + "@babel/helper-regex" "^7.0.0" regexpu-core "^4.1.3" -"@babel/plugin-transform-duplicate-keys@7.0.0-rc.3": - version "7.0.0-rc.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.0.0-rc.3.tgz#39bc3d271d392d8b2c34a9a9dab66f4b68641c3f" +"@babel/plugin-transform-duplicate-keys@^7.0.0": + version "7.0.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.0.0.tgz#a0601e580991e7cace080e4cf919cfd58da74e86" dependencies: - "@babel/helper-plugin-utils" "7.0.0-rc.3" + "@babel/helper-plugin-utils" "^7.0.0" -"@babel/plugin-transform-exponentiation-operator@7.0.0-rc.3": - version "7.0.0-rc.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.0.0-rc.3.tgz#494cc71920f8e31e02f99548c40935cf699f5be5" +"@babel/plugin-transform-exponentiation-operator@^7.1.0": + version "7.1.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.1.0.tgz#9c34c2ee7fd77e02779cfa37e403a2e1003ccc73" dependencies: - "@babel/helper-builder-binary-assignment-operator-visitor" "7.0.0-rc.3" - "@babel/helper-plugin-utils" "7.0.0-rc.3" + "@babel/helper-builder-binary-assignment-operator-visitor" "^7.1.0" + "@babel/helper-plugin-utils" "^7.0.0" -"@babel/plugin-transform-for-of@7.0.0-rc.3": - version "7.0.0-rc.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.0.0-rc.3.tgz#e4444180fe6f4a2a5244e9398cf8cfd3b7b9b1ae" +"@babel/plugin-transform-for-of@^7.0.0": + version "7.0.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.0.0.tgz#f2ba4eadb83bd17dc3c7e9b30f4707365e1c3e39" dependencies: - "@babel/helper-plugin-utils" "7.0.0-rc.3" + "@babel/helper-plugin-utils" "^7.0.0" -"@babel/plugin-transform-function-name@7.0.0-rc.3": - version "7.0.0-rc.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.0.0-rc.3.tgz#d947d63e9d50e900885cfe86df7e5d3f772cf66e" +"@babel/plugin-transform-function-name@^7.1.0": + version "7.1.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.1.0.tgz#29c5550d5c46208e7f730516d41eeddd4affadbb" dependencies: - "@babel/helper-function-name" "7.0.0-rc.3" - "@babel/helper-plugin-utils" "7.0.0-rc.3" + "@babel/helper-function-name" "^7.1.0" + "@babel/helper-plugin-utils" "^7.0.0" -"@babel/plugin-transform-literals@7.0.0-rc.3": - version "7.0.0-rc.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-literals/-/plugin-transform-literals-7.0.0-rc.3.tgz#ec4df668a5065935aa80327ffc8265570361f8de" +"@babel/plugin-transform-literals@^7.0.0": + version "7.0.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-literals/-/plugin-transform-literals-7.0.0.tgz#2aec1d29cdd24c407359c930cdd89e914ee8ff86" dependencies: - "@babel/helper-plugin-utils" "7.0.0-rc.3" + "@babel/helper-plugin-utils" "^7.0.0" -"@babel/plugin-transform-modules-amd@7.0.0-rc.3": - version "7.0.0-rc.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.0.0-rc.3.tgz#1b4188bfaca1edccfb2787db396522ac7055a095" +"@babel/plugin-transform-modules-amd@^7.1.0": + version "7.1.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.1.0.tgz#f9e0a7072c12e296079b5a59f408ff5b97bf86a8" dependencies: - "@babel/helper-module-transforms" "7.0.0-rc.3" - "@babel/helper-plugin-utils" "7.0.0-rc.3" + "@babel/helper-module-transforms" "^7.1.0" + "@babel/helper-plugin-utils" "^7.0.0" -"@babel/plugin-transform-modules-commonjs@7.0.0-rc.3": - version "7.0.0-rc.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.0.0-rc.3.tgz#11792a4314820bb5f149e3f5c7eed10b342220ca" +"@babel/plugin-transform-modules-commonjs@^7.1.0": + version "7.1.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.1.0.tgz#0a9d86451cbbfb29bd15186306897c67f6f9a05c" dependencies: - "@babel/helper-module-transforms" "7.0.0-rc.3" - "@babel/helper-plugin-utils" "7.0.0-rc.3" - "@babel/helper-simple-access" "7.0.0-rc.3" + "@babel/helper-module-transforms" "^7.1.0" + "@babel/helper-plugin-utils" "^7.0.0" + "@babel/helper-simple-access" "^7.1.0" -"@babel/plugin-transform-modules-systemjs@7.0.0-rc.3": - version "7.0.0-rc.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.0.0-rc.3.tgz#36a9ca740fcf9989e02f0341a02b438cd8e9528e" +"@babel/plugin-transform-modules-systemjs@^7.0.0": + version "7.0.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.0.0.tgz#8873d876d4fee23209decc4d1feab8f198cf2df4" dependencies: - "@babel/helper-hoist-variables" "7.0.0-rc.3" - "@babel/helper-plugin-utils" "7.0.0-rc.3" + "@babel/helper-hoist-variables" "^7.0.0" + "@babel/helper-plugin-utils" "^7.0.0" -"@babel/plugin-transform-modules-umd@7.0.0-rc.3": - version "7.0.0-rc.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.0.0-rc.3.tgz#35d04236716708b620dfca12f009b961b531f1d9" +"@babel/plugin-transform-modules-umd@^7.1.0": + version "7.1.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.1.0.tgz#a29a7d85d6f28c3561c33964442257cc6a21f2a8" dependencies: - "@babel/helper-module-transforms" "7.0.0-rc.3" - "@babel/helper-plugin-utils" "7.0.0-rc.3" + "@babel/helper-module-transforms" "^7.1.0" + "@babel/helper-plugin-utils" "^7.0.0" -"@babel/plugin-transform-new-target@7.0.0-rc.3": - version "7.0.0-rc.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.0.0-rc.3.tgz#5d107e54bc636ebb1af2a026f45fecba47b3e4f0" +"@babel/plugin-transform-new-target@^7.0.0": + version "7.0.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.0.0.tgz#ae8fbd89517fa7892d20e6564e641e8770c3aa4a" dependencies: - "@babel/helper-plugin-utils" "7.0.0-rc.3" + "@babel/helper-plugin-utils" "^7.0.0" -"@babel/plugin-transform-object-super@7.0.0-rc.3": - version "7.0.0-rc.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.0.0-rc.3.tgz#3c938c9e97df14c3d340d4be90087ee0c71eb871" +"@babel/plugin-transform-object-super@^7.1.0": + version "7.1.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.1.0.tgz#b1ae194a054b826d8d4ba7ca91486d4ada0f91bb" dependencies: - "@babel/helper-plugin-utils" "7.0.0-rc.3" - "@babel/helper-replace-supers" "7.0.0-rc.3" + "@babel/helper-plugin-utils" "^7.0.0" + "@babel/helper-replace-supers" "^7.1.0" -"@babel/plugin-transform-parameters@7.0.0-rc.3": - version "7.0.0-rc.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.0.0-rc.3.tgz#a4a6a013c98376f521f231e8710316903e1a00e2" +"@babel/plugin-transform-parameters@^7.1.0": + version "7.1.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.1.0.tgz#44f492f9d618c9124026e62301c296bf606a7aed" dependencies: - "@babel/helper-call-delegate" "7.0.0-rc.3" - "@babel/helper-get-function-arity" "7.0.0-rc.3" - "@babel/helper-plugin-utils" "7.0.0-rc.3" + "@babel/helper-call-delegate" "^7.1.0" + "@babel/helper-get-function-arity" "^7.0.0" + "@babel/helper-plugin-utils" "^7.0.0" -"@babel/plugin-transform-regenerator@7.0.0-rc.3": - version "7.0.0-rc.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.0.0-rc.3.tgz#d28f5dae6a2cbb3748abf4b8b89678ea3b1ff029" +"@babel/plugin-transform-regenerator@^7.0.0": + version "7.0.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.0.0.tgz#5b41686b4ed40bef874d7ed6a84bdd849c13e0c1" dependencies: regenerator-transform "^0.13.3" -"@babel/plugin-transform-shorthand-properties@7.0.0-rc.3": - version "7.0.0-rc.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.0.0-rc.3.tgz#84c3529e15e0e285b446448ac45872886ea914c1" +"@babel/plugin-transform-shorthand-properties@^7.0.0": + version "7.0.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.0.0.tgz#85f8af592dcc07647541a0350e8c95c7bf419d15" dependencies: - "@babel/helper-plugin-utils" "7.0.0-rc.3" + "@babel/helper-plugin-utils" "^7.0.0" -"@babel/plugin-transform-spread@7.0.0-rc.3": - version "7.0.0-rc.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-spread/-/plugin-transform-spread-7.0.0-rc.3.tgz#5479b400ec2401327af90d881c04ce450589d402" +"@babel/plugin-transform-spread@^7.0.0": + version "7.0.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-spread/-/plugin-transform-spread-7.0.0.tgz#93583ce48dd8c85e53f3a46056c856e4af30b49b" dependencies: - "@babel/helper-plugin-utils" "7.0.0-rc.3" + "@babel/helper-plugin-utils" "^7.0.0" -"@babel/plugin-transform-sticky-regex@7.0.0-rc.3": - version "7.0.0-rc.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.0.0-rc.3.tgz#d1c2d8cadb2783ee774d04e8504d05cf2b20b1b8" +"@babel/plugin-transform-sticky-regex@^7.0.0": + version "7.0.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.0.0.tgz#30a9d64ac2ab46eec087b8530535becd90e73366" dependencies: - "@babel/helper-plugin-utils" "7.0.0-rc.3" - "@babel/helper-regex" "7.0.0-rc.3" + "@babel/helper-plugin-utils" "^7.0.0" + "@babel/helper-regex" "^7.0.0" -"@babel/plugin-transform-template-literals@7.0.0-rc.3": - version "7.0.0-rc.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.0.0-rc.3.tgz#da10dedd6c51e9e4d35d71e6abe6cc436e4de029" +"@babel/plugin-transform-template-literals@^7.0.0": + version "7.0.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.0.0.tgz#084f1952efe5b153ddae69eb8945f882c7a97c65" dependencies: - "@babel/helper-annotate-as-pure" "7.0.0-rc.3" - "@babel/helper-plugin-utils" "7.0.0-rc.3" + "@babel/helper-annotate-as-pure" "^7.0.0" + "@babel/helper-plugin-utils" "^7.0.0" -"@babel/plugin-transform-typeof-symbol@7.0.0-rc.3": - version "7.0.0-rc.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.0.0-rc.3.tgz#6ce43fa10a4a2651c35bd4913cefd238b3610e39" +"@babel/plugin-transform-typeof-symbol@^7.0.0": + version "7.0.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.0.0.tgz#4dcf1e52e943e5267b7313bff347fdbe0f81cec9" dependencies: - "@babel/helper-plugin-utils" "7.0.0-rc.3" + "@babel/helper-plugin-utils" "^7.0.0" -"@babel/plugin-transform-unicode-regex@7.0.0-rc.3": - version "7.0.0-rc.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.0.0-rc.3.tgz#91764a332c1c1c5c9265668ef3004432006ce5c5" +"@babel/plugin-transform-unicode-regex@^7.0.0": + version "7.0.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.0.0.tgz#c6780e5b1863a76fe792d90eded9fcd5b51d68fc" dependencies: - "@babel/helper-plugin-utils" "7.0.0-rc.3" - "@babel/helper-regex" "7.0.0-rc.3" + "@babel/helper-plugin-utils" "^7.0.0" + "@babel/helper-regex" "^7.0.0" regexpu-core "^4.1.3" -"@babel/preset-env@^7.0.0-rc.3": - version "7.0.0-rc.3" - resolved "https://registry.yarnpkg.com/@babel/preset-env/-/preset-env-7.0.0-rc.3.tgz#b05748a412614bca9f754266610b6cba8f49af10" - dependencies: - "@babel/helper-module-imports" "7.0.0-rc.3" - "@babel/helper-plugin-utils" "7.0.0-rc.3" - "@babel/plugin-proposal-async-generator-functions" "7.0.0-rc.3" - "@babel/plugin-proposal-json-strings" "7.0.0-rc.3" - "@babel/plugin-proposal-object-rest-spread" "7.0.0-rc.3" - "@babel/plugin-proposal-optional-catch-binding" "7.0.0-rc.3" - "@babel/plugin-proposal-unicode-property-regex" "7.0.0-rc.3" - "@babel/plugin-syntax-async-generators" "7.0.0-rc.3" - "@babel/plugin-syntax-object-rest-spread" "7.0.0-rc.3" - "@babel/plugin-syntax-optional-catch-binding" "7.0.0-rc.3" - "@babel/plugin-transform-arrow-functions" "7.0.0-rc.3" - "@babel/plugin-transform-async-to-generator" "7.0.0-rc.3" - "@babel/plugin-transform-block-scoped-functions" "7.0.0-rc.3" - "@babel/plugin-transform-block-scoping" "7.0.0-rc.3" - "@babel/plugin-transform-classes" "7.0.0-rc.3" - "@babel/plugin-transform-computed-properties" "7.0.0-rc.3" - "@babel/plugin-transform-destructuring" "7.0.0-rc.3" - "@babel/plugin-transform-dotall-regex" "7.0.0-rc.3" - "@babel/plugin-transform-duplicate-keys" "7.0.0-rc.3" - "@babel/plugin-transform-exponentiation-operator" "7.0.0-rc.3" - "@babel/plugin-transform-for-of" "7.0.0-rc.3" - "@babel/plugin-transform-function-name" "7.0.0-rc.3" - "@babel/plugin-transform-literals" "7.0.0-rc.3" - "@babel/plugin-transform-modules-amd" "7.0.0-rc.3" - "@babel/plugin-transform-modules-commonjs" "7.0.0-rc.3" - "@babel/plugin-transform-modules-systemjs" "7.0.0-rc.3" - "@babel/plugin-transform-modules-umd" "7.0.0-rc.3" - "@babel/plugin-transform-new-target" "7.0.0-rc.3" - "@babel/plugin-transform-object-super" "7.0.0-rc.3" - "@babel/plugin-transform-parameters" "7.0.0-rc.3" - "@babel/plugin-transform-regenerator" "7.0.0-rc.3" - "@babel/plugin-transform-shorthand-properties" "7.0.0-rc.3" - "@babel/plugin-transform-spread" "7.0.0-rc.3" - "@babel/plugin-transform-sticky-regex" "7.0.0-rc.3" - "@babel/plugin-transform-template-literals" "7.0.0-rc.3" - "@babel/plugin-transform-typeof-symbol" "7.0.0-rc.3" - "@babel/plugin-transform-unicode-regex" "7.0.0-rc.3" +"@babel/preset-env@^7.1.0": + version "7.1.0" + resolved "https://registry.yarnpkg.com/@babel/preset-env/-/preset-env-7.1.0.tgz#e67ea5b0441cfeab1d6f41e9b5c79798800e8d11" + dependencies: + "@babel/helper-module-imports" "^7.0.0" + "@babel/helper-plugin-utils" "^7.0.0" + "@babel/plugin-proposal-async-generator-functions" "^7.1.0" + "@babel/plugin-proposal-json-strings" "^7.0.0" + "@babel/plugin-proposal-object-rest-spread" "^7.0.0" + "@babel/plugin-proposal-optional-catch-binding" "^7.0.0" + "@babel/plugin-proposal-unicode-property-regex" "^7.0.0" + "@babel/plugin-syntax-async-generators" "^7.0.0" + "@babel/plugin-syntax-object-rest-spread" "^7.0.0" + "@babel/plugin-syntax-optional-catch-binding" "^7.0.0" + "@babel/plugin-transform-arrow-functions" "^7.0.0" + "@babel/plugin-transform-async-to-generator" "^7.1.0" + "@babel/plugin-transform-block-scoped-functions" "^7.0.0" + "@babel/plugin-transform-block-scoping" "^7.0.0" + "@babel/plugin-transform-classes" "^7.1.0" + "@babel/plugin-transform-computed-properties" "^7.0.0" + "@babel/plugin-transform-destructuring" "^7.0.0" + "@babel/plugin-transform-dotall-regex" "^7.0.0" + "@babel/plugin-transform-duplicate-keys" "^7.0.0" + "@babel/plugin-transform-exponentiation-operator" "^7.1.0" + "@babel/plugin-transform-for-of" "^7.0.0" + "@babel/plugin-transform-function-name" "^7.1.0" + "@babel/plugin-transform-literals" "^7.0.0" + "@babel/plugin-transform-modules-amd" "^7.1.0" + "@babel/plugin-transform-modules-commonjs" "^7.1.0" + "@babel/plugin-transform-modules-systemjs" "^7.0.0" + "@babel/plugin-transform-modules-umd" "^7.1.0" + "@babel/plugin-transform-new-target" "^7.0.0" + "@babel/plugin-transform-object-super" "^7.1.0" + "@babel/plugin-transform-parameters" "^7.1.0" + "@babel/plugin-transform-regenerator" "^7.0.0" + "@babel/plugin-transform-shorthand-properties" "^7.0.0" + "@babel/plugin-transform-spread" "^7.0.0" + "@babel/plugin-transform-sticky-regex" "^7.0.0" + "@babel/plugin-transform-template-literals" "^7.0.0" + "@babel/plugin-transform-typeof-symbol" "^7.0.0" + "@babel/plugin-transform-unicode-regex" "^7.0.0" browserslist "^4.1.0" invariant "^2.2.2" js-levenshtein "^1.1.3" semver "^5.3.0" -"@babel/template@7.0.0-rc.3": - version "7.0.0-rc.3" - resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.0.0-rc.3.tgz#2ba7d00f86744762632d06a0ffb0494f8443581f" +"@babel/template@^7.1.0": + version "7.1.0" + resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.1.0.tgz#58cc9572e1bfe24fe1537fdf99d839d53e517e22" dependencies: - "@babel/code-frame" "7.0.0-rc.3" - "@babel/parser" "7.0.0-rc.3" - "@babel/types" "7.0.0-rc.3" + "@babel/code-frame" "^7.0.0" + "@babel/parser" "^7.1.0" + "@babel/types" "^7.0.0" -"@babel/traverse@7.0.0-rc.3": - version "7.0.0-rc.3" - resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.0.0-rc.3.tgz#bcf659e46d24244ab51379c849093f8c4e54d239" +"@babel/traverse@^7.1.0": + version "7.1.0" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.1.0.tgz#503ec6669387efd182c3888c4eec07bcc45d91b2" dependencies: - "@babel/code-frame" "7.0.0-rc.3" - "@babel/generator" "7.0.0-rc.3" - "@babel/helper-function-name" "7.0.0-rc.3" - "@babel/helper-split-export-declaration" "7.0.0-rc.3" - "@babel/parser" "7.0.0-rc.3" - "@babel/types" "7.0.0-rc.3" + "@babel/code-frame" "^7.0.0" + "@babel/generator" "^7.0.0" + "@babel/helper-function-name" "^7.1.0" + "@babel/helper-split-export-declaration" "^7.0.0" + "@babel/parser" "^7.1.0" + "@babel/types" "^7.0.0" debug "^3.1.0" globals "^11.1.0" lodash "^4.17.10" -"@babel/types@7.0.0-rc.3": - version "7.0.0-rc.3" - resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.0.0-rc.3.tgz#877ebc543b139f4a1e4c9bd8849c25ab9aea8f41" +"@babel/types@^7.0.0": + version "7.0.0" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.0.0.tgz#6e191793d3c854d19c6749989e3bc55f0e962118" dependencies: esutils "^2.0.2" lodash "^4.17.10" @@ -554,9 +554,9 @@ color-name@^1.1.1: version "1.1.3" resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25" -commander@^2.17.1: - version "2.17.1" - resolved "https://registry.yarnpkg.com/commander/-/commander-2.17.1.tgz#bd77ab7de6de94205ceacc72f1716d29f20a77bf" +commander@^2.18.0: + version "2.18.0" + resolved "https://registry.yarnpkg.com/commander/-/commander-2.18.0.tgz#2bf063ddee7c7891176981a2cc798e5754bc6970" convert-source-map@^1.1.0: version "1.5.1" From f9b4f4a579484e4170cfd936fa2a26dadd975df7 Mon Sep 17 00:00:00 2001 From: Globegitter Date: Sat, 22 Sep 2018 23:53:58 +0200 Subject: [PATCH 25/53] Remove es5 outputdir and add nodejs_binary example. --- examples/nodejs_binary/BUILD.bazel | 32 +++++++++++++++++++++++++++ examples/nodejs_binary/index.js | 3 +++ examples/nodejs_binary/lib.js | 7 ++++++ examples/nodejs_binary/msg.js | 1 + internal/js_library/v2/BUILD.bazel | 9 ++++++-- internal/js_library/v2/js_library.bzl | 4 ++-- 6 files changed, 52 insertions(+), 4 deletions(-) create mode 100644 examples/nodejs_binary/BUILD.bazel create mode 100644 examples/nodejs_binary/index.js create mode 100644 examples/nodejs_binary/lib.js create mode 100644 examples/nodejs_binary/msg.js diff --git a/examples/nodejs_binary/BUILD.bazel b/examples/nodejs_binary/BUILD.bazel new file mode 100644 index 0000000000..6f6cd4fc57 --- /dev/null +++ b/examples/nodejs_binary/BUILD.bazel @@ -0,0 +1,32 @@ +load("@build_bazel_rules_nodejs//:defs.bzl", "nodejs_binary") +load("@build_bazel_rules_nodejs//internal/js_library/v2:js_library.bzl", "js_library") + +js_library( + name = "msg", + srcs = ["msg.js"], +) + +js_library( + name = "lib", + srcs = ["lib.js"], + deps = [ + ":msg", + ], +) + +js_library( + name = "index_lib", + srcs = ["index.js"], + deps = [ + ":lib", + ], +) + +nodejs_binary( + name = "index", + data = [ + ":index_lib", + ], + entry_point = "build_bazel_rules_nodejs/examples/nodejs_binary/index.js", + install_source_map_support = False, +) diff --git a/examples/nodejs_binary/index.js b/examples/nodejs_binary/index.js new file mode 100644 index 0000000000..b252b94135 --- /dev/null +++ b/examples/nodejs_binary/index.js @@ -0,0 +1,3 @@ +import {printName} from './lib'; + +printName('Bazel'); diff --git a/examples/nodejs_binary/lib.js b/examples/nodejs_binary/lib.js new file mode 100644 index 0000000000..8aeaf5818e --- /dev/null +++ b/examples/nodejs_binary/lib.js @@ -0,0 +1,7 @@ +import msg from './msg'; + +const printName = (name) => console.log(`${msg} ${name}!`); + +export { + printName, +}; diff --git a/examples/nodejs_binary/msg.js b/examples/nodejs_binary/msg.js new file mode 100644 index 0000000000..f902150895 --- /dev/null +++ b/examples/nodejs_binary/msg.js @@ -0,0 +1 @@ +export default 'Hello'; diff --git a/internal/js_library/v2/BUILD.bazel b/internal/js_library/v2/BUILD.bazel index 6ad50066fe..cdfe0c91f0 100644 --- a/internal/js_library/v2/BUILD.bazel +++ b/internal/js_library/v2/BUILD.bazel @@ -8,8 +8,13 @@ exports_files(["babel.rc.js"]) nodejs_binary( name = "babel", - data = ["babel.js"], + data = [ + "babel.js", + "@build_bazel_rules_nodejs_js_library_deps//:@babel/core", + "@build_bazel_rules_nodejs_js_library_deps//:@babel/preset-env", + "@build_bazel_rules_nodejs_js_library_deps//:commander", + "@build_bazel_rules_nodejs_js_library_deps//:mkdirp", + ], entry_point = "build_bazel_rules_nodejs/internal/js_library/v2/babel.js", install_source_map_support = False, - node_modules = "@build_bazel_rules_nodejs_js_library_deps//:node_modules", ) diff --git a/internal/js_library/v2/js_library.bzl b/internal/js_library/v2/js_library.bzl index 6daec5940b..6313eafea9 100644 --- a/internal/js_library/v2/js_library.bzl +++ b/internal/js_library/v2/js_library.bzl @@ -52,7 +52,7 @@ def _babel_conversion(ctx, inputs, config, out_dir, mnemonic, description): return outputs def _es5_conversion(ctx, inputs, config): - out_dir = "es5" + out_dir = "" return _babel_conversion(ctx, inputs, config, out_dir, "JsCompile", "Babel") def _collect_sources(ctx, es5_outputs): @@ -102,7 +102,7 @@ def _js_library(ctx): ), providers = [ DefaultInfo( - files = js_providers.es6_sources, + files = js_providers.es5_sources, runfiles = ctx.runfiles( collect_data = True, collect_default = True, From 39395535ed6d1fdbeaec1bd60a675b2d5a0c558b Mon Sep 17 00:00:00 2001 From: Globegitter Date: Sat, 22 Sep 2018 23:55:23 +0200 Subject: [PATCH 26/53] Buildifier fixes. --- examples/nodejs_binary/BUILD.bazel | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/nodejs_binary/BUILD.bazel b/examples/nodejs_binary/BUILD.bazel index 6f6cd4fc57..0a8535f21f 100644 --- a/examples/nodejs_binary/BUILD.bazel +++ b/examples/nodejs_binary/BUILD.bazel @@ -10,7 +10,7 @@ js_library( name = "lib", srcs = ["lib.js"], deps = [ - ":msg", + ":msg", ], ) @@ -18,14 +18,14 @@ js_library( name = "index_lib", srcs = ["index.js"], deps = [ - ":lib", + ":lib", ], ) nodejs_binary( name = "index", data = [ - ":index_lib", + ":index_lib", ], entry_point = "build_bazel_rules_nodejs/examples/nodejs_binary/index.js", install_source_map_support = False, From 2506f8c2f0c08148ca38071267aa6e321b9e17d0 Mon Sep 17 00:00:00 2001 From: Ankit Kumar Date: Wed, 26 Sep 2018 08:54:12 -0700 Subject: [PATCH 27/53] first pass --- internal/js_library/v2/BUILD.bazel | 8 +++---- internal/js_library/v2/babel.js | 6 +++--- internal/js_library/v2/babel_executable.bzl | 10 +++++++++ internal/js_library/v2/js_library.bzl | 24 +++++++++++++++------ 4 files changed, 34 insertions(+), 14 deletions(-) create mode 100644 internal/js_library/v2/babel_executable.bzl diff --git a/internal/js_library/v2/BUILD.bazel b/internal/js_library/v2/BUILD.bazel index cdfe0c91f0..b44b4f6b84 100644 --- a/internal/js_library/v2/BUILD.bazel +++ b/internal/js_library/v2/BUILD.bazel @@ -1,4 +1,5 @@ load("@build_bazel_rules_nodejs//:defs.bzl", "nodejs_binary") +load(":babel_executable.bzl", "babel_executable") # package(default_visibility = ["//internal:__subpackages__"]) # TODO(Markus): Remove public visibility @@ -6,15 +7,12 @@ package(default_visibility = ["//visibility:public"]) exports_files(["babel.rc.js"]) -nodejs_binary( +babel_executable( name = "babel", - data = [ - "babel.js", + deps = [ "@build_bazel_rules_nodejs_js_library_deps//:@babel/core", "@build_bazel_rules_nodejs_js_library_deps//:@babel/preset-env", "@build_bazel_rules_nodejs_js_library_deps//:commander", "@build_bazel_rules_nodejs_js_library_deps//:mkdirp", ], - entry_point = "build_bazel_rules_nodejs/internal/js_library/v2/babel.js", - install_source_map_support = False, ) diff --git a/internal/js_library/v2/babel.js b/internal/js_library/v2/babel.js index 79b3ac95a2..921206ecf1 100644 --- a/internal/js_library/v2/babel.js +++ b/internal/js_library/v2/babel.js @@ -22,11 +22,11 @@ if (program['configFile']) { babelConfig = require(path.resolve(program['configFile'])); } -for (let i = 0; i < program.args.length; i += 1) { +for (let i = 0; i < program.args.length; i += 2) { const input = program.args[i]; - const output = path.join(outDir, path.basename(input)); + const output = path.join(outDir, program.args[i+1]); - return babel.transformFile(input, babelConfig, function(err, result) { + babel.transformFile(input, babelConfig, function(err, result) { if (err) { return console.error(err); } diff --git a/internal/js_library/v2/babel_executable.bzl b/internal/js_library/v2/babel_executable.bzl new file mode 100644 index 0000000000..546bf361cf --- /dev/null +++ b/internal/js_library/v2/babel_executable.bzl @@ -0,0 +1,10 @@ +load("@build_bazel_rules_nodejs//:defs.bzl", "nodejs_binary") + +def babel_executable(name, deps): + nodejs_binary( + name = name, + data = ["@build_bazel_rules_nodejs//internal/js_library/v2:babel.js"] + deps, + entry_point = "build_bazel_rules_nodejs/internal/js_library/v2/babel.js", + install_source_map_support = False, +) + diff --git a/internal/js_library/v2/js_library.bzl b/internal/js_library/v2/js_library.bzl index 6313eafea9..b832e33d5f 100644 --- a/internal/js_library/v2/js_library.bzl +++ b/internal/js_library/v2/js_library.bzl @@ -3,11 +3,18 @@ load("@bazel_skylib//:lib.bzl", "paths") +def _get_path(ctx, file): + if not file.short_path.startswith(ctx.label.package): + fail("Unable to recover a relative path: %s did not start with %s" % (file.short_path, ctx.label.package)) + + path = file.short_path[len(ctx.label.package)+1:] + return path + def _write_config(ctx): - output = ctx.actions.declare_file(paths.join(ctx.file._babelrc_tmpl.dirname, "_" + ctx.file._babelrc_tmpl.basename)) + output = ctx.actions.declare_file(paths.join(ctx.file.babelrc_tmpl.dirname, "_" + ctx.file.babelrc_tmpl.basename)) ctx.actions.expand_template( output = output, - template = ctx.file._babelrc_tmpl, + template = ctx.file.babelrc_tmpl, substitutions = { "TMPL_bin_dir_path": ctx.bin_dir.path, "TMPL_module_name": ctx.attr.module_name, @@ -20,7 +27,12 @@ def _create_babel_args(ctx, config_path, out_dir): args = ctx.actions.args() args.add("--out-dir", out) args.add("--config-file", config_path) - args.add_all(ctx.files.srcs) + all_other_args = [] + for src in ctx.files.srcs: + all_other_args.append(src) + all_other_args.append(_get_path(ctx,src)) + + args.add_all(all_other_args) return args def _trim(out_dir, src, trim, bin_dir_trim): @@ -37,7 +49,7 @@ def _declare_babel_outputs(ctx, out_dir): def _run_babel(ctx, inputs, outputs, args, mnemonic, description): ctx.actions.run( - executable = ctx.executable._babel, + executable = ctx.executable.babel, inputs = inputs, outputs = outputs, arguments = [args], @@ -132,12 +144,12 @@ js_library = rule( ), "module_name": attr.string(), "module_root": attr.string(), - "_babel": attr.label( + "babel": attr.label( executable = True, cfg="host", default = Label("//internal/js_library/v2:babel") ), - "_babelrc_tmpl": attr.label( + "babelrc_tmpl": attr.label( allow_single_file = True, default = Label("//internal/js_library/v2:babel.rc.js") ), From 63343894fc1bad6436064d155404336562520c31 Mon Sep 17 00:00:00 2001 From: Ankit Kumar Date: Wed, 26 Sep 2018 22:07:47 -0700 Subject: [PATCH 28/53] add execution requirements --- internal/js_library/v2/js_library.bzl | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/internal/js_library/v2/js_library.bzl b/internal/js_library/v2/js_library.bzl index b832e33d5f..2a3c39fcbf 100644 --- a/internal/js_library/v2/js_library.bzl +++ b/internal/js_library/v2/js_library.bzl @@ -55,6 +55,7 @@ def _run_babel(ctx, inputs, outputs, args, mnemonic, description): arguments = [args], mnemonic = mnemonic, progress_message = "Compiling Javascript (%s) %s" % (description, ctx.label), + executable_requirements = { "no-sandbox": ctx.attr.no_sandbox }, ) def _babel_conversion(ctx, inputs, config, out_dir, mnemonic, description): @@ -153,5 +154,9 @@ js_library = rule( allow_single_file = True, default = Label("//internal/js_library/v2:babel.rc.js") ), + "no_sandbox": attr.string( + doc = """The string value of no-sandbox in the execution_requirements dict of babelification""", + default = "0" + ), }, ) From ed5ba7747dc1979bb7e364fc6ded3ce3953262f5 Mon Sep 17 00:00:00 2001 From: Ankit Kumar Date: Sat, 29 Sep 2018 10:47:22 -0700 Subject: [PATCH 29/53] babelrc --- internal/js_library/v2/js_library.bzl | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/internal/js_library/v2/js_library.bzl b/internal/js_library/v2/js_library.bzl index 2a3c39fcbf..22e16d1da1 100644 --- a/internal/js_library/v2/js_library.bzl +++ b/internal/js_library/v2/js_library.bzl @@ -11,10 +11,10 @@ def _get_path(ctx, file): return path def _write_config(ctx): - output = ctx.actions.declare_file(paths.join(ctx.file.babelrc_tmpl.dirname, "_" + ctx.file.babelrc_tmpl.basename)) + output = ctx.actions.declare_file(paths.join(ctx.file._babelrc_tmpl.dirname, "_" + ctx.file._babelrc_tmpl.basename)) ctx.actions.expand_template( output = output, - template = ctx.file.babelrc_tmpl, + template = ctx.file._babelrc_tmpl, substitutions = { "TMPL_bin_dir_path": ctx.bin_dir.path, "TMPL_module_name": ctx.attr.module_name, @@ -93,7 +93,11 @@ def _collect_sources(ctx, es5_outputs): def _js_library(ctx): - config = _write_config(ctx) + if ctx.attr.babelrc: + config = ctx.attr.babelrc + else: + config = _write_config(ctx) + inputs = ctx.files.srcs + ctx.files.data + [config] es5_outputs = _es5_conversion(ctx, inputs, config) @@ -150,10 +154,15 @@ js_library = rule( cfg="host", default = Label("//internal/js_library/v2:babel") ), - "babelrc_tmpl": attr.label( + "_babelrc_tmpl": attr.label( allow_single_file = True, default = Label("//internal/js_library/v2:babel.rc.js") ), + "babelrc": attr.label( + allow_single_file = True, + mandatory = False, + default = None, + ), "no_sandbox": attr.string( doc = """The string value of no-sandbox in the execution_requirements dict of babelification""", default = "0" From 6150ac8da7812992e8497fe5e8e1709d0b0dc74e Mon Sep 17 00:00:00 2001 From: Ankit Kumar Date: Tue, 2 Oct 2018 08:15:36 -0700 Subject: [PATCH 30/53] examples --- examples/nodejs_binary/BUILD.bazel | 29 ++++ .../nodejs_binary/flowLibrary/flow.babelrc | 12 ++ examples/nodejs_binary/flowLibrary/index.js | 7 + .../nodejs_binary/flowLibrary/internalFile.js | 3 + examples/nodejs_binary/index.js | 4 + examples/nodejs_binary/someLibrary/index.js | 5 + .../nodejs_binary/someLibrary/internalFile.js | 1 + internal/js_library/v2/BUILD.bazel | 5 +- internal/js_library/v2/babel_executable.bzl | 16 +- internal/js_library/v2/js_library.bzl | 6 +- internal/js_library/v2/package.json | 2 + internal/js_library/v2/yarn.lock | 151 +++++++++++++++++- 12 files changed, 231 insertions(+), 10 deletions(-) create mode 100644 examples/nodejs_binary/flowLibrary/flow.babelrc create mode 100644 examples/nodejs_binary/flowLibrary/index.js create mode 100644 examples/nodejs_binary/flowLibrary/internalFile.js create mode 100644 examples/nodejs_binary/someLibrary/index.js create mode 100644 examples/nodejs_binary/someLibrary/internalFile.js diff --git a/examples/nodejs_binary/BUILD.bazel b/examples/nodejs_binary/BUILD.bazel index 0a8535f21f..f6e6aac198 100644 --- a/examples/nodejs_binary/BUILD.bazel +++ b/examples/nodejs_binary/BUILD.bazel @@ -1,5 +1,6 @@ load("@build_bazel_rules_nodejs//:defs.bzl", "nodejs_binary") load("@build_bazel_rules_nodejs//internal/js_library/v2:js_library.bzl", "js_library") +load("@build_bazel_rules_nodejs//internal/js_library/v2:babel_executable.bzl", "babel_executable") js_library( name = "msg", @@ -22,10 +23,38 @@ js_library( ], ) +js_library( + name = "someLibrary", + module_name = "someLibrary", + module_root = "someLibrary/index.js", + srcs = ["someLibrary/index.js", "someLibrary/internalFile.js"], +) + +babel_executable( + name = "flowBabel", + babel_deps = [ + "@build_bazel_rules_nodejs_js_library_deps//:babel-plugin-transform-flow-strip-types", + "@build_bazel_rules_nodejs_js_library_deps//:babel-plugin-transform-es2015-modules-commonjs", + ] +) + + +js_library( + name = "flowLibrary", + module_name = "flowLibrary", + module_root = "flowLibrary/index.js", + srcs = ["flowLibrary/index.js", "flowLibrary/internalFile.js"], + babel = ":flowBabel", + babelrc = "flowLibrary/flow.babelrc", +) + + nodejs_binary( name = "index", data = [ ":index_lib", + ":someLibrary", + ":flowLibrary", ], entry_point = "build_bazel_rules_nodejs/examples/nodejs_binary/index.js", install_source_map_support = False, diff --git a/examples/nodejs_binary/flowLibrary/flow.babelrc b/examples/nodejs_binary/flowLibrary/flow.babelrc new file mode 100644 index 0000000000..d59b97a7bb --- /dev/null +++ b/examples/nodejs_binary/flowLibrary/flow.babelrc @@ -0,0 +1,12 @@ +const flowStripTypes = require('babel-plugin-transform-flow-strip-types'); +const commonjs = require('babel-plugin-transform-es2015-modules-commonjs'); + + +const babelConfig = { + plugins: [ + flowStripTypes, + commonjs, + ] +}; + +module.exports = babelConfig; diff --git a/examples/nodejs_binary/flowLibrary/index.js b/examples/nodejs_binary/flowLibrary/index.js new file mode 100644 index 0000000000..d2475acdac --- /dev/null +++ b/examples/nodejs_binary/flowLibrary/index.js @@ -0,0 +1,7 @@ +// @flow + +import internalFileFlow from './internalFile'; + +export { + internalFileFlow, +}; diff --git a/examples/nodejs_binary/flowLibrary/internalFile.js b/examples/nodejs_binary/flowLibrary/internalFile.js new file mode 100644 index 0000000000..325c8a0e34 --- /dev/null +++ b/examples/nodejs_binary/flowLibrary/internalFile.js @@ -0,0 +1,3 @@ +// @flow +const message: string = 'hello from internalFile in flowLibrary'; +export default message; diff --git a/examples/nodejs_binary/index.js b/examples/nodejs_binary/index.js index b252b94135..c5b101f0e2 100644 --- a/examples/nodejs_binary/index.js +++ b/examples/nodejs_binary/index.js @@ -1,3 +1,7 @@ import {printName} from './lib'; +import {internalFile} from 'someLibrary'; +import {internalFileFlow} from 'flowLibrary'; printName('Bazel'); +console.log(`internalFile: ${internalFile}`); +console.log(`internalFileFlow: ${internalFileFlow}`); diff --git a/examples/nodejs_binary/someLibrary/index.js b/examples/nodejs_binary/someLibrary/index.js new file mode 100644 index 0000000000..8588c2c8a2 --- /dev/null +++ b/examples/nodejs_binary/someLibrary/index.js @@ -0,0 +1,5 @@ +import internalFile from './internalFile'; + +export { + internalFile, +}; diff --git a/examples/nodejs_binary/someLibrary/internalFile.js b/examples/nodejs_binary/someLibrary/internalFile.js new file mode 100644 index 0000000000..15fde06e55 --- /dev/null +++ b/examples/nodejs_binary/someLibrary/internalFile.js @@ -0,0 +1 @@ +export default 'Hello from internalFile'; diff --git a/internal/js_library/v2/BUILD.bazel b/internal/js_library/v2/BUILD.bazel index b44b4f6b84..699f443c75 100644 --- a/internal/js_library/v2/BUILD.bazel +++ b/internal/js_library/v2/BUILD.bazel @@ -9,10 +9,7 @@ exports_files(["babel.rc.js"]) babel_executable( name = "babel", - deps = [ - "@build_bazel_rules_nodejs_js_library_deps//:@babel/core", + babel_deps = [ "@build_bazel_rules_nodejs_js_library_deps//:@babel/preset-env", - "@build_bazel_rules_nodejs_js_library_deps//:commander", - "@build_bazel_rules_nodejs_js_library_deps//:mkdirp", ], ) diff --git a/internal/js_library/v2/babel_executable.bzl b/internal/js_library/v2/babel_executable.bzl index 546bf361cf..a2f9393715 100644 --- a/internal/js_library/v2/babel_executable.bzl +++ b/internal/js_library/v2/babel_executable.bzl @@ -1,9 +1,21 @@ load("@build_bazel_rules_nodejs//:defs.bzl", "nodejs_binary") -def babel_executable(name, deps): +""" +Create a viable babel executable that contains different dependencies than the default one. + +Args: + babel_deps: dependencies that will be needed for the babelrc. +""" +def babel_executable(name, babel_deps): + binary_deps = [ + "@build_bazel_rules_nodejs_js_library_deps//:@babel/core", + "@build_bazel_rules_nodejs_js_library_deps//:commander", + "@build_bazel_rules_nodejs_js_library_deps//:mkdirp", + ] + nodejs_binary( name = name, - data = ["@build_bazel_rules_nodejs//internal/js_library/v2:babel.js"] + deps, + data = ["@build_bazel_rules_nodejs//internal/js_library/v2:babel.js"] + binary_deps + babel_deps, entry_point = "build_bazel_rules_nodejs/internal/js_library/v2/babel.js", install_source_map_support = False, ) diff --git a/internal/js_library/v2/js_library.bzl b/internal/js_library/v2/js_library.bzl index 22e16d1da1..41ccaff757 100644 --- a/internal/js_library/v2/js_library.bzl +++ b/internal/js_library/v2/js_library.bzl @@ -11,7 +11,7 @@ def _get_path(ctx, file): return path def _write_config(ctx): - output = ctx.actions.declare_file(paths.join(ctx.file._babelrc_tmpl.dirname, "_" + ctx.file._babelrc_tmpl.basename)) + output = ctx.actions.declare_file('%s.babelrc' % ctx.label.name) ctx.actions.expand_template( output = output, template = ctx.file._babelrc_tmpl, @@ -55,7 +55,7 @@ def _run_babel(ctx, inputs, outputs, args, mnemonic, description): arguments = [args], mnemonic = mnemonic, progress_message = "Compiling Javascript (%s) %s" % (description, ctx.label), - executable_requirements = { "no-sandbox": ctx.attr.no_sandbox }, + execution_requirements = { "no-sandbox": ctx.attr.no_sandbox }, ) def _babel_conversion(ctx, inputs, config, out_dir, mnemonic, description): @@ -94,7 +94,7 @@ def _collect_sources(ctx, es5_outputs): def _js_library(ctx): if ctx.attr.babelrc: - config = ctx.attr.babelrc + config = ctx.file.babelrc else: config = _write_config(ctx) diff --git a/internal/js_library/v2/package.json b/internal/js_library/v2/package.json index f3e18ff4e9..966a57bf7f 100644 --- a/internal/js_library/v2/package.json +++ b/internal/js_library/v2/package.json @@ -3,6 +3,8 @@ "devDependencies": { "@babel/core": "^7.1.0", "@babel/preset-env": "^7.1.0", + "babel-plugin-transform-es2015-modules-commonjs": "^6.26.2", + "babel-plugin-transform-flow-strip-types": "^6.22.0", "commander": "^2.18.0", "mkdirp": "^0.5.1" } diff --git a/internal/js_library/v2/yarn.lock b/internal/js_library/v2/yarn.lock index a9218e6d5a..c4f5a3342a 100644 --- a/internal/js_library/v2/yarn.lock +++ b/internal/js_library/v2/yarn.lock @@ -518,12 +518,105 @@ lodash "^4.17.10" to-fast-properties "^2.0.0" +ansi-regex@^2.0.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-2.1.1.tgz#c3b33ab5ee360d86e0e628f0468ae7ef27d654df" + +ansi-styles@^2.2.1: + version "2.2.1" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe" + ansi-styles@^3.2.1: version "3.2.1" resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d" dependencies: color-convert "^1.9.0" +babel-code-frame@^6.26.0: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-code-frame/-/babel-code-frame-6.26.0.tgz#63fd43f7dc1e3bb7ce35947db8fe369a3f58c74b" + dependencies: + chalk "^1.1.3" + esutils "^2.0.2" + js-tokens "^3.0.2" + +babel-messages@^6.23.0: + version "6.23.0" + resolved "https://registry.yarnpkg.com/babel-messages/-/babel-messages-6.23.0.tgz#f3cdf4703858035b2a2951c6ec5edf6c62f2630e" + dependencies: + babel-runtime "^6.22.0" + +babel-plugin-syntax-flow@^6.18.0: + version "6.18.0" + resolved "http://registry.npmjs.org/babel-plugin-syntax-flow/-/babel-plugin-syntax-flow-6.18.0.tgz#4c3ab20a2af26aa20cd25995c398c4eb70310c8d" + +babel-plugin-transform-es2015-modules-commonjs@^6.26.2: + version "6.26.2" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-modules-commonjs/-/babel-plugin-transform-es2015-modules-commonjs-6.26.2.tgz#58a793863a9e7ca870bdc5a881117ffac27db6f3" + dependencies: + babel-plugin-transform-strict-mode "^6.24.1" + babel-runtime "^6.26.0" + babel-template "^6.26.0" + babel-types "^6.26.0" + +babel-plugin-transform-flow-strip-types@^6.22.0: + version "6.22.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-flow-strip-types/-/babel-plugin-transform-flow-strip-types-6.22.0.tgz#84cb672935d43714fdc32bce84568d87441cf7cf" + dependencies: + babel-plugin-syntax-flow "^6.18.0" + babel-runtime "^6.22.0" + +babel-plugin-transform-strict-mode@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-strict-mode/-/babel-plugin-transform-strict-mode-6.24.1.tgz#d5faf7aa578a65bbe591cf5edae04a0c67020758" + dependencies: + babel-runtime "^6.22.0" + babel-types "^6.24.1" + +babel-runtime@^6.22.0, babel-runtime@^6.26.0: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-runtime/-/babel-runtime-6.26.0.tgz#965c7058668e82b55d7bfe04ff2337bc8b5647fe" + dependencies: + core-js "^2.4.0" + regenerator-runtime "^0.11.0" + +babel-template@^6.26.0: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-template/-/babel-template-6.26.0.tgz#de03e2d16396b069f46dd9fff8521fb1a0e35e02" + dependencies: + babel-runtime "^6.26.0" + babel-traverse "^6.26.0" + babel-types "^6.26.0" + babylon "^6.18.0" + lodash "^4.17.4" + +babel-traverse@^6.26.0: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-traverse/-/babel-traverse-6.26.0.tgz#46a9cbd7edcc62c8e5c064e2d2d8d0f4035766ee" + dependencies: + 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@^6.24.1, babel-types@^6.26.0: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-types/-/babel-types-6.26.0.tgz#a3b073f94ab49eb6fa55cd65227a334380632497" + dependencies: + babel-runtime "^6.26.0" + esutils "^2.0.2" + lodash "^4.17.4" + to-fast-properties "^1.0.3" + +babylon@^6.18.0: + version "6.18.0" + resolved "https://registry.yarnpkg.com/babylon/-/babylon-6.18.0.tgz#af2f3b88fa6f5c1e4c634d1a0f8eac4f55b395e3" + browserslist@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.1.0.tgz#81cbb8e52dfa09918f93c6e051d779cb7360785d" @@ -536,6 +629,16 @@ caniuse-lite@^1.0.30000878: version "1.0.30000878" resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30000878.tgz#c644c39588dd42d3498e952234c372e5a40a4123" +chalk@^1.1.3: + version "1.1.3" + resolved "http://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz#a8115c55e4a702fe4d150abd3872822a7e09fc98" + dependencies: + 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" + chalk@^2.0.0: version "2.4.1" resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.1.tgz#18c49ab16a037b6eb0152cc83e3471338215b66e" @@ -562,6 +665,16 @@ convert-source-map@^1.1.0: version "1.5.1" resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.5.1.tgz#b8278097b9bc229365de5c62cf5fcaed8b5599e5" +core-js@^2.4.0: + version "2.5.7" + resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.5.7.tgz#f972608ff0cead68b841a16a932d0b183791814e" + +debug@^2.6.8: + version "2.6.9" + resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" + dependencies: + ms "2.0.0" + debug@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/debug/-/debug-3.1.0.tgz#5bb5a0672628b64149566ba16819e61518c67261" @@ -572,7 +685,7 @@ electron-to-chromium@^1.3.61: version "1.3.61" resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.61.tgz#a8ac295b28d0f03d85e37326fd16b6b6b17a1795" -escape-string-regexp@^1.0.5: +escape-string-regexp@^1.0.2, escape-string-regexp@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" @@ -584,6 +697,16 @@ globals@^11.1.0: version "11.5.0" resolved "https://registry.yarnpkg.com/globals/-/globals-11.5.0.tgz#6bc840de6771173b191f13d3a9c94d441ee92642" +globals@^9.18.0: + version "9.18.0" + resolved "https://registry.yarnpkg.com/globals/-/globals-9.18.0.tgz#aa3896b3e69b487f17e31ed2143d69a8e30c2d8a" + +has-ansi@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/has-ansi/-/has-ansi-2.0.0.tgz#34f5049ce1ecdf2b0649af3ef24e45ed35416d91" + dependencies: + ansi-regex "^2.0.0" + has-flag@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd" @@ -602,6 +725,10 @@ js-levenshtein@^1.1.3: version "4.0.0" resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" +js-tokens@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-3.0.2.tgz#9866df395102130e38f7f996bceb65443209c25b" + jsesc@^2.5.1: version "2.5.1" resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-2.5.1.tgz#e421a2a8e20d6b0819df28908f782526b96dd1fe" @@ -618,6 +745,10 @@ lodash@^4.17.10: version "4.17.10" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.10.tgz#1b7793cf7259ea38fb3661d4d38b3260af8ae4e7" +lodash@^4.17.4: + version "4.17.11" + resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.11.tgz#b39ea6229ef607ecd89e2c8df12536891cac9b8d" + loose-envify@^1.0.0: version "1.4.0" resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.4.0.tgz#71ee51fa7be4caec1a63839f7e682d8132d30caf" @@ -662,6 +793,10 @@ regenerate@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/regenerate/-/regenerate-1.4.0.tgz#4a856ec4b56e4077c557589cae85e7a4c8869a11" +regenerator-runtime@^0.11.0: + version "0.11.1" + resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz#be05ad7f9bf7d22e056f9726cee5017fbf19e2e9" + regenerator-transform@^0.13.3: version "0.13.3" resolved "https://registry.yarnpkg.com/regenerator-transform/-/regenerator-transform-0.13.3.tgz#264bd9ff38a8ce24b06e0636496b2c856b57bcbb" @@ -707,12 +842,26 @@ source-map@^0.5.0: version "0.5.7" resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc" +strip-ansi@^3.0.0: + version "3.0.1" + resolved "http://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz#6a385fb8853d952d5ff05d0e8aaf94278dc63dcf" + dependencies: + ansi-regex "^2.0.0" + +supports-color@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7" + supports-color@^5.3.0: version "5.4.0" resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.4.0.tgz#1c6b337402c2137605efe19f10fec390f6faab54" dependencies: has-flag "^3.0.0" +to-fast-properties@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-1.0.3.tgz#b83571fa4d8c25b82e231b06e3a3055de4ca1a47" + to-fast-properties@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-2.0.0.tgz#dc5e698cbd079265bc73e0377681a4e4e83f616e" From 8b96afc1e6d79e65d8e14b064a62b7a83666230c Mon Sep 17 00:00:00 2001 From: Ankit Kumar Date: Tue, 2 Oct 2018 08:23:44 -0700 Subject: [PATCH 31/53] diff module root --- examples/nodejs_binary/BUILD.bazel | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/nodejs_binary/BUILD.bazel b/examples/nodejs_binary/BUILD.bazel index f6e6aac198..f62adf3d8e 100644 --- a/examples/nodejs_binary/BUILD.bazel +++ b/examples/nodejs_binary/BUILD.bazel @@ -26,7 +26,7 @@ js_library( js_library( name = "someLibrary", module_name = "someLibrary", - module_root = "someLibrary/index.js", + module_root = "someLibrary", srcs = ["someLibrary/index.js", "someLibrary/internalFile.js"], ) @@ -42,7 +42,7 @@ babel_executable( js_library( name = "flowLibrary", module_name = "flowLibrary", - module_root = "flowLibrary/index.js", + module_root = "flowLibrary", srcs = ["flowLibrary/index.js", "flowLibrary/internalFile.js"], babel = ":flowBabel", babelrc = "flowLibrary/flow.babelrc", From 696856f172993bd60d15194b34ae8ad0abcaafb6 Mon Sep 17 00:00:00 2001 From: Ankit Kumar Date: Fri, 19 Oct 2018 08:33:58 -0700 Subject: [PATCH 32/53] remove deps in package --- examples/nodejs_binary/BUILD.bazel | 20 +- examples/nodejs_binary/WORKSPACE | 18 + examples/nodejs_binary/package.json | 11 + examples/nodejs_binary/yarn.lock | 892 ++++++++++++++++++++ internal/js_library/v2/BUILD.bazel | 11 +- internal/js_library/v2/babel_executable.bzl | 22 - internal/js_library/v2/js_library.bzl | 13 +- 7 files changed, 944 insertions(+), 43 deletions(-) create mode 100644 examples/nodejs_binary/WORKSPACE create mode 100644 examples/nodejs_binary/package.json create mode 100644 examples/nodejs_binary/yarn.lock delete mode 100644 internal/js_library/v2/babel_executable.bzl diff --git a/examples/nodejs_binary/BUILD.bazel b/examples/nodejs_binary/BUILD.bazel index f62adf3d8e..60d1964011 100644 --- a/examples/nodejs_binary/BUILD.bazel +++ b/examples/nodejs_binary/BUILD.bazel @@ -1,6 +1,5 @@ load("@build_bazel_rules_nodejs//:defs.bzl", "nodejs_binary") load("@build_bazel_rules_nodejs//internal/js_library/v2:js_library.bzl", "js_library") -load("@build_bazel_rules_nodejs//internal/js_library/v2:babel_executable.bzl", "babel_executable") js_library( name = "msg", @@ -30,12 +29,19 @@ js_library( srcs = ["someLibrary/index.js", "someLibrary/internalFile.js"], ) -babel_executable( +nodejs_binary( name = "flowBabel", - babel_deps = [ - "@build_bazel_rules_nodejs_js_library_deps//:babel-plugin-transform-flow-strip-types", - "@build_bazel_rules_nodejs_js_library_deps//:babel-plugin-transform-es2015-modules-commonjs", - ] + data = [ + "@build_bazel_rules_nodejs//internal/js_library/v2:babel.js", + "@nodejs_binary_example_deps//:@babel/core", + "@nodejs_binary_example_deps//:commander", + "@nodejs_binary_example_deps//:mkdirp", + "@nodejs_binary_example_deps//:@babel/preset-env", + "@nodejs_binary_example_deps//:babel-plugin-transform-flow-strip-types", + "@nodejs_binary_example_deps//:babel-plugin-transform-es2015-modules-commonjs", + ], + entry_point = "build_bazel_rules_nodejs/internal/js_library/v2/babel.js", + install_source_map_support = False, ) @@ -56,6 +62,6 @@ nodejs_binary( ":someLibrary", ":flowLibrary", ], - entry_point = "build_bazel_rules_nodejs/examples/nodejs_binary/index.js", + entry_point = "nodejs_binary_example/index.js", install_source_map_support = False, ) diff --git a/examples/nodejs_binary/WORKSPACE b/examples/nodejs_binary/WORKSPACE new file mode 100644 index 0000000000..0d941e8c04 --- /dev/null +++ b/examples/nodejs_binary/WORKSPACE @@ -0,0 +1,18 @@ +workspace(name = "nodejs_binary_example") + +local_repository( + name = "build_bazel_rules_nodejs", + path = "../..", +) +load("@build_bazel_rules_nodejs//:package.bzl", "check_rules_nodejs_version", "rules_nodejs_dependencies") +rules_nodejs_dependencies() + +load("@build_bazel_rules_nodejs//:defs.bzl", "node_repositories", "yarn_install") + +node_repositories(package_json = ["//:package.json"]) + +yarn_install( + name = "nodejs_binary_example_deps", + package_json = "@nodejs_binary_example//:package.json", + yarn_lock = "@nodejs_binary_example//:yarn.lock", +) diff --git a/examples/nodejs_binary/package.json b/examples/nodejs_binary/package.json new file mode 100644 index 0000000000..ecb5b78b7e --- /dev/null +++ b/examples/nodejs_binary/package.json @@ -0,0 +1,11 @@ +{ + "description": "dependencies for nodejs_binary example", + "devDependencies": { + "@babel/core": "^7.1.0", + "@babel/preset-env": "^7.1.0", + "babel-plugin-transform-es2015-modules-commonjs": "^6.26.2", + "babel-plugin-transform-flow-strip-types": "^6.22.0", + "commander": "^2.18.0", + "mkdirp": "^0.5.1" + } +} diff --git a/examples/nodejs_binary/yarn.lock b/examples/nodejs_binary/yarn.lock new file mode 100644 index 0000000000..1f84efb58c --- /dev/null +++ b/examples/nodejs_binary/yarn.lock @@ -0,0 +1,892 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 + + +"@babel/code-frame@^7.0.0": + version "7.0.0" + resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.0.0.tgz#06e2ab19bdb535385559aabb5ba59729482800f8" + dependencies: + "@babel/highlight" "^7.0.0" + +"@babel/core@^7.1.0": + version "7.1.2" + resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.1.2.tgz#f8d2a9ceb6832887329a7b60f9d035791400ba4e" + dependencies: + "@babel/code-frame" "^7.0.0" + "@babel/generator" "^7.1.2" + "@babel/helpers" "^7.1.2" + "@babel/parser" "^7.1.2" + "@babel/template" "^7.1.2" + "@babel/traverse" "^7.1.0" + "@babel/types" "^7.1.2" + convert-source-map "^1.1.0" + debug "^3.1.0" + json5 "^0.5.0" + lodash "^4.17.10" + resolve "^1.3.2" + semver "^5.4.1" + source-map "^0.5.0" + +"@babel/generator@^7.1.2", "@babel/generator@^7.1.3": + version "7.1.3" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.1.3.tgz#2103ec9c42d9bdad9190a6ad5ff2d456fd7b8673" + dependencies: + "@babel/types" "^7.1.3" + jsesc "^2.5.1" + lodash "^4.17.10" + source-map "^0.5.0" + trim-right "^1.0.1" + +"@babel/helper-annotate-as-pure@^7.0.0": + version "7.0.0" + resolved "https://registry.yarnpkg.com/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.0.0.tgz#323d39dd0b50e10c7c06ca7d7638e6864d8c5c32" + dependencies: + "@babel/types" "^7.0.0" + +"@babel/helper-builder-binary-assignment-operator-visitor@^7.1.0": + version "7.1.0" + resolved "https://registry.yarnpkg.com/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.1.0.tgz#6b69628dfe4087798e0c4ed98e3d4a6b2fbd2f5f" + dependencies: + "@babel/helper-explode-assignable-expression" "^7.1.0" + "@babel/types" "^7.0.0" + +"@babel/helper-call-delegate@^7.1.0": + version "7.1.0" + resolved "https://registry.yarnpkg.com/@babel/helper-call-delegate/-/helper-call-delegate-7.1.0.tgz#6a957f105f37755e8645343d3038a22e1449cc4a" + dependencies: + "@babel/helper-hoist-variables" "^7.0.0" + "@babel/traverse" "^7.1.0" + "@babel/types" "^7.0.0" + +"@babel/helper-define-map@^7.1.0": + version "7.1.0" + resolved "https://registry.yarnpkg.com/@babel/helper-define-map/-/helper-define-map-7.1.0.tgz#3b74caec329b3c80c116290887c0dd9ae468c20c" + dependencies: + "@babel/helper-function-name" "^7.1.0" + "@babel/types" "^7.0.0" + lodash "^4.17.10" + +"@babel/helper-explode-assignable-expression@^7.1.0": + version "7.1.0" + resolved "https://registry.yarnpkg.com/@babel/helper-explode-assignable-expression/-/helper-explode-assignable-expression-7.1.0.tgz#537fa13f6f1674df745b0c00ec8fe4e99681c8f6" + dependencies: + "@babel/traverse" "^7.1.0" + "@babel/types" "^7.0.0" + +"@babel/helper-function-name@^7.1.0": + version "7.1.0" + resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.1.0.tgz#a0ceb01685f73355d4360c1247f582bfafc8ff53" + dependencies: + "@babel/helper-get-function-arity" "^7.0.0" + "@babel/template" "^7.1.0" + "@babel/types" "^7.0.0" + +"@babel/helper-get-function-arity@^7.0.0": + version "7.0.0" + resolved "https://registry.yarnpkg.com/@babel/helper-get-function-arity/-/helper-get-function-arity-7.0.0.tgz#83572d4320e2a4657263734113c42868b64e49c3" + dependencies: + "@babel/types" "^7.0.0" + +"@babel/helper-hoist-variables@^7.0.0": + version "7.0.0" + resolved "https://registry.yarnpkg.com/@babel/helper-hoist-variables/-/helper-hoist-variables-7.0.0.tgz#46adc4c5e758645ae7a45deb92bab0918c23bb88" + dependencies: + "@babel/types" "^7.0.0" + +"@babel/helper-member-expression-to-functions@^7.0.0": + version "7.0.0" + resolved "https://registry.yarnpkg.com/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.0.0.tgz#8cd14b0a0df7ff00f009e7d7a436945f47c7a16f" + dependencies: + "@babel/types" "^7.0.0" + +"@babel/helper-module-imports@^7.0.0": + version "7.0.0" + resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.0.0.tgz#96081b7111e486da4d2cd971ad1a4fe216cc2e3d" + dependencies: + "@babel/types" "^7.0.0" + +"@babel/helper-module-transforms@^7.1.0": + version "7.1.0" + resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.1.0.tgz#470d4f9676d9fad50b324cdcce5fbabbc3da5787" + dependencies: + "@babel/helper-module-imports" "^7.0.0" + "@babel/helper-simple-access" "^7.1.0" + "@babel/helper-split-export-declaration" "^7.0.0" + "@babel/template" "^7.1.0" + "@babel/types" "^7.0.0" + lodash "^4.17.10" + +"@babel/helper-optimise-call-expression@^7.0.0": + version "7.0.0" + resolved "https://registry.yarnpkg.com/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.0.0.tgz#a2920c5702b073c15de51106200aa8cad20497d5" + dependencies: + "@babel/types" "^7.0.0" + +"@babel/helper-plugin-utils@^7.0.0": + version "7.0.0" + resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.0.0.tgz#bbb3fbee98661c569034237cc03967ba99b4f250" + +"@babel/helper-regex@^7.0.0": + version "7.0.0" + resolved "https://registry.yarnpkg.com/@babel/helper-regex/-/helper-regex-7.0.0.tgz#2c1718923b57f9bbe64705ffe5640ac64d9bdb27" + dependencies: + lodash "^4.17.10" + +"@babel/helper-remap-async-to-generator@^7.1.0": + version "7.1.0" + resolved "https://registry.yarnpkg.com/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.1.0.tgz#361d80821b6f38da75bd3f0785ece20a88c5fe7f" + dependencies: + "@babel/helper-annotate-as-pure" "^7.0.0" + "@babel/helper-wrap-function" "^7.1.0" + "@babel/template" "^7.1.0" + "@babel/traverse" "^7.1.0" + "@babel/types" "^7.0.0" + +"@babel/helper-replace-supers@^7.1.0": + version "7.1.0" + resolved "https://registry.yarnpkg.com/@babel/helper-replace-supers/-/helper-replace-supers-7.1.0.tgz#5fc31de522ec0ef0899dc9b3e7cf6a5dd655f362" + dependencies: + "@babel/helper-member-expression-to-functions" "^7.0.0" + "@babel/helper-optimise-call-expression" "^7.0.0" + "@babel/traverse" "^7.1.0" + "@babel/types" "^7.0.0" + +"@babel/helper-simple-access@^7.1.0": + version "7.1.0" + resolved "https://registry.yarnpkg.com/@babel/helper-simple-access/-/helper-simple-access-7.1.0.tgz#65eeb954c8c245beaa4e859da6188f39d71e585c" + dependencies: + "@babel/template" "^7.1.0" + "@babel/types" "^7.0.0" + +"@babel/helper-split-export-declaration@^7.0.0": + version "7.0.0" + resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.0.0.tgz#3aae285c0311c2ab095d997b8c9a94cad547d813" + dependencies: + "@babel/types" "^7.0.0" + +"@babel/helper-wrap-function@^7.1.0": + version "7.1.0" + resolved "https://registry.yarnpkg.com/@babel/helper-wrap-function/-/helper-wrap-function-7.1.0.tgz#8cf54e9190706067f016af8f75cb3df829cc8c66" + dependencies: + "@babel/helper-function-name" "^7.1.0" + "@babel/template" "^7.1.0" + "@babel/traverse" "^7.1.0" + "@babel/types" "^7.0.0" + +"@babel/helpers@^7.1.2": + version "7.1.2" + resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.1.2.tgz#ab752e8c35ef7d39987df4e8586c63b8846234b5" + dependencies: + "@babel/template" "^7.1.2" + "@babel/traverse" "^7.1.0" + "@babel/types" "^7.1.2" + +"@babel/highlight@^7.0.0": + version "7.0.0" + resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.0.0.tgz#f710c38c8d458e6dd9a201afb637fcb781ce99e4" + dependencies: + chalk "^2.0.0" + esutils "^2.0.2" + js-tokens "^4.0.0" + +"@babel/parser@^7.1.2", "@babel/parser@^7.1.3": + version "7.1.3" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.1.3.tgz#2c92469bac2b7fbff810b67fca07bd138b48af77" + +"@babel/plugin-proposal-async-generator-functions@^7.1.0": + version "7.1.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.1.0.tgz#41c1a702e10081456e23a7b74d891922dd1bb6ce" + dependencies: + "@babel/helper-plugin-utils" "^7.0.0" + "@babel/helper-remap-async-to-generator" "^7.1.0" + "@babel/plugin-syntax-async-generators" "^7.0.0" + +"@babel/plugin-proposal-json-strings@^7.0.0": + version "7.0.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-json-strings/-/plugin-proposal-json-strings-7.0.0.tgz#3b4d7b5cf51e1f2e70f52351d28d44fc2970d01e" + dependencies: + "@babel/helper-plugin-utils" "^7.0.0" + "@babel/plugin-syntax-json-strings" "^7.0.0" + +"@babel/plugin-proposal-object-rest-spread@^7.0.0": + version "7.0.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.0.0.tgz#9a17b547f64d0676b6c9cecd4edf74a82ab85e7e" + dependencies: + "@babel/helper-plugin-utils" "^7.0.0" + "@babel/plugin-syntax-object-rest-spread" "^7.0.0" + +"@babel/plugin-proposal-optional-catch-binding@^7.0.0": + version "7.0.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-optional-catch-binding/-/plugin-proposal-optional-catch-binding-7.0.0.tgz#b610d928fe551ff7117d42c8bb410eec312a6425" + dependencies: + "@babel/helper-plugin-utils" "^7.0.0" + "@babel/plugin-syntax-optional-catch-binding" "^7.0.0" + +"@babel/plugin-proposal-unicode-property-regex@^7.0.0": + version "7.0.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.0.0.tgz#498b39cd72536cd7c4b26177d030226eba08cd33" + dependencies: + "@babel/helper-plugin-utils" "^7.0.0" + "@babel/helper-regex" "^7.0.0" + regexpu-core "^4.2.0" + +"@babel/plugin-syntax-async-generators@^7.0.0": + version "7.0.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.0.0.tgz#bf0891dcdbf59558359d0c626fdc9490e20bc13c" + dependencies: + "@babel/helper-plugin-utils" "^7.0.0" + +"@babel/plugin-syntax-json-strings@^7.0.0": + version "7.0.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.0.0.tgz#0d259a68090e15b383ce3710e01d5b23f3770cbd" + dependencies: + "@babel/helper-plugin-utils" "^7.0.0" + +"@babel/plugin-syntax-object-rest-spread@^7.0.0": + version "7.0.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.0.0.tgz#37d8fbcaf216bd658ea1aebbeb8b75e88ebc549b" + dependencies: + "@babel/helper-plugin-utils" "^7.0.0" + +"@babel/plugin-syntax-optional-catch-binding@^7.0.0": + version "7.0.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.0.0.tgz#886f72008b3a8b185977f7cb70713b45e51ee475" + dependencies: + "@babel/helper-plugin-utils" "^7.0.0" + +"@babel/plugin-transform-arrow-functions@^7.0.0": + version "7.0.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.0.0.tgz#a6c14875848c68a3b4b3163a486535ef25c7e749" + dependencies: + "@babel/helper-plugin-utils" "^7.0.0" + +"@babel/plugin-transform-async-to-generator@^7.1.0": + version "7.1.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.1.0.tgz#109e036496c51dd65857e16acab3bafdf3c57811" + dependencies: + "@babel/helper-module-imports" "^7.0.0" + "@babel/helper-plugin-utils" "^7.0.0" + "@babel/helper-remap-async-to-generator" "^7.1.0" + +"@babel/plugin-transform-block-scoped-functions@^7.0.0": + version "7.0.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.0.0.tgz#482b3f75103927e37288b3b67b65f848e2aa0d07" + dependencies: + "@babel/helper-plugin-utils" "^7.0.0" + +"@babel/plugin-transform-block-scoping@^7.0.0": + version "7.0.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.0.0.tgz#1745075edffd7cdaf69fab2fb6f9694424b7e9bc" + dependencies: + "@babel/helper-plugin-utils" "^7.0.0" + lodash "^4.17.10" + +"@babel/plugin-transform-classes@^7.1.0": + version "7.1.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-classes/-/plugin-transform-classes-7.1.0.tgz#ab3f8a564361800cbc8ab1ca6f21108038432249" + dependencies: + "@babel/helper-annotate-as-pure" "^7.0.0" + "@babel/helper-define-map" "^7.1.0" + "@babel/helper-function-name" "^7.1.0" + "@babel/helper-optimise-call-expression" "^7.0.0" + "@babel/helper-plugin-utils" "^7.0.0" + "@babel/helper-replace-supers" "^7.1.0" + "@babel/helper-split-export-declaration" "^7.0.0" + globals "^11.1.0" + +"@babel/plugin-transform-computed-properties@^7.0.0": + version "7.0.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.0.0.tgz#2fbb8900cd3e8258f2a2ede909b90e7556185e31" + dependencies: + "@babel/helper-plugin-utils" "^7.0.0" + +"@babel/plugin-transform-destructuring@^7.0.0": + version "7.1.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.1.3.tgz#e69ff50ca01fac6cb72863c544e516c2b193012f" + dependencies: + "@babel/helper-plugin-utils" "^7.0.0" + +"@babel/plugin-transform-dotall-regex@^7.0.0": + version "7.0.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.0.0.tgz#73a24da69bc3c370251f43a3d048198546115e58" + dependencies: + "@babel/helper-plugin-utils" "^7.0.0" + "@babel/helper-regex" "^7.0.0" + regexpu-core "^4.1.3" + +"@babel/plugin-transform-duplicate-keys@^7.0.0": + version "7.0.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.0.0.tgz#a0601e580991e7cace080e4cf919cfd58da74e86" + dependencies: + "@babel/helper-plugin-utils" "^7.0.0" + +"@babel/plugin-transform-exponentiation-operator@^7.1.0": + version "7.1.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.1.0.tgz#9c34c2ee7fd77e02779cfa37e403a2e1003ccc73" + dependencies: + "@babel/helper-builder-binary-assignment-operator-visitor" "^7.1.0" + "@babel/helper-plugin-utils" "^7.0.0" + +"@babel/plugin-transform-for-of@^7.0.0": + version "7.0.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.0.0.tgz#f2ba4eadb83bd17dc3c7e9b30f4707365e1c3e39" + dependencies: + "@babel/helper-plugin-utils" "^7.0.0" + +"@babel/plugin-transform-function-name@^7.1.0": + version "7.1.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.1.0.tgz#29c5550d5c46208e7f730516d41eeddd4affadbb" + dependencies: + "@babel/helper-function-name" "^7.1.0" + "@babel/helper-plugin-utils" "^7.0.0" + +"@babel/plugin-transform-literals@^7.0.0": + version "7.0.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-literals/-/plugin-transform-literals-7.0.0.tgz#2aec1d29cdd24c407359c930cdd89e914ee8ff86" + dependencies: + "@babel/helper-plugin-utils" "^7.0.0" + +"@babel/plugin-transform-modules-amd@^7.1.0": + version "7.1.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.1.0.tgz#f9e0a7072c12e296079b5a59f408ff5b97bf86a8" + dependencies: + "@babel/helper-module-transforms" "^7.1.0" + "@babel/helper-plugin-utils" "^7.0.0" + +"@babel/plugin-transform-modules-commonjs@^7.1.0": + version "7.1.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.1.0.tgz#0a9d86451cbbfb29bd15186306897c67f6f9a05c" + dependencies: + "@babel/helper-module-transforms" "^7.1.0" + "@babel/helper-plugin-utils" "^7.0.0" + "@babel/helper-simple-access" "^7.1.0" + +"@babel/plugin-transform-modules-systemjs@^7.0.0": + version "7.1.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.1.3.tgz#2119a3e3db612fd74a19d88652efbfe9613a5db0" + dependencies: + "@babel/helper-hoist-variables" "^7.0.0" + "@babel/helper-plugin-utils" "^7.0.0" + +"@babel/plugin-transform-modules-umd@^7.1.0": + version "7.1.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.1.0.tgz#a29a7d85d6f28c3561c33964442257cc6a21f2a8" + dependencies: + "@babel/helper-module-transforms" "^7.1.0" + "@babel/helper-plugin-utils" "^7.0.0" + +"@babel/plugin-transform-new-target@^7.0.0": + version "7.0.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.0.0.tgz#ae8fbd89517fa7892d20e6564e641e8770c3aa4a" + dependencies: + "@babel/helper-plugin-utils" "^7.0.0" + +"@babel/plugin-transform-object-super@^7.1.0": + version "7.1.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.1.0.tgz#b1ae194a054b826d8d4ba7ca91486d4ada0f91bb" + dependencies: + "@babel/helper-plugin-utils" "^7.0.0" + "@babel/helper-replace-supers" "^7.1.0" + +"@babel/plugin-transform-parameters@^7.1.0": + version "7.1.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.1.0.tgz#44f492f9d618c9124026e62301c296bf606a7aed" + dependencies: + "@babel/helper-call-delegate" "^7.1.0" + "@babel/helper-get-function-arity" "^7.0.0" + "@babel/helper-plugin-utils" "^7.0.0" + +"@babel/plugin-transform-regenerator@^7.0.0": + version "7.0.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.0.0.tgz#5b41686b4ed40bef874d7ed6a84bdd849c13e0c1" + dependencies: + regenerator-transform "^0.13.3" + +"@babel/plugin-transform-shorthand-properties@^7.0.0": + version "7.0.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.0.0.tgz#85f8af592dcc07647541a0350e8c95c7bf419d15" + dependencies: + "@babel/helper-plugin-utils" "^7.0.0" + +"@babel/plugin-transform-spread@^7.0.0": + version "7.0.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-spread/-/plugin-transform-spread-7.0.0.tgz#93583ce48dd8c85e53f3a46056c856e4af30b49b" + dependencies: + "@babel/helper-plugin-utils" "^7.0.0" + +"@babel/plugin-transform-sticky-regex@^7.0.0": + version "7.0.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.0.0.tgz#30a9d64ac2ab46eec087b8530535becd90e73366" + dependencies: + "@babel/helper-plugin-utils" "^7.0.0" + "@babel/helper-regex" "^7.0.0" + +"@babel/plugin-transform-template-literals@^7.0.0": + version "7.0.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.0.0.tgz#084f1952efe5b153ddae69eb8945f882c7a97c65" + dependencies: + "@babel/helper-annotate-as-pure" "^7.0.0" + "@babel/helper-plugin-utils" "^7.0.0" + +"@babel/plugin-transform-typeof-symbol@^7.0.0": + version "7.0.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.0.0.tgz#4dcf1e52e943e5267b7313bff347fdbe0f81cec9" + dependencies: + "@babel/helper-plugin-utils" "^7.0.0" + +"@babel/plugin-transform-unicode-regex@^7.0.0": + version "7.0.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.0.0.tgz#c6780e5b1863a76fe792d90eded9fcd5b51d68fc" + dependencies: + "@babel/helper-plugin-utils" "^7.0.0" + "@babel/helper-regex" "^7.0.0" + regexpu-core "^4.1.3" + +"@babel/preset-env@^7.1.0": + version "7.1.0" + resolved "https://registry.yarnpkg.com/@babel/preset-env/-/preset-env-7.1.0.tgz#e67ea5b0441cfeab1d6f41e9b5c79798800e8d11" + dependencies: + "@babel/helper-module-imports" "^7.0.0" + "@babel/helper-plugin-utils" "^7.0.0" + "@babel/plugin-proposal-async-generator-functions" "^7.1.0" + "@babel/plugin-proposal-json-strings" "^7.0.0" + "@babel/plugin-proposal-object-rest-spread" "^7.0.0" + "@babel/plugin-proposal-optional-catch-binding" "^7.0.0" + "@babel/plugin-proposal-unicode-property-regex" "^7.0.0" + "@babel/plugin-syntax-async-generators" "^7.0.0" + "@babel/plugin-syntax-object-rest-spread" "^7.0.0" + "@babel/plugin-syntax-optional-catch-binding" "^7.0.0" + "@babel/plugin-transform-arrow-functions" "^7.0.0" + "@babel/plugin-transform-async-to-generator" "^7.1.0" + "@babel/plugin-transform-block-scoped-functions" "^7.0.0" + "@babel/plugin-transform-block-scoping" "^7.0.0" + "@babel/plugin-transform-classes" "^7.1.0" + "@babel/plugin-transform-computed-properties" "^7.0.0" + "@babel/plugin-transform-destructuring" "^7.0.0" + "@babel/plugin-transform-dotall-regex" "^7.0.0" + "@babel/plugin-transform-duplicate-keys" "^7.0.0" + "@babel/plugin-transform-exponentiation-operator" "^7.1.0" + "@babel/plugin-transform-for-of" "^7.0.0" + "@babel/plugin-transform-function-name" "^7.1.0" + "@babel/plugin-transform-literals" "^7.0.0" + "@babel/plugin-transform-modules-amd" "^7.1.0" + "@babel/plugin-transform-modules-commonjs" "^7.1.0" + "@babel/plugin-transform-modules-systemjs" "^7.0.0" + "@babel/plugin-transform-modules-umd" "^7.1.0" + "@babel/plugin-transform-new-target" "^7.0.0" + "@babel/plugin-transform-object-super" "^7.1.0" + "@babel/plugin-transform-parameters" "^7.1.0" + "@babel/plugin-transform-regenerator" "^7.0.0" + "@babel/plugin-transform-shorthand-properties" "^7.0.0" + "@babel/plugin-transform-spread" "^7.0.0" + "@babel/plugin-transform-sticky-regex" "^7.0.0" + "@babel/plugin-transform-template-literals" "^7.0.0" + "@babel/plugin-transform-typeof-symbol" "^7.0.0" + "@babel/plugin-transform-unicode-regex" "^7.0.0" + browserslist "^4.1.0" + invariant "^2.2.2" + js-levenshtein "^1.1.3" + semver "^5.3.0" + +"@babel/template@^7.1.0", "@babel/template@^7.1.2": + version "7.1.2" + resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.1.2.tgz#090484a574fef5a2d2d7726a674eceda5c5b5644" + dependencies: + "@babel/code-frame" "^7.0.0" + "@babel/parser" "^7.1.2" + "@babel/types" "^7.1.2" + +"@babel/traverse@^7.1.0": + version "7.1.4" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.1.4.tgz#f4f83b93d649b4b2c91121a9087fa2fa949ec2b4" + dependencies: + "@babel/code-frame" "^7.0.0" + "@babel/generator" "^7.1.3" + "@babel/helper-function-name" "^7.1.0" + "@babel/helper-split-export-declaration" "^7.0.0" + "@babel/parser" "^7.1.3" + "@babel/types" "^7.1.3" + debug "^3.1.0" + globals "^11.1.0" + lodash "^4.17.10" + +"@babel/types@^7.0.0", "@babel/types@^7.1.2", "@babel/types@^7.1.3": + version "7.1.3" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.1.3.tgz#3a767004567060c2f40fca49a304712c525ee37d" + dependencies: + esutils "^2.0.2" + lodash "^4.17.10" + to-fast-properties "^2.0.0" + +ansi-regex@^2.0.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-2.1.1.tgz#c3b33ab5ee360d86e0e628f0468ae7ef27d654df" + +ansi-styles@^2.2.1: + version "2.2.1" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe" + +ansi-styles@^3.2.1: + version "3.2.1" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d" + dependencies: + color-convert "^1.9.0" + +babel-code-frame@^6.26.0: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-code-frame/-/babel-code-frame-6.26.0.tgz#63fd43f7dc1e3bb7ce35947db8fe369a3f58c74b" + dependencies: + chalk "^1.1.3" + esutils "^2.0.2" + js-tokens "^3.0.2" + +babel-messages@^6.23.0: + version "6.23.0" + resolved "https://registry.yarnpkg.com/babel-messages/-/babel-messages-6.23.0.tgz#f3cdf4703858035b2a2951c6ec5edf6c62f2630e" + dependencies: + babel-runtime "^6.22.0" + +babel-plugin-syntax-flow@^6.18.0: + version "6.18.0" + resolved "http://registry.npmjs.org/babel-plugin-syntax-flow/-/babel-plugin-syntax-flow-6.18.0.tgz#4c3ab20a2af26aa20cd25995c398c4eb70310c8d" + +babel-plugin-transform-es2015-modules-commonjs@^6.26.2: + version "6.26.2" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-modules-commonjs/-/babel-plugin-transform-es2015-modules-commonjs-6.26.2.tgz#58a793863a9e7ca870bdc5a881117ffac27db6f3" + dependencies: + babel-plugin-transform-strict-mode "^6.24.1" + babel-runtime "^6.26.0" + babel-template "^6.26.0" + babel-types "^6.26.0" + +babel-plugin-transform-flow-strip-types@^6.22.0: + version "6.22.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-flow-strip-types/-/babel-plugin-transform-flow-strip-types-6.22.0.tgz#84cb672935d43714fdc32bce84568d87441cf7cf" + dependencies: + babel-plugin-syntax-flow "^6.18.0" + babel-runtime "^6.22.0" + +babel-plugin-transform-strict-mode@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-strict-mode/-/babel-plugin-transform-strict-mode-6.24.1.tgz#d5faf7aa578a65bbe591cf5edae04a0c67020758" + dependencies: + babel-runtime "^6.22.0" + babel-types "^6.24.1" + +babel-runtime@^6.22.0, babel-runtime@^6.26.0: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-runtime/-/babel-runtime-6.26.0.tgz#965c7058668e82b55d7bfe04ff2337bc8b5647fe" + dependencies: + core-js "^2.4.0" + regenerator-runtime "^0.11.0" + +babel-template@^6.26.0: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-template/-/babel-template-6.26.0.tgz#de03e2d16396b069f46dd9fff8521fb1a0e35e02" + dependencies: + babel-runtime "^6.26.0" + babel-traverse "^6.26.0" + babel-types "^6.26.0" + babylon "^6.18.0" + lodash "^4.17.4" + +babel-traverse@^6.26.0: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-traverse/-/babel-traverse-6.26.0.tgz#46a9cbd7edcc62c8e5c064e2d2d8d0f4035766ee" + dependencies: + 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@^6.24.1, babel-types@^6.26.0: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-types/-/babel-types-6.26.0.tgz#a3b073f94ab49eb6fa55cd65227a334380632497" + dependencies: + babel-runtime "^6.26.0" + esutils "^2.0.2" + lodash "^4.17.4" + to-fast-properties "^1.0.3" + +babylon@^6.18.0: + version "6.18.0" + resolved "https://registry.yarnpkg.com/babylon/-/babylon-6.18.0.tgz#af2f3b88fa6f5c1e4c634d1a0f8eac4f55b395e3" + +browserslist@^4.1.0: + version "4.2.1" + resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.2.1.tgz#257a24c879d1cd4016348eee5c25de683260b21d" + dependencies: + caniuse-lite "^1.0.30000890" + electron-to-chromium "^1.3.79" + node-releases "^1.0.0-alpha.14" + +caniuse-lite@^1.0.30000890: + version "1.0.30000893" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30000893.tgz#284b20932bd41b93e21626975f2050cb01561986" + +chalk@^1.1.3: + version "1.1.3" + resolved "http://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz#a8115c55e4a702fe4d150abd3872822a7e09fc98" + dependencies: + 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" + +chalk@^2.0.0: + version "2.4.1" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.1.tgz#18c49ab16a037b6eb0152cc83e3471338215b66e" + dependencies: + ansi-styles "^3.2.1" + escape-string-regexp "^1.0.5" + supports-color "^5.3.0" + +color-convert@^1.9.0: + version "1.9.3" + resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.3.tgz#bb71850690e1f136567de629d2d5471deda4c1e8" + dependencies: + color-name "1.1.3" + +color-name@1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25" + +commander@^2.18.0: + version "2.19.0" + resolved "https://registry.yarnpkg.com/commander/-/commander-2.19.0.tgz#f6198aa84e5b83c46054b94ddedbfed5ee9ff12a" + +convert-source-map@^1.1.0: + version "1.6.0" + resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.6.0.tgz#51b537a8c43e0f04dec1993bffcdd504e758ac20" + dependencies: + safe-buffer "~5.1.1" + +core-js@^2.4.0: + version "2.5.7" + resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.5.7.tgz#f972608ff0cead68b841a16a932d0b183791814e" + +debug@^2.6.8: + version "2.6.9" + resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" + dependencies: + ms "2.0.0" + +debug@^3.1.0: + version "3.2.6" + resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.6.tgz#e83d17de16d8a7efb7717edbe5fb10135eee629b" + dependencies: + ms "^2.1.1" + +electron-to-chromium@^1.3.79: + version "1.3.80" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.80.tgz#e99ec7efe64c2c6a269d3885ff411ea88852fa53" + +escape-string-regexp@^1.0.2, escape-string-regexp@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" + +esutils@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.2.tgz#0abf4f1caa5bcb1f7a9d8acc6dea4faaa04bac9b" + +globals@^11.1.0: + version "11.8.0" + resolved "https://registry.yarnpkg.com/globals/-/globals-11.8.0.tgz#c1ef45ee9bed6badf0663c5cb90e8d1adec1321d" + +globals@^9.18.0: + version "9.18.0" + resolved "https://registry.yarnpkg.com/globals/-/globals-9.18.0.tgz#aa3896b3e69b487f17e31ed2143d69a8e30c2d8a" + +has-ansi@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/has-ansi/-/has-ansi-2.0.0.tgz#34f5049ce1ecdf2b0649af3ef24e45ed35416d91" + dependencies: + ansi-regex "^2.0.0" + +has-flag@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd" + +invariant@^2.2.2: + version "2.2.4" + resolved "https://registry.yarnpkg.com/invariant/-/invariant-2.2.4.tgz#610f3c92c9359ce1db616e538008d23ff35158e6" + dependencies: + loose-envify "^1.0.0" + +js-levenshtein@^1.1.3: + version "1.1.4" + resolved "https://registry.yarnpkg.com/js-levenshtein/-/js-levenshtein-1.1.4.tgz#3a56e3cbf589ca0081eb22cd9ba0b1290a16d26e" + +"js-tokens@^3.0.0 || ^4.0.0", js-tokens@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" + +js-tokens@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-3.0.2.tgz#9866df395102130e38f7f996bceb65443209c25b" + +jsesc@^2.5.1: + version "2.5.1" + resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-2.5.1.tgz#e421a2a8e20d6b0819df28908f782526b96dd1fe" + +jsesc@~0.5.0: + version "0.5.0" + resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-0.5.0.tgz#e7dee66e35d6fc16f710fe91d5cf69f70f08911d" + +json5@^0.5.0: + version "0.5.1" + resolved "http://registry.npmjs.org/json5/-/json5-0.5.1.tgz#1eade7acc012034ad84e2396767ead9fa5495821" + +lodash@^4.17.10, lodash@^4.17.4: + version "4.17.11" + resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.11.tgz#b39ea6229ef607ecd89e2c8df12536891cac9b8d" + +loose-envify@^1.0.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.4.0.tgz#71ee51fa7be4caec1a63839f7e682d8132d30caf" + dependencies: + js-tokens "^3.0.0 || ^4.0.0" + +minimist@0.0.8: + version "0.0.8" + resolved "http://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d" + +mkdirp@^0.5.1: + version "0.5.1" + resolved "http://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903" + dependencies: + minimist "0.0.8" + +ms@2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" + +ms@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.1.tgz#30a5864eb3ebb0a66f2ebe6d727af06a09d86e0a" + +node-releases@^1.0.0-alpha.14: + version "1.0.0-alpha.14" + resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-1.0.0-alpha.14.tgz#da9e2780add4bbb59ad890af9e2018a1d9c0034b" + dependencies: + semver "^5.3.0" + +path-parse@^1.0.5: + version "1.0.6" + resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.6.tgz#d62dbb5679405d72c4737ec58600e9ddcf06d24c" + +private@^0.1.6: + version "0.1.8" + resolved "https://registry.yarnpkg.com/private/-/private-0.1.8.tgz#2381edb3689f7a53d653190060fcf822d2f368ff" + +regenerate-unicode-properties@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/regenerate-unicode-properties/-/regenerate-unicode-properties-7.0.0.tgz#107405afcc4a190ec5ed450ecaa00ed0cafa7a4c" + dependencies: + regenerate "^1.4.0" + +regenerate@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/regenerate/-/regenerate-1.4.0.tgz#4a856ec4b56e4077c557589cae85e7a4c8869a11" + +regenerator-runtime@^0.11.0: + version "0.11.1" + resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz#be05ad7f9bf7d22e056f9726cee5017fbf19e2e9" + +regenerator-transform@^0.13.3: + version "0.13.3" + resolved "https://registry.yarnpkg.com/regenerator-transform/-/regenerator-transform-0.13.3.tgz#264bd9ff38a8ce24b06e0636496b2c856b57bcbb" + dependencies: + private "^0.1.6" + +regexpu-core@^4.1.3, regexpu-core@^4.2.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/regexpu-core/-/regexpu-core-4.2.0.tgz#a3744fa03806cffe146dea4421a3e73bdcc47b1d" + dependencies: + regenerate "^1.4.0" + regenerate-unicode-properties "^7.0.0" + regjsgen "^0.4.0" + regjsparser "^0.3.0" + unicode-match-property-ecmascript "^1.0.4" + unicode-match-property-value-ecmascript "^1.0.2" + +regjsgen@^0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/regjsgen/-/regjsgen-0.4.0.tgz#c1eb4c89a209263f8717c782591523913ede2561" + +regjsparser@^0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/regjsparser/-/regjsparser-0.3.0.tgz#3c326da7fcfd69fa0d332575a41c8c0cdf588c96" + dependencies: + jsesc "~0.5.0" + +resolve@^1.3.2: + version "1.8.1" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.8.1.tgz#82f1ec19a423ac1fbd080b0bab06ba36e84a7a26" + dependencies: + path-parse "^1.0.5" + +safe-buffer@~5.1.1: + version "5.1.2" + resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d" + +semver@^5.3.0, semver@^5.4.1: + version "5.6.0" + resolved "https://registry.yarnpkg.com/semver/-/semver-5.6.0.tgz#7e74256fbaa49c75aa7c7a205cc22799cac80004" + +source-map@^0.5.0: + version "0.5.7" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc" + +strip-ansi@^3.0.0: + version "3.0.1" + resolved "http://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz#6a385fb8853d952d5ff05d0e8aaf94278dc63dcf" + dependencies: + ansi-regex "^2.0.0" + +supports-color@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7" + +supports-color@^5.3.0: + version "5.5.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f" + dependencies: + has-flag "^3.0.0" + +to-fast-properties@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-1.0.3.tgz#b83571fa4d8c25b82e231b06e3a3055de4ca1a47" + +to-fast-properties@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-2.0.0.tgz#dc5e698cbd079265bc73e0377681a4e4e83f616e" + +trim-right@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/trim-right/-/trim-right-1.0.1.tgz#cb2e1203067e0c8de1f614094b9fe45704ea6003" + +unicode-canonical-property-names-ecmascript@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-1.0.4.tgz#2619800c4c825800efdd8343af7dd9933cbe2818" + +unicode-match-property-ecmascript@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/unicode-match-property-ecmascript/-/unicode-match-property-ecmascript-1.0.4.tgz#8ed2a32569961bce9227d09cd3ffbb8fed5f020c" + dependencies: + unicode-canonical-property-names-ecmascript "^1.0.4" + unicode-property-aliases-ecmascript "^1.0.4" + +unicode-match-property-value-ecmascript@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/unicode-match-property-value-ecmascript/-/unicode-match-property-value-ecmascript-1.0.2.tgz#9f1dc76926d6ccf452310564fd834ace059663d4" + +unicode-property-aliases-ecmascript@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/unicode-property-aliases-ecmascript/-/unicode-property-aliases-ecmascript-1.0.4.tgz#5a533f31b4317ea76f17d807fa0d116546111dd0" diff --git a/internal/js_library/v2/BUILD.bazel b/internal/js_library/v2/BUILD.bazel index 699f443c75..8d627f8fab 100644 --- a/internal/js_library/v2/BUILD.bazel +++ b/internal/js_library/v2/BUILD.bazel @@ -1,5 +1,4 @@ load("@build_bazel_rules_nodejs//:defs.bzl", "nodejs_binary") -load(":babel_executable.bzl", "babel_executable") # package(default_visibility = ["//internal:__subpackages__"]) # TODO(Markus): Remove public visibility @@ -7,9 +6,15 @@ package(default_visibility = ["//visibility:public"]) exports_files(["babel.rc.js"]) -babel_executable( +nodejs_binary( name = "babel", - babel_deps = [ + data = [ + "@build_bazel_rules_nodejs_js_library_deps//:@babel/core", + "@build_bazel_rules_nodejs_js_library_deps//:commander", + "@build_bazel_rules_nodejs_js_library_deps//:mkdirp", "@build_bazel_rules_nodejs_js_library_deps//:@babel/preset-env", + "@build_bazel_rules_nodejs//internal/js_library/v2:babel.js", ], + entry_point = "build_bazel_rules_nodejs/internal/js_library/v2/babel.js", + install_source_map_support = False, ) diff --git a/internal/js_library/v2/babel_executable.bzl b/internal/js_library/v2/babel_executable.bzl deleted file mode 100644 index a2f9393715..0000000000 --- a/internal/js_library/v2/babel_executable.bzl +++ /dev/null @@ -1,22 +0,0 @@ -load("@build_bazel_rules_nodejs//:defs.bzl", "nodejs_binary") - -""" -Create a viable babel executable that contains different dependencies than the default one. - -Args: - babel_deps: dependencies that will be needed for the babelrc. -""" -def babel_executable(name, babel_deps): - binary_deps = [ - "@build_bazel_rules_nodejs_js_library_deps//:@babel/core", - "@build_bazel_rules_nodejs_js_library_deps//:commander", - "@build_bazel_rules_nodejs_js_library_deps//:mkdirp", - ] - - nodejs_binary( - name = name, - data = ["@build_bazel_rules_nodejs//internal/js_library/v2:babel.js"] + binary_deps + babel_deps, - entry_point = "build_bazel_rules_nodejs/internal/js_library/v2/babel.js", - install_source_map_support = False, -) - diff --git a/internal/js_library/v2/js_library.bzl b/internal/js_library/v2/js_library.bzl index 41ccaff757..e20b4d5371 100644 --- a/internal/js_library/v2/js_library.bzl +++ b/internal/js_library/v2/js_library.bzl @@ -7,7 +7,7 @@ def _get_path(ctx, file): if not file.short_path.startswith(ctx.label.package): fail("Unable to recover a relative path: %s did not start with %s" % (file.short_path, ctx.label.package)) - path = file.short_path[len(ctx.label.package)+1:] + path = file.short_path[len(ctx.label.package):] return path def _write_config(ctx): @@ -35,17 +35,8 @@ def _create_babel_args(ctx, config_path, out_dir): args.add_all(all_other_args) return args -def _trim(out_dir, src, trim, bin_dir_trim): - if src.is_source: - src_path = src.path[trim:] - else: - src_path = src.path[bin_dir_trim:] - return paths.join(out_dir, src_path) - def _declare_babel_outputs(ctx, out_dir): - trim = len(paths.join(ctx.label.workspace_root, ctx.label.package) + "/") - bin_dir_trim = trim + len(ctx.bin_dir.path + "/") - return [ctx.actions.declare_file(_trim(out_dir, src, trim, bin_dir_trim)) for src in ctx.files.srcs] + return [ctx.actions.declare_file(paths.join(out_dir, _get_path(ctx, src))) for src in ctx.files.srcs] def _run_babel(ctx, inputs, outputs, args, mnemonic, description): ctx.actions.run( From 524642aa6b688750ebb7ecc797644828778c0239 Mon Sep 17 00:00:00 2001 From: Ankit Kumar Date: Fri, 19 Oct 2018 08:34:35 -0700 Subject: [PATCH 33/53] remove from internal packagejson --- internal/js_library/v2/package.json | 2 -- 1 file changed, 2 deletions(-) diff --git a/internal/js_library/v2/package.json b/internal/js_library/v2/package.json index 966a57bf7f..f3e18ff4e9 100644 --- a/internal/js_library/v2/package.json +++ b/internal/js_library/v2/package.json @@ -3,8 +3,6 @@ "devDependencies": { "@babel/core": "^7.1.0", "@babel/preset-env": "^7.1.0", - "babel-plugin-transform-es2015-modules-commonjs": "^6.26.2", - "babel-plugin-transform-flow-strip-types": "^6.22.0", "commander": "^2.18.0", "mkdirp": "^0.5.1" } From b8e8dc5c9d2dcd07e6b0244d4a583bf9cf61f269 Mon Sep 17 00:00:00 2001 From: Ankit Kumar Date: Fri, 19 Oct 2018 08:43:53 -0700 Subject: [PATCH 34/53] trim --- internal/js_library/v2/js_library.bzl | 6 +- internal/js_library/v2/yarn.lock | 151 +------------------------- 2 files changed, 6 insertions(+), 151 deletions(-) diff --git a/internal/js_library/v2/js_library.bzl b/internal/js_library/v2/js_library.bzl index e20b4d5371..b141dc7905 100644 --- a/internal/js_library/v2/js_library.bzl +++ b/internal/js_library/v2/js_library.bzl @@ -7,7 +7,11 @@ def _get_path(ctx, file): if not file.short_path.startswith(ctx.label.package): fail("Unable to recover a relative path: %s did not start with %s" % (file.short_path, ctx.label.package)) - path = file.short_path[len(ctx.label.package):] + trim = 0 + if len(ctx.label.package) > 0: + trim = len(ctx.label.package) + 1 # +1 for the slash + + path = file.short_path[trim:] return path def _write_config(ctx): diff --git a/internal/js_library/v2/yarn.lock b/internal/js_library/v2/yarn.lock index c4f5a3342a..a9218e6d5a 100644 --- a/internal/js_library/v2/yarn.lock +++ b/internal/js_library/v2/yarn.lock @@ -518,105 +518,12 @@ lodash "^4.17.10" to-fast-properties "^2.0.0" -ansi-regex@^2.0.0: - version "2.1.1" - resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-2.1.1.tgz#c3b33ab5ee360d86e0e628f0468ae7ef27d654df" - -ansi-styles@^2.2.1: - version "2.2.1" - resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe" - ansi-styles@^3.2.1: version "3.2.1" resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d" dependencies: color-convert "^1.9.0" -babel-code-frame@^6.26.0: - version "6.26.0" - resolved "https://registry.yarnpkg.com/babel-code-frame/-/babel-code-frame-6.26.0.tgz#63fd43f7dc1e3bb7ce35947db8fe369a3f58c74b" - dependencies: - chalk "^1.1.3" - esutils "^2.0.2" - js-tokens "^3.0.2" - -babel-messages@^6.23.0: - version "6.23.0" - resolved "https://registry.yarnpkg.com/babel-messages/-/babel-messages-6.23.0.tgz#f3cdf4703858035b2a2951c6ec5edf6c62f2630e" - dependencies: - babel-runtime "^6.22.0" - -babel-plugin-syntax-flow@^6.18.0: - version "6.18.0" - resolved "http://registry.npmjs.org/babel-plugin-syntax-flow/-/babel-plugin-syntax-flow-6.18.0.tgz#4c3ab20a2af26aa20cd25995c398c4eb70310c8d" - -babel-plugin-transform-es2015-modules-commonjs@^6.26.2: - version "6.26.2" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-modules-commonjs/-/babel-plugin-transform-es2015-modules-commonjs-6.26.2.tgz#58a793863a9e7ca870bdc5a881117ffac27db6f3" - dependencies: - babel-plugin-transform-strict-mode "^6.24.1" - babel-runtime "^6.26.0" - babel-template "^6.26.0" - babel-types "^6.26.0" - -babel-plugin-transform-flow-strip-types@^6.22.0: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-flow-strip-types/-/babel-plugin-transform-flow-strip-types-6.22.0.tgz#84cb672935d43714fdc32bce84568d87441cf7cf" - dependencies: - babel-plugin-syntax-flow "^6.18.0" - babel-runtime "^6.22.0" - -babel-plugin-transform-strict-mode@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-strict-mode/-/babel-plugin-transform-strict-mode-6.24.1.tgz#d5faf7aa578a65bbe591cf5edae04a0c67020758" - dependencies: - babel-runtime "^6.22.0" - babel-types "^6.24.1" - -babel-runtime@^6.22.0, babel-runtime@^6.26.0: - version "6.26.0" - resolved "https://registry.yarnpkg.com/babel-runtime/-/babel-runtime-6.26.0.tgz#965c7058668e82b55d7bfe04ff2337bc8b5647fe" - dependencies: - core-js "^2.4.0" - regenerator-runtime "^0.11.0" - -babel-template@^6.26.0: - version "6.26.0" - resolved "https://registry.yarnpkg.com/babel-template/-/babel-template-6.26.0.tgz#de03e2d16396b069f46dd9fff8521fb1a0e35e02" - dependencies: - babel-runtime "^6.26.0" - babel-traverse "^6.26.0" - babel-types "^6.26.0" - babylon "^6.18.0" - lodash "^4.17.4" - -babel-traverse@^6.26.0: - version "6.26.0" - resolved "https://registry.yarnpkg.com/babel-traverse/-/babel-traverse-6.26.0.tgz#46a9cbd7edcc62c8e5c064e2d2d8d0f4035766ee" - dependencies: - 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@^6.24.1, babel-types@^6.26.0: - version "6.26.0" - resolved "https://registry.yarnpkg.com/babel-types/-/babel-types-6.26.0.tgz#a3b073f94ab49eb6fa55cd65227a334380632497" - dependencies: - babel-runtime "^6.26.0" - esutils "^2.0.2" - lodash "^4.17.4" - to-fast-properties "^1.0.3" - -babylon@^6.18.0: - version "6.18.0" - resolved "https://registry.yarnpkg.com/babylon/-/babylon-6.18.0.tgz#af2f3b88fa6f5c1e4c634d1a0f8eac4f55b395e3" - browserslist@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.1.0.tgz#81cbb8e52dfa09918f93c6e051d779cb7360785d" @@ -629,16 +536,6 @@ caniuse-lite@^1.0.30000878: version "1.0.30000878" resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30000878.tgz#c644c39588dd42d3498e952234c372e5a40a4123" -chalk@^1.1.3: - version "1.1.3" - resolved "http://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz#a8115c55e4a702fe4d150abd3872822a7e09fc98" - dependencies: - 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" - chalk@^2.0.0: version "2.4.1" resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.1.tgz#18c49ab16a037b6eb0152cc83e3471338215b66e" @@ -665,16 +562,6 @@ convert-source-map@^1.1.0: version "1.5.1" resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.5.1.tgz#b8278097b9bc229365de5c62cf5fcaed8b5599e5" -core-js@^2.4.0: - version "2.5.7" - resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.5.7.tgz#f972608ff0cead68b841a16a932d0b183791814e" - -debug@^2.6.8: - version "2.6.9" - resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" - dependencies: - ms "2.0.0" - debug@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/debug/-/debug-3.1.0.tgz#5bb5a0672628b64149566ba16819e61518c67261" @@ -685,7 +572,7 @@ electron-to-chromium@^1.3.61: version "1.3.61" resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.61.tgz#a8ac295b28d0f03d85e37326fd16b6b6b17a1795" -escape-string-regexp@^1.0.2, escape-string-regexp@^1.0.5: +escape-string-regexp@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" @@ -697,16 +584,6 @@ globals@^11.1.0: version "11.5.0" resolved "https://registry.yarnpkg.com/globals/-/globals-11.5.0.tgz#6bc840de6771173b191f13d3a9c94d441ee92642" -globals@^9.18.0: - version "9.18.0" - resolved "https://registry.yarnpkg.com/globals/-/globals-9.18.0.tgz#aa3896b3e69b487f17e31ed2143d69a8e30c2d8a" - -has-ansi@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/has-ansi/-/has-ansi-2.0.0.tgz#34f5049ce1ecdf2b0649af3ef24e45ed35416d91" - dependencies: - ansi-regex "^2.0.0" - has-flag@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd" @@ -725,10 +602,6 @@ js-levenshtein@^1.1.3: version "4.0.0" resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" -js-tokens@^3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-3.0.2.tgz#9866df395102130e38f7f996bceb65443209c25b" - jsesc@^2.5.1: version "2.5.1" resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-2.5.1.tgz#e421a2a8e20d6b0819df28908f782526b96dd1fe" @@ -745,10 +618,6 @@ lodash@^4.17.10: version "4.17.10" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.10.tgz#1b7793cf7259ea38fb3661d4d38b3260af8ae4e7" -lodash@^4.17.4: - version "4.17.11" - resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.11.tgz#b39ea6229ef607ecd89e2c8df12536891cac9b8d" - loose-envify@^1.0.0: version "1.4.0" resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.4.0.tgz#71ee51fa7be4caec1a63839f7e682d8132d30caf" @@ -793,10 +662,6 @@ regenerate@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/regenerate/-/regenerate-1.4.0.tgz#4a856ec4b56e4077c557589cae85e7a4c8869a11" -regenerator-runtime@^0.11.0: - version "0.11.1" - resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz#be05ad7f9bf7d22e056f9726cee5017fbf19e2e9" - regenerator-transform@^0.13.3: version "0.13.3" resolved "https://registry.yarnpkg.com/regenerator-transform/-/regenerator-transform-0.13.3.tgz#264bd9ff38a8ce24b06e0636496b2c856b57bcbb" @@ -842,26 +707,12 @@ source-map@^0.5.0: version "0.5.7" resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc" -strip-ansi@^3.0.0: - version "3.0.1" - resolved "http://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz#6a385fb8853d952d5ff05d0e8aaf94278dc63dcf" - dependencies: - ansi-regex "^2.0.0" - -supports-color@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7" - supports-color@^5.3.0: version "5.4.0" resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.4.0.tgz#1c6b337402c2137605efe19f10fec390f6faab54" dependencies: has-flag "^3.0.0" -to-fast-properties@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-1.0.3.tgz#b83571fa4d8c25b82e231b06e3a3055de4ca1a47" - to-fast-properties@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-2.0.0.tgz#dc5e698cbd079265bc73e0377681a4e4e83f616e" From 8a74cd6364085914b65ee4268d3e7753f1292405 Mon Sep 17 00:00:00 2001 From: globegitter Date: Sat, 20 Oct 2018 23:50:05 +0200 Subject: [PATCH 35/53] Small refactor of example workspace and _get_path function. --- WORKSPACE | 10 +++++++- examples/nodejs_binary/BUILD.bazel | 12 +++++----- examples/nodejs_binary/WORKSPACE | 7 ++---- examples/nodejs_binary/setup_workspace.bzl | 28 ++++++++++++++++++++++ internal/js_library/v2/js_library.bzl | 22 ++++++++++------- 5 files changed, 59 insertions(+), 20 deletions(-) create mode 100644 examples/nodejs_binary/setup_workspace.bzl diff --git a/WORKSPACE b/WORKSPACE index de00422b16..1aa2aaf075 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -31,11 +31,17 @@ local_repository( name = "packages_example", path = "examples/packages", ) + local_repository( name = "devserver_example", path = "examples/devserver", ) +local_repository( + name = "nodejs_binary_example", + path = "examples/nodejs_binary", +) + local_repository( name = "bazel_managed_deps_example", path = "examples/bazel_managed_deps", @@ -83,12 +89,14 @@ node_repositories( # bazel run @nodejs//:npm load("@packages_example//:setup_workspace.bzl", "packages_example_setup_workspace") - packages_example_setup_workspace() load("@devserver_example//:setup_workspace.bzl", "devserver_example_setup_workspace") devserver_example_setup_workspace() +load("@nodejs_binary_example//:setup_workspace.bzl", "nodejs_binary_example_setup_workspace") +nodejs_binary_example_setup_workspace() + # Dependencies to run skydoc load("@io_bazel_rules_sass//sass:sass_repositories.bzl", "sass_repositories") sass_repositories() diff --git a/examples/nodejs_binary/BUILD.bazel b/examples/nodejs_binary/BUILD.bazel index 60d1964011..887fde9271 100644 --- a/examples/nodejs_binary/BUILD.bazel +++ b/examples/nodejs_binary/BUILD.bazel @@ -33,12 +33,12 @@ nodejs_binary( name = "flowBabel", data = [ "@build_bazel_rules_nodejs//internal/js_library/v2:babel.js", - "@nodejs_binary_example_deps//:@babel/core", - "@nodejs_binary_example_deps//:commander", - "@nodejs_binary_example_deps//:mkdirp", - "@nodejs_binary_example_deps//:@babel/preset-env", - "@nodejs_binary_example_deps//:babel-plugin-transform-flow-strip-types", - "@nodejs_binary_example_deps//:babel-plugin-transform-es2015-modules-commonjs", + "@nodejs_binary_example_yarn_install//:@babel/core", + "@nodejs_binary_example_yarn_install//:commander", + "@nodejs_binary_example_yarn_install//:mkdirp", + "@nodejs_binary_example_yarn_install//:@babel/preset-env", + "@nodejs_binary_example_yarn_install//:babel-plugin-transform-flow-strip-types", + "@nodejs_binary_example_yarn_install//:babel-plugin-transform-es2015-modules-commonjs", ], entry_point = "build_bazel_rules_nodejs/internal/js_library/v2/babel.js", install_source_map_support = False, diff --git a/examples/nodejs_binary/WORKSPACE b/examples/nodejs_binary/WORKSPACE index 0d941e8c04..c2a7f3269d 100644 --- a/examples/nodejs_binary/WORKSPACE +++ b/examples/nodejs_binary/WORKSPACE @@ -11,8 +11,5 @@ load("@build_bazel_rules_nodejs//:defs.bzl", "node_repositories", "yarn_install" node_repositories(package_json = ["//:package.json"]) -yarn_install( - name = "nodejs_binary_example_deps", - package_json = "@nodejs_binary_example//:package.json", - yarn_lock = "@nodejs_binary_example//:yarn.lock", -) +load("//:setup_workspace.bzl", "nodejs_binary_example_setup_workspace") +nodejs_binary_example_setup_workspace() \ No newline at end of file diff --git a/examples/nodejs_binary/setup_workspace.bzl b/examples/nodejs_binary/setup_workspace.bzl new file mode 100644 index 0000000000..4733b34f45 --- /dev/null +++ b/examples/nodejs_binary/setup_workspace.bzl @@ -0,0 +1,28 @@ +# Copyright 2017 The Bazel Authors. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +"""Helper function to setup @package_example workspace. +""" + +load("@build_bazel_rules_nodejs//:defs.bzl", "yarn_install") + +def nodejs_binary_example_setup_workspace(): + """Node repositories for @nodejs_binary_example + """ + yarn_install( + name = "nodejs_binary_example_yarn_install", + package_json = "@nodejs_binary_example//:package.json", + yarn_lock = "@nodejs_binary_example//:yarn.lock", + ) + diff --git a/internal/js_library/v2/js_library.bzl b/internal/js_library/v2/js_library.bzl index b141dc7905..9a0b61cfa7 100644 --- a/internal/js_library/v2/js_library.bzl +++ b/internal/js_library/v2/js_library.bzl @@ -3,15 +3,21 @@ load("@bazel_skylib//:lib.bzl", "paths") -def _get_path(ctx, file): - if not file.short_path.startswith(ctx.label.package): - fail("Unable to recover a relative path: %s did not start with %s" % (file.short_path, ctx.label.package)) - +# get the path of the file relative the the package "root" +def _get_package_path(ctx, file): trim = 0 + # for targets in external workspaces + if len(ctx.label.workspace_root) > 0: + trim += len(ctx.label.workspace_root) + 1 # +1 for the slash + if len(ctx.label.package) > 0: - trim = len(ctx.label.package) + 1 # +1 for the slash + trim += len(ctx.label.package) + 1 # +1 for the slash + + # generated files live in the bin-dir + if not file.is_source: + trim += len(ctx.bin_dir.path) + 1 # +1 for the slash - path = file.short_path[trim:] + path = file.path[trim:] return path def _write_config(ctx): @@ -34,13 +40,13 @@ def _create_babel_args(ctx, config_path, out_dir): all_other_args = [] for src in ctx.files.srcs: all_other_args.append(src) - all_other_args.append(_get_path(ctx,src)) + all_other_args.append(_get_package_path(ctx, src)) args.add_all(all_other_args) return args def _declare_babel_outputs(ctx, out_dir): - return [ctx.actions.declare_file(paths.join(out_dir, _get_path(ctx, src))) for src in ctx.files.srcs] + return [ctx.actions.declare_file(paths.join(out_dir, _get_package_path(ctx, src))) for src in ctx.files.srcs] def _run_babel(ctx, inputs, outputs, args, mnemonic, description): ctx.actions.run( From 389cb54c0c7af8d73ea92ab87fae8c984bdfd8ba Mon Sep 17 00:00:00 2001 From: globegitter Date: Sun, 21 Oct 2018 00:10:55 +0200 Subject: [PATCH 36/53] Run buildifier. --- examples/nodejs_binary/BUILD.bazel | 24 ++++++++++++++---------- internal/js_library/v2/BUILD.bazel | 4 ++-- 2 files changed, 16 insertions(+), 12 deletions(-) diff --git a/examples/nodejs_binary/BUILD.bazel b/examples/nodejs_binary/BUILD.bazel index 887fde9271..ea0d055033 100644 --- a/examples/nodejs_binary/BUILD.bazel +++ b/examples/nodejs_binary/BUILD.bazel @@ -24,9 +24,12 @@ js_library( js_library( name = "someLibrary", + srcs = [ + "someLibrary/index.js", + "someLibrary/internalFile.js", + ], module_name = "someLibrary", module_root = "someLibrary", - srcs = ["someLibrary/index.js", "someLibrary/internalFile.js"], ) nodejs_binary( @@ -34,33 +37,34 @@ nodejs_binary( data = [ "@build_bazel_rules_nodejs//internal/js_library/v2:babel.js", "@nodejs_binary_example_yarn_install//:@babel/core", - "@nodejs_binary_example_yarn_install//:commander", - "@nodejs_binary_example_yarn_install//:mkdirp", "@nodejs_binary_example_yarn_install//:@babel/preset-env", - "@nodejs_binary_example_yarn_install//:babel-plugin-transform-flow-strip-types", "@nodejs_binary_example_yarn_install//:babel-plugin-transform-es2015-modules-commonjs", + "@nodejs_binary_example_yarn_install//:babel-plugin-transform-flow-strip-types", + "@nodejs_binary_example_yarn_install//:commander", + "@nodejs_binary_example_yarn_install//:mkdirp", ], entry_point = "build_bazel_rules_nodejs/internal/js_library/v2/babel.js", install_source_map_support = False, ) - js_library( name = "flowLibrary", - module_name = "flowLibrary", - module_root = "flowLibrary", - srcs = ["flowLibrary/index.js", "flowLibrary/internalFile.js"], + srcs = [ + "flowLibrary/index.js", + "flowLibrary/internalFile.js", + ], babel = ":flowBabel", babelrc = "flowLibrary/flow.babelrc", + module_name = "flowLibrary", + module_root = "flowLibrary", ) - nodejs_binary( name = "index", data = [ + ":flowLibrary", ":index_lib", ":someLibrary", - ":flowLibrary", ], entry_point = "nodejs_binary_example/index.js", install_source_map_support = False, diff --git a/internal/js_library/v2/BUILD.bazel b/internal/js_library/v2/BUILD.bazel index 8d627f8fab..4bbc14d8fa 100644 --- a/internal/js_library/v2/BUILD.bazel +++ b/internal/js_library/v2/BUILD.bazel @@ -9,11 +9,11 @@ exports_files(["babel.rc.js"]) nodejs_binary( name = "babel", data = [ + "@build_bazel_rules_nodejs//internal/js_library/v2:babel.js", "@build_bazel_rules_nodejs_js_library_deps//:@babel/core", + "@build_bazel_rules_nodejs_js_library_deps//:@babel/preset-env", "@build_bazel_rules_nodejs_js_library_deps//:commander", "@build_bazel_rules_nodejs_js_library_deps//:mkdirp", - "@build_bazel_rules_nodejs_js_library_deps//:@babel/preset-env", - "@build_bazel_rules_nodejs//internal/js_library/v2:babel.js", ], entry_point = "build_bazel_rules_nodejs/internal/js_library/v2/babel.js", install_source_map_support = False, From 3acac7ad9fcc6f8b1f11232413b37fc040acca5a Mon Sep 17 00:00:00 2001 From: globegitter Date: Sun, 21 Oct 2018 00:20:45 +0200 Subject: [PATCH 37/53] Fix package reference. --- examples/nodejs_binary/BUILD.bazel | 12 ++++++------ internal/js_library/v2/BUILD.bazel | 8 ++++---- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/examples/nodejs_binary/BUILD.bazel b/examples/nodejs_binary/BUILD.bazel index ea0d055033..c8cf1ac173 100644 --- a/examples/nodejs_binary/BUILD.bazel +++ b/examples/nodejs_binary/BUILD.bazel @@ -36,12 +36,12 @@ nodejs_binary( name = "flowBabel", data = [ "@build_bazel_rules_nodejs//internal/js_library/v2:babel.js", - "@nodejs_binary_example_yarn_install//:@babel/core", - "@nodejs_binary_example_yarn_install//:@babel/preset-env", - "@nodejs_binary_example_yarn_install//:babel-plugin-transform-es2015-modules-commonjs", - "@nodejs_binary_example_yarn_install//:babel-plugin-transform-flow-strip-types", - "@nodejs_binary_example_yarn_install//:commander", - "@nodejs_binary_example_yarn_install//:mkdirp", + "@nodejs_binary_example_yarn_install//@babel/core", + "@nodejs_binary_example_yarn_install//@babel/preset-env", + "@nodejs_binary_example_yarn_install//babel-plugin-transform-es2015-modules-commonjs", + "@nodejs_binary_example_yarn_install//babel-plugin-transform-flow-strip-types", + "@nodejs_binary_example_yarn_install//commander", + "@nodejs_binary_example_yarn_install//mkdirp", ], entry_point = "build_bazel_rules_nodejs/internal/js_library/v2/babel.js", install_source_map_support = False, diff --git a/internal/js_library/v2/BUILD.bazel b/internal/js_library/v2/BUILD.bazel index 4bbc14d8fa..73ee35dadb 100644 --- a/internal/js_library/v2/BUILD.bazel +++ b/internal/js_library/v2/BUILD.bazel @@ -10,10 +10,10 @@ nodejs_binary( name = "babel", data = [ "@build_bazel_rules_nodejs//internal/js_library/v2:babel.js", - "@build_bazel_rules_nodejs_js_library_deps//:@babel/core", - "@build_bazel_rules_nodejs_js_library_deps//:@babel/preset-env", - "@build_bazel_rules_nodejs_js_library_deps//:commander", - "@build_bazel_rules_nodejs_js_library_deps//:mkdirp", + "@build_bazel_rules_nodejs_js_library_deps//@babel/core", + "@build_bazel_rules_nodejs_js_library_deps//@babel/preset-env", + "@build_bazel_rules_nodejs_js_library_deps//commander", + "@build_bazel_rules_nodejs_js_library_deps//mkdirp", ], entry_point = "build_bazel_rules_nodejs/internal/js_library/v2/babel.js", install_source_map_support = False, From 496d72ff2ea771dcdafdfb7fc0de01a7149b3554 Mon Sep 17 00:00:00 2001 From: globegitter Date: Sun, 21 Oct 2018 00:34:01 +0200 Subject: [PATCH 38/53] Update rules typescript for working devserver. --- examples/devserver/WORKSPACE | 6 +++--- package.bzl | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/examples/devserver/WORKSPACE b/examples/devserver/WORKSPACE index 062b89c1da..3bd640fa65 100644 --- a/examples/devserver/WORKSPACE +++ b/examples/devserver/WORKSPACE @@ -35,9 +35,9 @@ http_archive( http_archive( name = "build_bazel_rules_typescript", - url = "https://github.com/bazelbuild/rules_typescript/archive/0.16.1.zip", - strip_prefix = "rules_typescript-0.16.1", - sha256 = "5b2b0bc63cfcffe7bf97cad2dad3b26a73362f806de66207051f66c87956a995", + url = "https://github.com/bazelbuild/rules_typescript/archive/0.20.3.zip", + strip_prefix = "rules_typescript-0.20.3", + sha256 = "2a03b23c30c5109ab0863cfa60acce73ceb56337d41efc2dd67f8455a1c1d5f3", ) load("@build_bazel_rules_nodejs//:defs.bzl", "node_repositories") diff --git a/package.bzl b/package.bzl index c61238ffe6..e57fc927c1 100644 --- a/package.bzl +++ b/package.bzl @@ -106,9 +106,9 @@ def rules_nodejs_dev_dependencies(): http_archive( name = "build_bazel_rules_typescript", - url = "https://github.com/bazelbuild/rules_typescript/archive/0.16.1.zip", - strip_prefix = "rules_typescript-0.16.1", - sha256 = "5b2b0bc63cfcffe7bf97cad2dad3b26a73362f806de66207051f66c87956a995", + url = "https://github.com/bazelbuild/rules_typescript/archive/0.20.3.zip", + strip_prefix = "rules_typescript-0.20.3", + sha256 = "2a03b23c30c5109ab0863cfa60acce73ceb56337d41efc2dd67f8455a1c1d5f3", ) http_archive( From b1853423346fda830432fda27827d29353618752 Mon Sep 17 00:00:00 2001 From: globegitter Date: Sun, 21 Oct 2018 00:44:40 +0200 Subject: [PATCH 39/53] Test new examples. --- .circleci/config.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index be96c1f4fd..942df88c2b 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -84,11 +84,14 @@ jobs: - run: bazel run //internal/node/test:has_deps - run: bazel run //internal/node/test:has_deps_hybrid - run: bazel run @fine_grained_deps_yarn//typescript/bin:tsc + - run: bazel run @nodejs_binary_example//:index # We should also be able to test targets in a different workspace - run: bazel test @program_example//... - run: bazel test @packages_example//... - run: bazel build @devserver_example//... + - run: bazel build @nodejs_binary_example//... + - save_cache: key: *cache_key From a96fa2a96cb0ae502d05a769727fe2d73526b3d7 Mon Sep 17 00:00:00 2001 From: globegitter Date: Thu, 25 Oct 2018 11:51:52 +0200 Subject: [PATCH 40/53] Fix package.bzl. --- package.bzl | 5 ----- 1 file changed, 5 deletions(-) diff --git a/package.bzl b/package.bzl index 8a079f1151..99cb09aab1 100644 --- a/package.bzl +++ b/package.bzl @@ -129,13 +129,8 @@ def rules_nodejs_dev_dependencies(): # Go is a transitive dependency of buildifier http_archive( name = "io_bazel_rules_go", -<<<<<<< HEAD - urls = ["https://github.com/bazelbuild/rules_go/releases/download/0.14.0/rules_go-0.14.0.tar.gz"], - sha256 = "5756a4ad75b3703eb68249d50e23f5d64eaf1593e886b9aa931aa6e938c4e301", -======= url = "https://github.com/bazelbuild/rules_go/releases/download/0.16.0/rules_go-0.16.0.tar.gz", sha256 = "ee5fe78fe417c685ecb77a0a725dc9f6040ae5beb44a0ba4ddb55453aad23a8a", ->>>>>>> master ) # Fetching the Bazel source code allows us to compile the Skylark linter From 6ddea2e9c7ade861a321301d7292c914968a11e1 Mon Sep 17 00:00:00 2001 From: globegitter Date: Thu, 25 Oct 2018 12:00:43 +0200 Subject: [PATCH 41/53] Remove todo and unwanted deps. --- WORKSPACE | 12 ------------ internal/rollup/rollup_bundle.bzl | 1 - package.bzl | 20 -------------------- 3 files changed, 33 deletions(-) diff --git a/WORKSPACE b/WORKSPACE index b711fe24dd..4875007f0e 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -94,18 +94,6 @@ load("@io_bazel_rules_go//go:def.bzl", "go_rules_dependencies", "go_register_too go_rules_dependencies() go_register_toolchains() -load("@bazel_gazelle//:deps.bzl", "gazelle_dependencies") -gazelle_dependencies() - -load("@io_bazel_rules_webtesting//web:repositories.bzl", "browser_repositories", "web_test_repositories") -web_test_repositories() -browser_repositories( - chromium = True, -) - -load("@build_bazel_rules_typescript//:defs.bzl", "ts_setup_workspace") -ts_setup_workspace() - # # Install npm dependencies for tests # diff --git a/internal/rollup/rollup_bundle.bzl b/internal/rollup/rollup_bundle.bzl index e6c5c0a409..d2165460a2 100644 --- a/internal/rollup/rollup_bundle.bzl +++ b/internal/rollup/rollup_bundle.bzl @@ -430,7 +430,6 @@ def _rollup_bundle(ctx): # Generate the bundles rollup_config = write_rollup_config(ctx) run_rollup(ctx, collect_es6_sources(ctx), rollup_config, ctx.outputs.build_es6) - # TODO - fix source maps - run babel??? _run_tsc(ctx, ctx.outputs.build_es6, ctx.outputs.build_es5) source_map = run_uglify(ctx, ctx.outputs.build_es5, ctx.outputs.build_es5_min) run_uglify(ctx, ctx.outputs.build_es5, ctx.outputs.build_es5_min_debug, debug = True) diff --git a/package.bzl b/package.bzl index 99cb09aab1..46d9cd9a20 100644 --- a/package.bzl +++ b/package.bzl @@ -106,26 +106,6 @@ def rules_nodejs_dev_dependencies(): sha256 = "d8b663c41039dfd84f3ad26d04f9df3122af090f73816b3ffb8c0df660e1fc74", ) - http_archive( - name = "build_bazel_rules_typescript", - url = "https://github.com/bazelbuild/rules_typescript/archive/0.20.3.zip", - strip_prefix = "rules_typescript-0.20.3", - sha256 = "2a03b23c30c5109ab0863cfa60acce73ceb56337d41efc2dd67f8455a1c1d5f3", - ) - - http_archive( - name = "io_bazel_rules_webtesting", - url = "https://github.com/bazelbuild/rules_webtesting/archive/0.2.1.zip", - strip_prefix = "rules_webtesting-0.2.1", - sha256 = "7d490aadff9b5262e5251fa69427ab2ffd1548422467cb9f9e1d110e2c36f0fa", - ) - - http_archive( - name = "bazel_gazelle", - urls = ["https://github.com/bazelbuild/bazel-gazelle/releases/download/0.14.0/bazel-gazelle-0.14.0.tar.gz"], - sha256 = "c0a5739d12c6d05b6c1ad56f2200cb0b57c5a70e03ebd2f7b87ce88cabf09c7b", - ) - # Go is a transitive dependency of buildifier http_archive( name = "io_bazel_rules_go", From a95cf698abb7b83de3e847c601409c9a25f16106 Mon Sep 17 00:00:00 2001 From: globegitter Date: Thu, 25 Oct 2018 12:18:24 +0200 Subject: [PATCH 42/53] Add mock ts_devserver. --- examples/devserver/src/BUILD.bazel | 4 +- internal/common/typescript_mock_devserver.bzl | 128 ++++++++++++++++++ 2 files changed, 130 insertions(+), 2 deletions(-) create mode 100644 internal/common/typescript_mock_devserver.bzl diff --git a/examples/devserver/src/BUILD.bazel b/examples/devserver/src/BUILD.bazel index cde1ff6dfa..7c5e16f0b7 100644 --- a/examples/devserver/src/BUILD.bazel +++ b/examples/devserver/src/BUILD.bazel @@ -5,7 +5,7 @@ load("@build_bazel_rules_nodejs//internal/js_library/v2:js_library.bzl", "js_library") load("@build_bazel_rules_nodejs//:defs.bzl", "rollup_bundle") -load("@build_bazel_rules_typescript//:defs.bzl", "ts_devserver") +load("@build_bazel_rules_nodejs//:internal/common/typescript_mock_devserver.bzl", "mock_typescript_devserver") js_library( name = "module", @@ -27,7 +27,7 @@ js_library( ], ) -ts_devserver( +mock_typescript_devserver( name = "devserver", # Note: This will only work now when called from the top-level workspace, otherwise it would # just be src/test diff --git a/internal/common/typescript_mock_devserver.bzl b/internal/common/typescript_mock_devserver.bzl new file mode 100644 index 0000000000..f912685803 --- /dev/null +++ b/internal/common/typescript_mock_devserver.bzl @@ -0,0 +1,128 @@ +# Copyright 2017 The Bazel Authors. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +"""A mock ts_devserver rule. + +Allows testing that babel_library will work with ts_devserver from +rules_typescript without introducing a circular dependency between +rules_nodejs and rules_typescript repositories. +""" + +load( + "@build_bazel_rules_nodejs//internal:node.bzl", + "sources_aspect", +) +load( + "@build_bazel_rules_nodejs//internal/js_library:js_library.bzl", + "write_amd_names_shim", +) + +def _mock_mock_typescript_devserver(ctx): + files = depset() + for d in ctx.attr.deps: + if hasattr(d, "node_sources"): + files = depset(transitive = [files, d.node_sources]) + elif hasattr(d, "files"): + files = depset(transitive = [files, d.files]) + + if ctx.label.workspace_root: + # We need the workspace_name for the target being visited. + # Skylark doesn't have this - instead they have a workspace_root + # which looks like "external/repo_name" - so grab the second path segment. + # TODO(alexeagle): investigate a better way to get the workspace name + workspace_name = ctx.label.workspace_root.split("/")[1] + else: + workspace_name = ctx.workspace_name + + # Create a manifest file with the sources in arbitrary order, and without + # bazel-bin prefixes ("root-relative paths"). + # TODO(alexeagle): we should experiment with keeping the files toposorted, to + # see if we can get performance gains out of the module loader. + ctx.actions.write(ctx.outputs.manifest, "".join([ + workspace_name + "/" + f.short_path + "\n" + for f in files + ])) + + amd_names_shim = ctx.actions.declare_file( + "_%s.amd_names_shim.js" % ctx.label.name, + sibling = ctx.outputs.manifest, + ) + write_amd_names_shim(ctx.actions, amd_names_shim, ctx.attr.bootstrap) + + # Requirejs is always needed so its included as the first script + # in script_files before any user specified scripts for the devserver + # to concat in order. + script_files = [] + script_files.extend(ctx.files.bootstrap) + script_files.append(amd_names_shim) + script_files.extend(ctx.files.scripts) + ctx.actions.write(ctx.outputs.scripts_manifest, "".join([ + workspace_name + "/" + f.short_path + "\n" + for f in script_files + ])) + + devserver_runfiles = [ + ctx.outputs.manifest, + ctx.outputs.scripts_manifest, + ] + devserver_runfiles += ctx.files.static_files + devserver_runfiles += script_files + + serving_arg = "" + if ctx.attr.serving_path: + serving_arg = "-serving_path=%s" % ctx.attr.serving_path + + packages = depset(["/".join([workspace_name, ctx.label.package])] + ctx.attr.additional_root_paths) + + return [DefaultInfo( + runfiles = ctx.runfiles( + files = devserver_runfiles, + transitive_files = depset(ctx.files.data, transitive = [files]), + collect_data = True, + collect_default = True, + ), + )] + + +mock_typescript_devserver = rule( + implementation = _mock_mock_typescript_devserver, + attrs = { + "deps": attr.label_list( + allow_files = True, + aspects = [sources_aspect], + ), + "serving_path": attr.string(), + "data": attr.label_list( + allow_files = True, + ), + "static_files": attr.label_list( + allow_files = True, + ), + "scripts": attr.label_list( + allow_files = [".js"], + ), + "entry_module": attr.string(), + "bootstrap": attr.label_list( + allow_files = [".js"], + ), + "additional_root_paths": attr.string_list(), + "port": attr.int( + default = 5432, + ), + }, + outputs = { + "manifest": "%{name}.MF", + "scripts_manifest": "scripts_%{name}.MF", + }, +) From ccd352ab7a7e2507234faae480a3a5ca574afa9a Mon Sep 17 00:00:00 2001 From: globegitter Date: Thu, 25 Oct 2018 12:33:45 +0200 Subject: [PATCH 43/53] Improve docs. --- internal/common/typescript_mock_devserver.bzl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/internal/common/typescript_mock_devserver.bzl b/internal/common/typescript_mock_devserver.bzl index f912685803..d5236f1885 100644 --- a/internal/common/typescript_mock_devserver.bzl +++ b/internal/common/typescript_mock_devserver.bzl @@ -16,7 +16,9 @@ Allows testing that babel_library will work with ts_devserver from rules_typescript without introducing a circular dependency between -rules_nodejs and rules_typescript repositories. +rules_nodejs and rules_typescript repositories. This does not actually create +an executable but just has the same logic as the real ts_devserver and writes +out the same manifest files. """ load( From 13f90168113ee9bbab2ecb67bfba6688006a7ede Mon Sep 17 00:00:00 2001 From: globegitter Date: Thu, 25 Oct 2018 12:43:15 +0200 Subject: [PATCH 44/53] Revert formatting changes. --- internal/rollup/rollup.config.spec.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/rollup/rollup.config.spec.js b/internal/rollup/rollup.config.spec.js index a4e16c50a6..3620774340 100644 --- a/internal/rollup/rollup.config.spec.js +++ b/internal/rollup/rollup.config.spec.js @@ -72,7 +72,7 @@ describe('rollup config', () => { expect(doResolve(`other${sep}thing`)) .toEqual(`${baseDir}/bazel-bin/path/to/a.esm5/external/other_wksp/path/to/other_lib/thing`); expect(doResolve(`@bar${sep}baz${sep}foo`)) - .toEqual(`${baseDir}/bazel-bin/path/to/a.esm5/path/to/bar/baz_lib/foo`); + .toEqual(`${baseDir}/bazel-bin/path/to/a.esm5/path/to/bar/baz_lib/foo`); }); it('should find paths in any root', () => { From e2ffd00ce7ecbca8d485a3cc9ee62471966fe6ee Mon Sep 17 00:00:00 2001 From: globegitter Date: Thu, 25 Oct 2018 13:00:40 +0200 Subject: [PATCH 45/53] Write a mock executable file. --- internal/common/typescript_mock_devserver.bzl | 30 +++++++++++++++++-- 1 file changed, 28 insertions(+), 2 deletions(-) diff --git a/internal/common/typescript_mock_devserver.bzl b/internal/common/typescript_mock_devserver.bzl index d5236f1885..6c0de4bff6 100644 --- a/internal/common/typescript_mock_devserver.bzl +++ b/internal/common/typescript_mock_devserver.bzl @@ -17,8 +17,8 @@ Allows testing that babel_library will work with ts_devserver from rules_typescript without introducing a circular dependency between rules_nodejs and rules_typescript repositories. This does not actually create -an executable but just has the same logic as the real ts_devserver and writes -out the same manifest files. +an executable but has nearly the same logic as the real ts_devserver and writes +out the same manifest and binary files. """ load( @@ -87,6 +87,31 @@ def _mock_mock_typescript_devserver(ctx): packages = depset(["/".join([workspace_name, ctx.label.package])] + ctx.attr.additional_root_paths) + ctx.actions.write( + output = ctx.outputs.executable, + is_executable = True, + content = """#!/bin/sh +RUNFILES="$PWD/.." +{main} {serving_arg} \ + -base="$RUNFILES" \ + -packages={packages} \ + -manifest={workspace}/{manifest} \ + -scripts_manifest={workspace}/{scripts_manifest} \ + -entry_module={entry_module} \ + -port={port} \ + "$@" +""".format( + main = "main", + serving_arg = serving_arg, + workspace = workspace_name, + packages = ",".join(packages.to_list()), + manifest = ctx.outputs.manifest.short_path, + scripts_manifest = ctx.outputs.scripts_manifest.short_path, + entry_module = ctx.attr.entry_module, + port = str(ctx.attr.port), + ), + ) + return [DefaultInfo( runfiles = ctx.runfiles( files = devserver_runfiles, @@ -126,5 +151,6 @@ mock_typescript_devserver = rule( outputs = { "manifest": "%{name}.MF", "scripts_manifest": "scripts_%{name}.MF", + "executable": "%{name}", }, ) From 67f12eb12e656a7b866b6cd3c88dc41b32466f68 Mon Sep 17 00:00:00 2001 From: globegitter Date: Fri, 26 Oct 2018 09:08:43 +0200 Subject: [PATCH 46/53] Renamed js_library to babel_library and progress on idiomatic install. --- .bazelrc | 2 +- defs.bzl | 2 + examples/devserver/BUILD.bazel | 7 + examples/devserver/package.json | 3 +- examples/devserver/setup_workspace.bzl | 6 +- examples/devserver/src/BUILD.bazel | 8 +- examples/devserver/src/dir/BUILD.bazel | 5 +- .../devserver/src/my_lib_folder/BUILD.bazel | 5 +- examples/devserver/yarn.lock | 3 + examples/nodejs_binary/BUILD.bazel | 32 +- internal/babel_library/BUILD.bazel | 1 + .../v2 => babel_library}/README.md | 2 +- .../{js_library/v2 => babel_library}/babel.js | 5 +- .../v2 => babel_library}/babel.rc.js | 0 .../babel_library.bzl} | 27 +- internal/babel_library/package.json | 18 + .../v2 => babel_library}/yarn.lock | 182 +++--- internal/common/typescript_mock_devserver.bzl | 2 +- .../e2e/fine_grained_deps/package-lock.json | 535 ------------------ internal/js_library/v2/BUILD.bazel | 20 - internal/js_library/v2/package.json | 9 - internal/node/node_repositories.bzl | 6 - 22 files changed, 174 insertions(+), 706 deletions(-) create mode 100644 internal/babel_library/BUILD.bazel rename internal/{js_library/v2 => babel_library}/README.md (83%) rename internal/{js_library/v2 => babel_library}/babel.js (90%) mode change 100644 => 100755 rename internal/{js_library/v2 => babel_library}/babel.rc.js (100%) rename internal/{js_library/v2/js_library.bzl => babel_library/babel_library.bzl} (86%) create mode 100644 internal/babel_library/package.json rename internal/{js_library/v2 => babel_library}/yarn.lock (88%) delete mode 100644 internal/js_library/v2/BUILD.bazel delete mode 100644 internal/js_library/v2/package.json diff --git a/.bazelrc b/.bazelrc index 3fc8ade958..e44001f0bc 100644 --- a/.bazelrc +++ b/.bazelrc @@ -6,7 +6,7 @@ test --test_output=errors # eventually a surprising failure with auto-discovery of the C++ toolchain in # MacOS High Sierra. # See https://github.com/bazelbuild/bazel/issues/4603 -build --symlink_prefix=/ +# build --symlink_prefix=/ # Mock versoning command to test the --stamp behavior build --workspace_status_command="echo BUILD_SCM_VERSION 1.2.3" diff --git a/defs.bzl b/defs.bzl index 9e775ecc14..61d4ef49d0 100644 --- a/defs.bzl +++ b/defs.bzl @@ -28,6 +28,7 @@ load("//internal/rollup:rollup_bundle.bzl", _rollup_bundle = "rollup_bundle") load("//internal/npm_package:npm_package.bzl", _npm_package = "npm_package") load("//internal/history-server:history_server.bzl", _history_server = "history_server") load("//internal/http-server:http_server.bzl", _http_server = "http_server") +load("//internal/babel_library:babel_library.bzl", _babel_library = "babel_library") load("//:package.bzl", _check_rules_nodejs_version = "check_rules_nodejs_version") check_bazel_version = _check_bazel_version @@ -41,6 +42,7 @@ rollup_bundle = _rollup_bundle npm_package = _npm_package history_server = _history_server http_server = _http_server +babel_library = _babel_library # ANY RULES ADDED HERE SHOULD BE DOCUMENTED, run yarn skydoc to verify check_rules_nodejs_version = _check_rules_nodejs_version diff --git a/examples/devserver/BUILD.bazel b/examples/devserver/BUILD.bazel index 9afe082718..1e7c5490a6 100644 --- a/examples/devserver/BUILD.bazel +++ b/examples/devserver/BUILD.bazel @@ -1 +1,8 @@ exports_files([".browserslistrc"]) + +filegroup( + name = "node_modules", + srcs = glob([ + "node_modules/**/*", + ]), +) \ No newline at end of file diff --git a/examples/devserver/package.json b/examples/devserver/package.json index 4b875b4dd3..259f10a58a 100644 --- a/examples/devserver/package.json +++ b/examples/devserver/package.json @@ -1,5 +1,6 @@ { "dependencies": { + "@bazel/babel": "file:../../../../internal/babel_library", "jsesc": "~1.2.0" - } + } } diff --git a/examples/devserver/setup_workspace.bzl b/examples/devserver/setup_workspace.bzl index 4e68cb0b27..996687987f 100644 --- a/examples/devserver/setup_workspace.bzl +++ b/examples/devserver/setup_workspace.bzl @@ -24,5 +24,9 @@ def devserver_example_setup_workspace(): name = "devserver_example_yarn_install", package_json = "@devserver_example//:package.json", yarn_lock = "@devserver_example//:yarn.lock", + data = [ + "@build_bazel_rules_nodejs//internal/babel_library:package.json", + "@build_bazel_rules_nodejs//internal/babel_library:babel.js", + "@build_bazel_rules_nodejs//internal/babel_library:yarn.lock", + ], ) - diff --git a/examples/devserver/src/BUILD.bazel b/examples/devserver/src/BUILD.bazel index 7c5e16f0b7..46f7977230 100644 --- a/examples/devserver/src/BUILD.bazel +++ b/examples/devserver/src/BUILD.bazel @@ -3,16 +3,17 @@ # https://github.com/bazelbuild/bazel/issues/1262 # https://docs.google.com/document/d/1qPOUeoqDA3eWFFXS1shWX1FT3e4BQB8yuSMrfQL4QrA -load("@build_bazel_rules_nodejs//internal/js_library/v2:js_library.bzl", "js_library") +load("@build_bazel_rules_nodejs//:defs.bzl", "babel_library") load("@build_bazel_rules_nodejs//:defs.bzl", "rollup_bundle") load("@build_bazel_rules_nodejs//:internal/common/typescript_mock_devserver.bzl", "mock_typescript_devserver") -js_library( +babel_library( name = "module", srcs = ["module.js"], + babel = "@devserver_example_yarn_install//@bazel/babel/bin:babel", ) -js_library( +babel_library( name = "test", srcs = ["test.js"], # Note: This rc file will only be found by babel when run in the devserver_example workspace @@ -25,6 +26,7 @@ js_library( "//src/dir:module", "//src/my_lib_folder:my_lib", ], + babel = "@devserver_example_yarn_install//@bazel/babel/bin:babel", ) mock_typescript_devserver( diff --git a/examples/devserver/src/dir/BUILD.bazel b/examples/devserver/src/dir/BUILD.bazel index e5ed7fdd9a..0ecd6470d1 100644 --- a/examples/devserver/src/dir/BUILD.bazel +++ b/examples/devserver/src/dir/BUILD.bazel @@ -1,7 +1,8 @@ -load("@build_bazel_rules_nodejs//internal/js_library/v2:js_library.bzl", "js_library") +load("@build_bazel_rules_nodejs//:defs.bzl", "babel_library") -js_library( +babel_library( name = "module", srcs = ["module.js"], visibility = ["//src:__subpackages__"], + babel = "@devserver_example_yarn_install//@bazel/babel/bin:babel", ) diff --git a/examples/devserver/src/my_lib_folder/BUILD.bazel b/examples/devserver/src/my_lib_folder/BUILD.bazel index c9c27f3aaf..035e5bd9f7 100644 --- a/examples/devserver/src/my_lib_folder/BUILD.bazel +++ b/examples/devserver/src/my_lib_folder/BUILD.bazel @@ -1,8 +1,9 @@ -load("@build_bazel_rules_nodejs//internal/js_library/v2:js_library.bzl", "js_library") +load("@build_bazel_rules_nodejs//:defs.bzl", "babel_library") -js_library( +babel_library( name = "my_lib", srcs = ["index.js"], module_name = "my-lib", visibility = ["//src:__subpackages__"], + babel = "@devserver_example_yarn_install//@bazel/babel/bin:babel", ) diff --git a/examples/devserver/yarn.lock b/examples/devserver/yarn.lock index 2f9f016ab0..65518bd403 100644 --- a/examples/devserver/yarn.lock +++ b/examples/devserver/yarn.lock @@ -2,6 +2,9 @@ # yarn lockfile v1 +"@bazel/babel@file:../../internal/babel_library": + version "0.15.3" + jsesc@~1.2.0: version "1.2.1" resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-1.2.1.tgz#2c905f923eefcd3d75438f18287aa582527e18b8" diff --git a/examples/nodejs_binary/BUILD.bazel b/examples/nodejs_binary/BUILD.bazel index c8cf1ac173..759a2ae065 100644 --- a/examples/nodejs_binary/BUILD.bazel +++ b/examples/nodejs_binary/BUILD.bazel @@ -1,5 +1,5 @@ load("@build_bazel_rules_nodejs//:defs.bzl", "nodejs_binary") -load("@build_bazel_rules_nodejs//internal/js_library/v2:js_library.bzl", "js_library") +load("@build_bazel_rules_nodejs//:defs.bzl", "babel_library") js_library( name = "msg", @@ -32,20 +32,20 @@ js_library( module_root = "someLibrary", ) -nodejs_binary( - name = "flowBabel", - data = [ - "@build_bazel_rules_nodejs//internal/js_library/v2:babel.js", - "@nodejs_binary_example_yarn_install//@babel/core", - "@nodejs_binary_example_yarn_install//@babel/preset-env", - "@nodejs_binary_example_yarn_install//babel-plugin-transform-es2015-modules-commonjs", - "@nodejs_binary_example_yarn_install//babel-plugin-transform-flow-strip-types", - "@nodejs_binary_example_yarn_install//commander", - "@nodejs_binary_example_yarn_install//mkdirp", - ], - entry_point = "build_bazel_rules_nodejs/internal/js_library/v2/babel.js", - install_source_map_support = False, -) +# nodejs_binary( +# name = "flowBabel", +# data = [ +# "@build_bazel_rules_nodejs//internal/js_library/v2:babel.js", +# "@nodejs_binary_example_yarn_install//@babel/core", +# "@nodejs_binary_example_yarn_install//@babel/preset-env", +# "@nodejs_binary_example_yarn_install//babel-plugin-transform-es2015-modules-commonjs", +# "@nodejs_binary_example_yarn_install//babel-plugin-transform-flow-strip-types", +# "@nodejs_binary_example_yarn_install//commander", +# "@nodejs_binary_example_yarn_install//mkdirp", +# ], +# entry_point = "build_bazel_rules_nodejs/internal/js_library/v2/babel.js", +# install_source_map_support = False, +# ) js_library( name = "flowLibrary", @@ -53,7 +53,7 @@ js_library( "flowLibrary/index.js", "flowLibrary/internalFile.js", ], - babel = ":flowBabel", + # babel = ":flowBabel", babelrc = "flowLibrary/flow.babelrc", module_name = "flowLibrary", module_root = "flowLibrary", diff --git a/internal/babel_library/BUILD.bazel b/internal/babel_library/BUILD.bazel new file mode 100644 index 0000000000..b095f4f638 --- /dev/null +++ b/internal/babel_library/BUILD.bazel @@ -0,0 +1 @@ +exports_files(["babel.rc.js"]) diff --git a/internal/js_library/v2/README.md b/internal/babel_library/README.md similarity index 83% rename from internal/js_library/v2/README.md rename to internal/babel_library/README.md index 3bb64fba40..f3d1b27fab 100644 --- a/internal/js_library/v2/README.md +++ b/internal/babel_library/README.md @@ -10,7 +10,7 @@ document.body.appendChild(el); ```py # BUILD.bazel -load("@build_bazel_rules_nodejs//internal/js_library/v2:js_library.bzl", "js_library") +load("@build_bazel_rules_nodejs//:defs.bzl", "babel_library") js_library( name = "src", diff --git a/internal/js_library/v2/babel.js b/internal/babel_library/babel.js old mode 100644 new mode 100755 similarity index 90% rename from internal/js_library/v2/babel.js rename to internal/babel_library/babel.js index 921206ecf1..77d4b90747 --- a/internal/js_library/v2/babel.js +++ b/internal/babel_library/babel.js @@ -1,10 +1,9 @@ // A simple wrapper around babel-core due to https://github.com/babel/babel/issues/8193 -const {writeFile} = require('fs'); +const {writeFile, mkdir} = require('fs'); const path = require('path'); const babel = require('@babel/core'); -const mkdirp = require('mkdirp'); const program = require('commander'); program.version('1.0.0') @@ -31,7 +30,7 @@ for (let i = 0; i < program.args.length; i += 2) { return console.error(err); } // Ensure directory exists - return mkdirp(path.dirname(output), function(err) { + mkdir(path.dirname(output), { recursive: true }, (err) => { if (err) { return console.error(err); } diff --git a/internal/js_library/v2/babel.rc.js b/internal/babel_library/babel.rc.js similarity index 100% rename from internal/js_library/v2/babel.rc.js rename to internal/babel_library/babel.rc.js diff --git a/internal/js_library/v2/js_library.bzl b/internal/babel_library/babel_library.bzl similarity index 86% rename from internal/js_library/v2/js_library.bzl rename to internal/babel_library/babel_library.bzl index 9a0b61cfa7..3ac986baf1 100644 --- a/internal/js_library/v2/js_library.bzl +++ b/internal/babel_library/babel_library.bzl @@ -1,8 +1,12 @@ -"""js_library allows defining a set of javascript sources to be used with ts_devserver""" +"""babel_library allows defining a set of next generation javascript sources +and uses babel to compile them for runtimes of today. It also brings +compatibility with rules_typescript.""" load("@bazel_skylib//:lib.bzl", "paths") +_DEFAULT_BABEL_BIN = "@npm//@bazel/babel/bin:babel" + # get the path of the file relative the the package "root" def _get_package_path(ctx, file): trim = 0 @@ -93,7 +97,7 @@ def _collect_sources(ctx, es5_outputs): ) -def _js_library(ctx): +def _babel_library(ctx): if ctx.attr.babelrc: config = ctx.file.babelrc else: @@ -133,8 +137,8 @@ def _js_library(ctx): ], ) -js_library = rule( - implementation = _js_library, +babel_library = rule( + implementation = _babel_library, attrs = { "srcs": attr.label_list( doc = """JavaScript source files from the workspace. @@ -148,16 +152,19 @@ js_library = rule( doc = """Other files useful for babel such as .browserslistrc""", allow_files = True, ), - "module_name": attr.string(), + "module_name": attr.string( + doc = """Allows to specify a custom module name for requiring, rather than having to use the relative path.""", + ), "module_root": attr.string(), "babel": attr.label( executable = True, - cfg="host", - default = Label("//internal/js_library/v2:babel") + cfg = "host", + default = Label(_DEFAULT_BABEL_BIN), + allow_files = True, ), "_babelrc_tmpl": attr.label( allow_single_file = True, - default = Label("//internal/js_library/v2:babel.rc.js") + default = Label("//internal/babel_library:babel.rc.js") ), "babelrc": attr.label( allow_single_file = True, @@ -165,8 +172,8 @@ js_library = rule( default = None, ), "no_sandbox": attr.string( - doc = """The string value of no-sandbox in the execution_requirements dict of babelification""", - default = "0" + doc = """The string value of no-sandbox in the execution_requirements dict of babelification""", + default = "0" ), }, ) diff --git a/internal/babel_library/package.json b/internal/babel_library/package.json new file mode 100644 index 0000000000..8cb01f81b1 --- /dev/null +++ b/internal/babel_library/package.json @@ -0,0 +1,18 @@ +{ + "name": "@bazel/babel", + "description": "Simple babel-cli for bazel compatibility", + "homepage": "https://bazelbuild.github.io/rules_nodejs/", + "version": "0.15.3", + "bin": { + "babel": "./babel.js" + }, + "main": "./babel.js", + "bugs": { + "url": "https://github.com/bazelbuild/rules_nodejs/issues" + }, + "devDependencies": { + "@babel/core": "^7.1.2", + "@babel/preset-env": "^7.1.0", + "commander": "^2.19.0" + } +} diff --git a/internal/js_library/v2/yarn.lock b/internal/babel_library/yarn.lock similarity index 88% rename from internal/js_library/v2/yarn.lock rename to internal/babel_library/yarn.lock index a9218e6d5a..a4fade4d2e 100644 --- a/internal/js_library/v2/yarn.lock +++ b/internal/babel_library/yarn.lock @@ -8,17 +8,17 @@ dependencies: "@babel/highlight" "^7.0.0" -"@babel/core@^7.1.0": - version "7.1.0" - resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.1.0.tgz#08958f1371179f62df6966d8a614003d11faeb04" +"@babel/core@^7.1.2": + version "7.1.2" + resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.1.2.tgz#f8d2a9ceb6832887329a7b60f9d035791400ba4e" dependencies: "@babel/code-frame" "^7.0.0" - "@babel/generator" "^7.0.0" - "@babel/helpers" "^7.1.0" - "@babel/parser" "^7.1.0" - "@babel/template" "^7.1.0" + "@babel/generator" "^7.1.2" + "@babel/helpers" "^7.1.2" + "@babel/parser" "^7.1.2" + "@babel/template" "^7.1.2" "@babel/traverse" "^7.1.0" - "@babel/types" "^7.0.0" + "@babel/types" "^7.1.2" convert-source-map "^1.1.0" debug "^3.1.0" json5 "^0.5.0" @@ -27,11 +27,11 @@ semver "^5.4.1" source-map "^0.5.0" -"@babel/generator@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.0.0.tgz#1efd58bffa951dc846449e58ce3a1d7f02d393aa" +"@babel/generator@^7.1.2", "@babel/generator@^7.1.3": + version "7.1.3" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.1.3.tgz#2103ec9c42d9bdad9190a6ad5ff2d456fd7b8673" dependencies: - "@babel/types" "^7.0.0" + "@babel/types" "^7.1.3" jsesc "^2.5.1" lodash "^4.17.10" source-map "^0.5.0" @@ -173,13 +173,13 @@ "@babel/traverse" "^7.1.0" "@babel/types" "^7.0.0" -"@babel/helpers@^7.1.0": - version "7.1.0" - resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.1.0.tgz#429bf0f0020be56a4242883432084e3d70a8a141" +"@babel/helpers@^7.1.2": + version "7.1.2" + resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.1.2.tgz#ab752e8c35ef7d39987df4e8586c63b8846234b5" dependencies: - "@babel/template" "^7.1.0" + "@babel/template" "^7.1.2" "@babel/traverse" "^7.1.0" - "@babel/types" "^7.0.0" + "@babel/types" "^7.1.2" "@babel/highlight@^7.0.0": version "7.0.0" @@ -189,9 +189,9 @@ esutils "^2.0.2" js-tokens "^4.0.0" -"@babel/parser@^7.1.0": - version "7.1.0" - resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.1.0.tgz#a7cd42cb3c12aec52e24375189a47b39759b783e" +"@babel/parser@^7.1.2", "@babel/parser@^7.1.3": + version "7.1.3" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.1.3.tgz#2c92469bac2b7fbff810b67fca07bd138b48af77" "@babel/plugin-proposal-async-generator-functions@^7.1.0": version "7.1.0" @@ -301,8 +301,8 @@ "@babel/helper-plugin-utils" "^7.0.0" "@babel/plugin-transform-destructuring@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.0.0.tgz#68e911e1935dda2f06b6ccbbf184ffb024e9d43a" + version "7.1.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.1.3.tgz#e69ff50ca01fac6cb72863c544e516c2b193012f" dependencies: "@babel/helper-plugin-utils" "^7.0.0" @@ -362,8 +362,8 @@ "@babel/helper-simple-access" "^7.1.0" "@babel/plugin-transform-modules-systemjs@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.0.0.tgz#8873d876d4fee23209decc4d1feab8f198cf2df4" + version "7.1.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.1.3.tgz#2119a3e3db612fd74a19d88652efbfe9613a5db0" dependencies: "@babel/helper-hoist-variables" "^7.0.0" "@babel/helper-plugin-utils" "^7.0.0" @@ -488,31 +488,31 @@ js-levenshtein "^1.1.3" semver "^5.3.0" -"@babel/template@^7.1.0": - version "7.1.0" - resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.1.0.tgz#58cc9572e1bfe24fe1537fdf99d839d53e517e22" +"@babel/template@^7.1.0", "@babel/template@^7.1.2": + version "7.1.2" + resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.1.2.tgz#090484a574fef5a2d2d7726a674eceda5c5b5644" dependencies: "@babel/code-frame" "^7.0.0" - "@babel/parser" "^7.1.0" - "@babel/types" "^7.0.0" + "@babel/parser" "^7.1.2" + "@babel/types" "^7.1.2" "@babel/traverse@^7.1.0": - version "7.1.0" - resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.1.0.tgz#503ec6669387efd182c3888c4eec07bcc45d91b2" + version "7.1.4" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.1.4.tgz#f4f83b93d649b4b2c91121a9087fa2fa949ec2b4" dependencies: "@babel/code-frame" "^7.0.0" - "@babel/generator" "^7.0.0" + "@babel/generator" "^7.1.3" "@babel/helper-function-name" "^7.1.0" "@babel/helper-split-export-declaration" "^7.0.0" - "@babel/parser" "^7.1.0" - "@babel/types" "^7.0.0" + "@babel/parser" "^7.1.3" + "@babel/types" "^7.1.3" debug "^3.1.0" globals "^11.1.0" lodash "^4.17.10" -"@babel/types@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.0.0.tgz#6e191793d3c854d19c6749989e3bc55f0e962118" +"@babel/types@^7.0.0", "@babel/types@^7.1.2", "@babel/types@^7.1.3": + version "7.1.3" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.1.3.tgz#3a767004567060c2f40fca49a304712c525ee37d" dependencies: esutils "^2.0.2" lodash "^4.17.10" @@ -525,16 +525,16 @@ ansi-styles@^3.2.1: color-convert "^1.9.0" browserslist@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.1.0.tgz#81cbb8e52dfa09918f93c6e051d779cb7360785d" + version "4.3.3" + resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.3.3.tgz#88a7d9ce2e5db561e160ab660bc59cb406a0c41d" dependencies: - caniuse-lite "^1.0.30000878" - electron-to-chromium "^1.3.61" - node-releases "^1.0.0-alpha.11" + caniuse-lite "^1.0.30000898" + electron-to-chromium "^1.3.81" + node-releases "^1.0.0-alpha.15" -caniuse-lite@^1.0.30000878: - version "1.0.30000878" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30000878.tgz#c644c39588dd42d3498e952234c372e5a40a4123" +caniuse-lite@^1.0.30000898: + version "1.0.30000899" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30000899.tgz#6febdbbc388a7982f620ee0e3d09aab0c061389e" chalk@^2.0.0: version "2.4.1" @@ -545,32 +545,34 @@ chalk@^2.0.0: supports-color "^5.3.0" color-convert@^1.9.0: - version "1.9.1" - resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.1.tgz#c1261107aeb2f294ebffec9ed9ecad529a6097ed" + version "1.9.3" + resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.3.tgz#bb71850690e1f136567de629d2d5471deda4c1e8" dependencies: - color-name "^1.1.1" + color-name "1.1.3" -color-name@^1.1.1: +color-name@1.1.3: version "1.1.3" resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25" -commander@^2.18.0: - version "2.18.0" - resolved "https://registry.yarnpkg.com/commander/-/commander-2.18.0.tgz#2bf063ddee7c7891176981a2cc798e5754bc6970" +commander@^2.19.0: + version "2.19.0" + resolved "https://registry.yarnpkg.com/commander/-/commander-2.19.0.tgz#f6198aa84e5b83c46054b94ddedbfed5ee9ff12a" convert-source-map@^1.1.0: - version "1.5.1" - resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.5.1.tgz#b8278097b9bc229365de5c62cf5fcaed8b5599e5" + version "1.6.0" + resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.6.0.tgz#51b537a8c43e0f04dec1993bffcdd504e758ac20" + dependencies: + safe-buffer "~5.1.1" debug@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/debug/-/debug-3.1.0.tgz#5bb5a0672628b64149566ba16819e61518c67261" + version "3.2.6" + resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.6.tgz#e83d17de16d8a7efb7717edbe5fb10135eee629b" dependencies: - ms "2.0.0" + ms "^2.1.1" -electron-to-chromium@^1.3.61: - version "1.3.61" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.61.tgz#a8ac295b28d0f03d85e37326fd16b6b6b17a1795" +electron-to-chromium@^1.3.81: + version "1.3.82" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.82.tgz#7d13ae4437d2a783de3f4efba96b186c540b67b1" escape-string-regexp@^1.0.5: version "1.0.5" @@ -581,8 +583,8 @@ esutils@^2.0.2: resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.2.tgz#0abf4f1caa5bcb1f7a9d8acc6dea4faaa04bac9b" globals@^11.1.0: - version "11.5.0" - resolved "https://registry.yarnpkg.com/globals/-/globals-11.5.0.tgz#6bc840de6771173b191f13d3a9c94d441ee92642" + version "11.8.0" + resolved "https://registry.yarnpkg.com/globals/-/globals-11.8.0.tgz#c1ef45ee9bed6badf0663c5cb90e8d1adec1321d" has-flag@^3.0.0: version "3.0.0" @@ -595,8 +597,8 @@ invariant@^2.2.2: loose-envify "^1.0.0" js-levenshtein@^1.1.3: - version "1.1.3" - resolved "https://registry.yarnpkg.com/js-levenshtein/-/js-levenshtein-1.1.3.tgz#3ef627df48ec8cf24bacf05c0f184ff30ef413c5" + version "1.1.4" + resolved "https://registry.yarnpkg.com/js-levenshtein/-/js-levenshtein-1.1.4.tgz#3a56e3cbf589ca0081eb22cd9ba0b1290a16d26e" "js-tokens@^3.0.0 || ^4.0.0", js-tokens@^4.0.0: version "4.0.0" @@ -612,11 +614,11 @@ jsesc@~0.5.0: json5@^0.5.0: version "0.5.1" - resolved "https://registry.yarnpkg.com/json5/-/json5-0.5.1.tgz#1eade7acc012034ad84e2396767ead9fa5495821" + resolved "http://registry.npmjs.org/json5/-/json5-0.5.1.tgz#1eade7acc012034ad84e2396767ead9fa5495821" lodash@^4.17.10: - version "4.17.10" - resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.10.tgz#1b7793cf7259ea38fb3661d4d38b3260af8ae4e7" + version "4.17.11" + resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.11.tgz#b39ea6229ef607ecd89e2c8df12536891cac9b8d" loose-envify@^1.0.0: version "1.4.0" @@ -624,29 +626,19 @@ loose-envify@^1.0.0: dependencies: js-tokens "^3.0.0 || ^4.0.0" -minimist@0.0.8: - version "0.0.8" - resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d" +ms@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.1.tgz#30a5864eb3ebb0a66f2ebe6d727af06a09d86e0a" -mkdirp@^0.5.1: - version "0.5.1" - resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903" - dependencies: - minimist "0.0.8" - -ms@2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" - -node-releases@^1.0.0-alpha.11: - version "1.0.0-alpha.11" - resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-1.0.0-alpha.11.tgz#73c810acc2e5b741a17ddfbb39dfca9ab9359d8a" +node-releases@^1.0.0-alpha.15: + version "1.0.0-alpha.15" + resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-1.0.0-alpha.15.tgz#bdb08730287cc50ddbfa3c1a358366a4a2f5d397" dependencies: semver "^5.3.0" path-parse@^1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.5.tgz#3c1adf871ea9cd6c9431b6ea2bd74a0ff055c4c1" + version "1.0.6" + resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.6.tgz#d62dbb5679405d72c4737ec58600e9ddcf06d24c" private@^0.1.6: version "0.1.8" @@ -690,26 +682,26 @@ regjsparser@^0.3.0: jsesc "~0.5.0" resolve@^1.3.2: - version "1.7.1" - resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.7.1.tgz#aadd656374fd298aee895bc026b8297418677fd3" + version "1.8.1" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.8.1.tgz#82f1ec19a423ac1fbd080b0bab06ba36e84a7a26" dependencies: path-parse "^1.0.5" -semver@^5.3.0: - version "5.5.1" - resolved "https://registry.yarnpkg.com/semver/-/semver-5.5.1.tgz#7dfdd8814bdb7cabc7be0fb1d734cfb66c940477" +safe-buffer@~5.1.1: + version "5.1.2" + resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d" -semver@^5.4.1: - version "5.5.0" - resolved "https://registry.yarnpkg.com/semver/-/semver-5.5.0.tgz#dc4bbc7a6ca9d916dee5d43516f0092b58f7b8ab" +semver@^5.3.0, semver@^5.4.1: + version "5.6.0" + resolved "https://registry.yarnpkg.com/semver/-/semver-5.6.0.tgz#7e74256fbaa49c75aa7c7a205cc22799cac80004" source-map@^0.5.0: version "0.5.7" resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc" supports-color@^5.3.0: - version "5.4.0" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.4.0.tgz#1c6b337402c2137605efe19f10fec390f6faab54" + version "5.5.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f" dependencies: has-flag "^3.0.0" diff --git a/internal/common/typescript_mock_devserver.bzl b/internal/common/typescript_mock_devserver.bzl index 6c0de4bff6..4552ed8562 100644 --- a/internal/common/typescript_mock_devserver.bzl +++ b/internal/common/typescript_mock_devserver.bzl @@ -151,6 +151,6 @@ mock_typescript_devserver = rule( outputs = { "manifest": "%{name}.MF", "scripts_manifest": "scripts_%{name}.MF", - "executable": "%{name}", + "executable": "%{name}_bin", }, ) diff --git a/internal/e2e/fine_grained_deps/package-lock.json b/internal/e2e/fine_grained_deps/package-lock.json index 0e4054d41d..3eacd15f51 100644 --- a/internal/e2e/fine_grained_deps/package-lock.json +++ b/internal/e2e/fine_grained_deps/package-lock.json @@ -188,7 +188,6 @@ "anymatch": "2.0.0", "async-each": "1.0.1", "braces": "2.3.2", - "fsevents": "1.2.4", "glob-parent": "3.1.0", "inherits": "2.0.3", "is-binary-path": "1.0.1", @@ -451,534 +450,6 @@ "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", "dev": true }, - "fsevents": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.4.tgz", - "integrity": "sha512-z8H8/diyk76B7q5wg+Ud0+CqzcAF3mBBI/bA5ne5zrRUUIvNkJY//D3BqyH571KuAC4Nr7Rw7CjWX4r0y9DvNg==", - "optional": true, - "requires": { - "nan": "2.11.0", - "node-pre-gyp": "0.10.0" - }, - "dependencies": { - "abbrev": { - "version": "1.1.1", - "resolved": false, - "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==", - "optional": true - }, - "ansi-regex": { - "version": "2.1.1", - "resolved": false, - "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=" - }, - "aproba": { - "version": "1.2.0", - "resolved": false, - "integrity": "sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw==", - "optional": true - }, - "are-we-there-yet": { - "version": "1.1.4", - "resolved": false, - "integrity": "sha1-u13KOCu5TwXhUZQ3PRb9O6HKEQ0=", - "optional": true, - "requires": { - "delegates": "1.0.0", - "readable-stream": "2.3.6" - } - }, - "balanced-match": { - "version": "1.0.0", - "resolved": false, - "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=" - }, - "brace-expansion": { - "version": "1.1.11", - "resolved": false, - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "requires": { - "balanced-match": "1.0.0", - "concat-map": "0.0.1" - } - }, - "chownr": { - "version": "1.0.1", - "resolved": false, - "integrity": "sha1-4qdQQqlVGQi+vSW4Uj1fl2nXkYE=", - "optional": true - }, - "code-point-at": { - "version": "1.1.0", - "resolved": false, - "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=" - }, - "concat-map": { - "version": "0.0.1", - "resolved": false, - "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" - }, - "console-control-strings": { - "version": "1.1.0", - "resolved": false, - "integrity": "sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4=" - }, - "core-util-is": { - "version": "1.0.2", - "resolved": false, - "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=", - "optional": true - }, - "debug": { - "version": "2.6.9", - "resolved": false, - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "optional": true, - "requires": { - "ms": "2.0.0" - } - }, - "deep-extend": { - "version": "0.5.1", - "resolved": false, - "integrity": "sha512-N8vBdOa+DF7zkRrDCsaOXoCs/E2fJfx9B9MrKnnSiHNh4ws7eSys6YQE4KvT1cecKmOASYQBhbKjeuDD9lT81w==", - "optional": true - }, - "delegates": { - "version": "1.0.0", - "resolved": false, - "integrity": "sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o=", - "optional": true - }, - "detect-libc": { - "version": "1.0.3", - "resolved": false, - "integrity": "sha1-+hN8S9aY7fVc1c0CrFWfkaTEups=", - "optional": true - }, - "fs-minipass": { - "version": "1.2.5", - "resolved": false, - "integrity": "sha512-JhBl0skXjUPCFH7x6x61gQxrKyXsxB5gcgePLZCwfyCGGsTISMoIeObbrvVeP6Xmyaudw4TT43qV2Gz+iyd2oQ==", - "optional": true, - "requires": { - "minipass": "2.2.4" - } - }, - "fs.realpath": { - "version": "1.0.0", - "resolved": false, - "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", - "optional": true - }, - "gauge": { - "version": "2.7.4", - "resolved": false, - "integrity": "sha1-LANAXHU4w51+s3sxcCLjJfsBi/c=", - "optional": true, - "requires": { - "aproba": "1.2.0", - "console-control-strings": "1.1.0", - "has-unicode": "2.0.1", - "object-assign": "4.1.1", - "signal-exit": "3.0.2", - "string-width": "1.0.2", - "strip-ansi": "3.0.1", - "wide-align": "1.1.2" - } - }, - "glob": { - "version": "7.1.2", - "resolved": false, - "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==", - "optional": true, - "requires": { - "fs.realpath": "1.0.0", - "inflight": "1.0.6", - "inherits": "2.0.3", - "minimatch": "3.0.4", - "once": "1.4.0", - "path-is-absolute": "1.0.1" - } - }, - "has-unicode": { - "version": "2.0.1", - "resolved": false, - "integrity": "sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk=", - "optional": true - }, - "iconv-lite": { - "version": "0.4.21", - "resolved": false, - "integrity": "sha512-En5V9za5mBt2oUA03WGD3TwDv0MKAruqsuxstbMUZaj9W9k/m1CV/9py3l0L5kw9Bln8fdHQmzHSYtvpvTLpKw==", - "optional": true, - "requires": { - "safer-buffer": "2.1.2" - } - }, - "ignore-walk": { - "version": "3.0.1", - "resolved": false, - "integrity": "sha512-DTVlMx3IYPe0/JJcYP7Gxg7ttZZu3IInhuEhbchuqneY9wWe5Ojy2mXLBaQFUQmo0AW2r3qG7m1mg86js+gnlQ==", - "optional": true, - "requires": { - "minimatch": "3.0.4" - } - }, - "inflight": { - "version": "1.0.6", - "resolved": false, - "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", - "optional": true, - "requires": { - "once": "1.4.0", - "wrappy": "1.0.2" - } - }, - "inherits": { - "version": "2.0.3", - "resolved": false, - "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" - }, - "ini": { - "version": "1.3.5", - "resolved": false, - "integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==", - "optional": true - }, - "is-fullwidth-code-point": { - "version": "1.0.0", - "resolved": false, - "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", - "requires": { - "number-is-nan": "1.0.1" - } - }, - "isarray": { - "version": "1.0.0", - "resolved": false, - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", - "optional": true - }, - "minimatch": { - "version": "3.0.4", - "resolved": false, - "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", - "requires": { - "brace-expansion": "1.1.11" - } - }, - "minimist": { - "version": "0.0.8", - "resolved": false, - "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=" - }, - "minipass": { - "version": "2.2.4", - "resolved": false, - "integrity": "sha512-hzXIWWet/BzWhYs2b+u7dRHlruXhwdgvlTMDKC6Cb1U7ps6Ac6yQlR39xsbjWJE377YTCtKwIXIpJ5oP+j5y8g==", - "requires": { - "safe-buffer": "5.1.1", - "yallist": "3.0.2" - } - }, - "minizlib": { - "version": "1.1.0", - "resolved": false, - "integrity": "sha512-4T6Ur/GctZ27nHfpt9THOdRZNgyJ9FZchYO1ceg5S8Q3DNLCKYy44nCZzgCJgcvx2UM8czmqak5BCxJMrq37lA==", - "optional": true, - "requires": { - "minipass": "2.2.4" - } - }, - "mkdirp": { - "version": "0.5.1", - "resolved": false, - "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", - "requires": { - "minimist": "0.0.8" - } - }, - "ms": { - "version": "2.0.0", - "resolved": false, - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", - "optional": true - }, - "needle": { - "version": "2.2.0", - "resolved": false, - "integrity": "sha512-eFagy6c+TYayorXw/qtAdSvaUpEbBsDwDyxYFgLZ0lTojfH7K+OdBqAF7TAFwDokJaGpubpSGG0wO3iC0XPi8w==", - "optional": true, - "requires": { - "debug": "2.6.9", - "iconv-lite": "0.4.21", - "sax": "1.2.4" - } - }, - "node-pre-gyp": { - "version": "0.10.0", - "resolved": false, - "integrity": "sha512-G7kEonQLRbcA/mOoFoxvlMrw6Q6dPf92+t/l0DFSMuSlDoWaI9JWIyPwK0jyE1bph//CUEL65/Fz1m2vJbmjQQ==", - "optional": true, - "requires": { - "detect-libc": "1.0.3", - "mkdirp": "0.5.1", - "needle": "2.2.0", - "nopt": "4.0.1", - "npm-packlist": "1.1.10", - "npmlog": "4.1.2", - "rc": "1.2.7", - "rimraf": "2.6.2", - "semver": "5.5.0", - "tar": "4.4.1" - } - }, - "nopt": { - "version": "4.0.1", - "resolved": false, - "integrity": "sha1-0NRoWv1UFRk8jHUFYC0NF81kR00=", - "optional": true, - "requires": { - "abbrev": "1.1.1", - "osenv": "0.1.5" - } - }, - "npm-bundled": { - "version": "1.0.3", - "resolved": false, - "integrity": "sha512-ByQ3oJ/5ETLyglU2+8dBObvhfWXX8dtPZDMePCahptliFX2iIuhyEszyFk401PZUNQH20vvdW5MLjJxkwU80Ow==", - "optional": true - }, - "npm-packlist": { - "version": "1.1.10", - "resolved": false, - "integrity": "sha512-AQC0Dyhzn4EiYEfIUjCdMl0JJ61I2ER9ukf/sLxJUcZHfo+VyEfz2rMJgLZSS1v30OxPQe1cN0LZA1xbcaVfWA==", - "optional": true, - "requires": { - "ignore-walk": "3.0.1", - "npm-bundled": "1.0.3" - } - }, - "npmlog": { - "version": "4.1.2", - "resolved": false, - "integrity": "sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg==", - "optional": true, - "requires": { - "are-we-there-yet": "1.1.4", - "console-control-strings": "1.1.0", - "gauge": "2.7.4", - "set-blocking": "2.0.0" - } - }, - "number-is-nan": { - "version": "1.0.1", - "resolved": false, - "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=" - }, - "object-assign": { - "version": "4.1.1", - "resolved": false, - "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", - "optional": true - }, - "once": { - "version": "1.4.0", - "resolved": false, - "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", - "requires": { - "wrappy": "1.0.2" - } - }, - "os-homedir": { - "version": "1.0.2", - "resolved": false, - "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=", - "optional": true - }, - "os-tmpdir": { - "version": "1.0.2", - "resolved": false, - "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=", - "optional": true - }, - "osenv": { - "version": "0.1.5", - "resolved": false, - "integrity": "sha512-0CWcCECdMVc2Rw3U5w9ZjqX6ga6ubk1xDVKxtBQPK7wis/0F2r9T6k4ydGYhecl7YUBxBVxhL5oisPsNxAPe2g==", - "optional": true, - "requires": { - "os-homedir": "1.0.2", - "os-tmpdir": "1.0.2" - } - }, - "path-is-absolute": { - "version": "1.0.1", - "resolved": false, - "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", - "optional": true - }, - "process-nextick-args": { - "version": "2.0.0", - "resolved": false, - "integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw==", - "optional": true - }, - "rc": { - "version": "1.2.7", - "resolved": false, - "integrity": "sha512-LdLD8xD4zzLsAT5xyushXDNscEjB7+2ulnl8+r1pnESlYtlJtVSoCMBGr30eDRJ3+2Gq89jK9P9e4tCEH1+ywA==", - "optional": true, - "requires": { - "deep-extend": "0.5.1", - "ini": "1.3.5", - "minimist": "1.2.0", - "strip-json-comments": "2.0.1" - }, - "dependencies": { - "minimist": { - "version": "1.2.0", - "resolved": false, - "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", - "optional": true - } - } - }, - "readable-stream": { - "version": "2.3.6", - "resolved": false, - "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", - "optional": 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.1", - "string_decoder": "1.1.1", - "util-deprecate": "1.0.2" - } - }, - "rimraf": { - "version": "2.6.2", - "resolved": false, - "integrity": "sha512-lreewLK/BlghmxtfH36YYVg1i8IAce4TI7oao75I1g245+6BctqTVQiBP3YUJ9C6DQOXJmkYR9X9fCLtCOJc5w==", - "optional": true, - "requires": { - "glob": "7.1.2" - } - }, - "safe-buffer": { - "version": "5.1.1", - "resolved": false, - "integrity": "sha512-kKvNJn6Mm93gAczWVJg7wH+wGYWNrDHdWvpUmHyEsgCtIwwo3bqPtV4tR5tuPaUhTOo/kvhVwd8XwwOllGYkbg==" - }, - "safer-buffer": { - "version": "2.1.2", - "resolved": false, - "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", - "optional": true - }, - "sax": { - "version": "1.2.4", - "resolved": false, - "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==", - "optional": true - }, - "semver": { - "version": "5.5.0", - "resolved": false, - "integrity": "sha512-4SJ3dm0WAwWy/NVeioZh5AntkdJoWKxHxcmyP622fOkgHa4z3R0TdBJICINyaSDE6uNwVc8gZr+ZinwZAH4xIA==", - "optional": true - }, - "set-blocking": { - "version": "2.0.0", - "resolved": false, - "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=", - "optional": true - }, - "signal-exit": { - "version": "3.0.2", - "resolved": false, - "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=", - "optional": true - }, - "string-width": { - "version": "1.0.2", - "resolved": false, - "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", - "requires": { - "code-point-at": "1.1.0", - "is-fullwidth-code-point": "1.0.0", - "strip-ansi": "3.0.1" - } - }, - "string_decoder": { - "version": "1.1.1", - "resolved": false, - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "optional": true, - "requires": { - "safe-buffer": "5.1.1" - } - }, - "strip-ansi": { - "version": "3.0.1", - "resolved": false, - "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", - "requires": { - "ansi-regex": "2.1.1" - } - }, - "strip-json-comments": { - "version": "2.0.1", - "resolved": false, - "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=", - "optional": true - }, - "tar": { - "version": "4.4.1", - "resolved": false, - "integrity": "sha512-O+v1r9yN4tOsvl90p5HAP4AEqbYhx4036AGMm075fH9F8Qwi3oJ+v4u50FkT/KkvywNGtwkk0zRI+8eYm1X/xg==", - "optional": true, - "requires": { - "chownr": "1.0.1", - "fs-minipass": "1.2.5", - "minipass": "2.2.4", - "minizlib": "1.1.0", - "mkdirp": "0.5.1", - "safe-buffer": "5.1.1", - "yallist": "3.0.2" - } - }, - "util-deprecate": { - "version": "1.0.2", - "resolved": false, - "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", - "optional": true - }, - "wide-align": { - "version": "1.1.2", - "resolved": false, - "integrity": "sha512-ijDLlyQ7s6x1JgCLur53osjm/UXUYD9+0PbYKrBsYisYXzCxN+HC3mYDNy/dWdmf3AwqwU3CXwDCvsNgGK1S0w==", - "optional": true, - "requires": { - "string-width": "1.0.2" - } - }, - "wrappy": { - "version": "1.0.2", - "resolved": false, - "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" - }, - "yallist": { - "version": "3.0.2", - "resolved": false, - "integrity": "sha1-hFK0u36Dx8GI2AQcGoN8dz1ti7k=" - } - } - }, "get-value": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/get-value/-/get-value-2.0.6.tgz", @@ -1291,12 +762,6 @@ "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" }, - "nan": { - "version": "2.11.0", - "resolved": "https://registry.npmjs.org/nan/-/nan-2.11.0.tgz", - "integrity": "sha512-F4miItu2rGnV2ySkXOQoA8FKz/SR2Q2sWP0sbTxNxz/tuokeC8WxOhPMcwi0qIyGtVn/rrSeLbvVkznqCdwYnw==", - "optional": true - }, "nanomatch": { "version": "1.2.13", "resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.13.tgz", diff --git a/internal/js_library/v2/BUILD.bazel b/internal/js_library/v2/BUILD.bazel deleted file mode 100644 index 73ee35dadb..0000000000 --- a/internal/js_library/v2/BUILD.bazel +++ /dev/null @@ -1,20 +0,0 @@ -load("@build_bazel_rules_nodejs//:defs.bzl", "nodejs_binary") - -# package(default_visibility = ["//internal:__subpackages__"]) -# TODO(Markus): Remove public visibility -package(default_visibility = ["//visibility:public"]) - -exports_files(["babel.rc.js"]) - -nodejs_binary( - name = "babel", - data = [ - "@build_bazel_rules_nodejs//internal/js_library/v2:babel.js", - "@build_bazel_rules_nodejs_js_library_deps//@babel/core", - "@build_bazel_rules_nodejs_js_library_deps//@babel/preset-env", - "@build_bazel_rules_nodejs_js_library_deps//commander", - "@build_bazel_rules_nodejs_js_library_deps//mkdirp", - ], - entry_point = "build_bazel_rules_nodejs/internal/js_library/v2/babel.js", - install_source_map_support = False, -) diff --git a/internal/js_library/v2/package.json b/internal/js_library/v2/package.json deleted file mode 100644 index f3e18ff4e9..0000000000 --- a/internal/js_library/v2/package.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "description": "runtime dependencies for js_library", - "devDependencies": { - "@babel/core": "^7.1.0", - "@babel/preset-env": "^7.1.0", - "commander": "^2.18.0", - "mkdirp": "^0.5.1" - } -} diff --git a/internal/node/node_repositories.bzl b/internal/node/node_repositories.bzl index 4ab7711aa0..5c4c85f189 100644 --- a/internal/node/node_repositories.bzl +++ b/internal/node/node_repositories.bzl @@ -560,12 +560,6 @@ def node_repositories( yarn_lock = "@build_bazel_rules_nodejs//internal/rollup:yarn.lock", ) - yarn_install( - name = "build_bazel_rules_nodejs_js_library_deps", - package_json = "@build_bazel_rules_nodejs//internal/js_library/v2:package.json", - yarn_lock = "@build_bazel_rules_nodejs//internal/js_library/v2:yarn.lock", - ) - yarn_install( name = "history-server_runtime_deps", package_json = "@build_bazel_rules_nodejs//internal/history-server:package.json", From 6d68f1e27f38710e278d8607fbddb411a86f9dd4 Mon Sep 17 00:00:00 2001 From: globegitter Date: Fri, 26 Oct 2018 16:33:50 +0200 Subject: [PATCH 47/53] Install package locally. --- examples/devserver/package.json | 2 +- examples/devserver/setup_workspace.bzl | 7 ++++--- examples/devserver/yarn.lock | 2 +- internal/babel_library/package.json | 2 +- 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/examples/devserver/package.json b/examples/devserver/package.json index 259f10a58a..69a09f2305 100644 --- a/examples/devserver/package.json +++ b/examples/devserver/package.json @@ -1,6 +1,6 @@ { "dependencies": { - "@bazel/babel": "file:../../../../internal/babel_library", + "@bazel/babel": "file:internal/babel_library", "jsesc": "~1.2.0" } } diff --git a/examples/devserver/setup_workspace.bzl b/examples/devserver/setup_workspace.bzl index 996687987f..c4742e8be4 100644 --- a/examples/devserver/setup_workspace.bzl +++ b/examples/devserver/setup_workspace.bzl @@ -15,15 +15,16 @@ """Helper function to setup @package_example workspace. """ -load("@build_bazel_rules_nodejs//:defs.bzl", "yarn_install") +load("@build_bazel_rules_nodejs//:defs.bzl", "npm_install") def devserver_example_setup_workspace(): """Node repositories for @devserver_examples """ - yarn_install( + # yarn has a bug with installing local packages that are symlinked so use npm + # See https://github.com/yarnpkg/yarn/issues/6037 + npm_install( name = "devserver_example_yarn_install", package_json = "@devserver_example//:package.json", - yarn_lock = "@devserver_example//:yarn.lock", data = [ "@build_bazel_rules_nodejs//internal/babel_library:package.json", "@build_bazel_rules_nodejs//internal/babel_library:babel.js", diff --git a/examples/devserver/yarn.lock b/examples/devserver/yarn.lock index 65518bd403..07f77f99e7 100644 --- a/examples/devserver/yarn.lock +++ b/examples/devserver/yarn.lock @@ -2,7 +2,7 @@ # yarn lockfile v1 -"@bazel/babel@file:../../internal/babel_library": +"@bazel/babel@file:internal/babel_library": version "0.15.3" jsesc@~1.2.0: diff --git a/internal/babel_library/package.json b/internal/babel_library/package.json index 8cb01f81b1..f42da1a778 100644 --- a/internal/babel_library/package.json +++ b/internal/babel_library/package.json @@ -10,7 +10,7 @@ "bugs": { "url": "https://github.com/bazelbuild/rules_nodejs/issues" }, - "devDependencies": { + "dependencies": { "@babel/core": "^7.1.2", "@babel/preset-env": "^7.1.0", "commander": "^2.19.0" From e03eb4f5273a3ea7ec68a29bda1889c16679736d Mon Sep 17 00:00:00 2001 From: globegitter Date: Fri, 26 Oct 2018 16:38:36 +0200 Subject: [PATCH 48/53] Update node and yarn to latest version and change defaults. --- internal/node/node_repositories.bzl | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/internal/node/node_repositories.bzl b/internal/node/node_repositories.bzl index 5c4c85f189..bdb0273464 100644 --- a/internal/node/node_repositories.bzl +++ b/internal/node/node_repositories.bzl @@ -25,11 +25,15 @@ load("//internal/npm_install:npm_install.bzl", "yarn_install") load("@bazel_skylib//:lib.bzl", "paths") # Callers that don't specify a particular version will get these. -DEFAULT_NODE_VERSION = "8.9.1" -DEFAULT_YARN_VERSION = "1.3.2" +DEFAULT_NODE_VERSION = "10.12.0" +DEFAULT_YARN_VERSION = "1.10.1" # Dictionary mapping NodeJS versions to sets of hosts and their correspoding (filename, strip_prefix, sha256) tuples. NODE_REPOSITORIES = { + # 10.12.0 + "10.12.0-darwin_amd64": ("node-v10.12.0-darwin-x64.tar.gz", "node-v10.12.0-darwin-x64", "f275c901b9aeaacea2bf22648329c2e9ade5e1ff63a446b83446d5d4e19464cc"), + "10.12.0-linux_amd64": ("node-v10.12.0-linux-x64.tar.xz", "node-v10.12.0-linux-x64", "8d13d57aaf95177e97d29c0944d79a17de8c3a31ba3fe88d1846cfd907e52111"), + "10.12.0-windows_amd64": ("node-v10.12.0-win-x64.zip", "node-v10.12.0-win-x64", "2d6f1b952d48a89d34a18b05cdef0af4f7ab13ba8c4f8dc42a458ea15023f645"), # 10.10.0 "10.10.0-darwin_amd64": ("node-v10.10.0-darwin-x64.tar.gz", "node-v10.10.0-darwin-x64", "00b7a8426e076e9bf9d12ba2d571312e833fe962c70afafd10ad3682fdeeaa5e"), "10.10.0-linux_amd64": ("node-v10.10.0-linux-x64.tar.xz", "node-v10.10.0-linux-x64", "686d2c7b7698097e67bcd68edc3d6b5d28d81f62436c7cf9e7779d134ec262a9"), @@ -62,6 +66,7 @@ NODE_REPOSITORIES = { # Dictionary mapping Yarn versions to their correspoding (filename, strip_prefix, sha256) tuples. YARN_REPOSITORIES = { + "1.10.1": ("yarn-v1.10.1.tar.gz", "yarn-v1.10.1", "97bf147cb28229e66e4e3c5733a93c851bbcb0f10fbc72696ed011774f4c6f1b"), "1.9.4": ("yarn-v1.9.4.tar.gz", "yarn-v1.9.4", "7667eb715077b4bad8e2a832e7084e0e6f1ba54d7280dc573c8f7031a7fb093e"), "1.9.2": ("yarn-v1.9.2.tar.gz", "yarn-v1.9.2", "3ad69cc7f68159a562c676e21998eb21b44138cae7e8fe0749a7d620cf940204"), "1.6.0": ("yarn-v1.6.0.tar.gz", "yarn-v1.6.0", "a57b2fdb2bfeeb083d45a883bc29af94d5e83a21c25f3fc001c295938e988509"), From 3c72130e6a80129547d462346454cb11e9815f00 Mon Sep 17 00:00:00 2001 From: globegitter Date: Fri, 26 Oct 2018 16:44:06 +0200 Subject: [PATCH 49/53] Take correct shas. --- internal/node/node_repositories.bzl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/node/node_repositories.bzl b/internal/node/node_repositories.bzl index bdb0273464..42f0a1cff9 100644 --- a/internal/node/node_repositories.bzl +++ b/internal/node/node_repositories.bzl @@ -32,8 +32,8 @@ DEFAULT_YARN_VERSION = "1.10.1" NODE_REPOSITORIES = { # 10.12.0 "10.12.0-darwin_amd64": ("node-v10.12.0-darwin-x64.tar.gz", "node-v10.12.0-darwin-x64", "f275c901b9aeaacea2bf22648329c2e9ade5e1ff63a446b83446d5d4e19464cc"), - "10.12.0-linux_amd64": ("node-v10.12.0-linux-x64.tar.xz", "node-v10.12.0-linux-x64", "8d13d57aaf95177e97d29c0944d79a17de8c3a31ba3fe88d1846cfd907e52111"), - "10.12.0-windows_amd64": ("node-v10.12.0-win-x64.zip", "node-v10.12.0-win-x64", "2d6f1b952d48a89d34a18b05cdef0af4f7ab13ba8c4f8dc42a458ea15023f645"), + "10.12.0-linux_amd64": ("node-v10.12.0-linux-x64.tar.xz", "node-v10.12.0-linux-x64", "4eba2e9a6db95745b769915d58e57df6ca6724ec1f023f76556fce30ceca2367"), + "10.12.0-windows_amd64": ("node-v10.12.0-win-x64.zip", "node-v10.12.0-win-x64", "44c938cf1409562d25d23b7c6bce110b53cd2a73774bed573b2979f0d88f51f8"), # 10.10.0 "10.10.0-darwin_amd64": ("node-v10.10.0-darwin-x64.tar.gz", "node-v10.10.0-darwin-x64", "00b7a8426e076e9bf9d12ba2d571312e833fe962c70afafd10ad3682fdeeaa5e"), "10.10.0-linux_amd64": ("node-v10.10.0-linux-x64.tar.xz", "node-v10.10.0-linux-x64", "686d2c7b7698097e67bcd68edc3d6b5d28d81f62436c7cf9e7779d134ec262a9"), From 1503c1daf39eac7226d176883f93a37c3d53c6a3 Mon Sep 17 00:00:00 2001 From: globegitter Date: Fri, 26 Oct 2018 21:24:34 +0200 Subject: [PATCH 50/53] Updated examples further. --- examples/devserver/yarn.lock | 10 - examples/nodejs_binary/package.json | 7 +- examples/nodejs_binary/setup_workspace.bzl | 10 +- examples/nodejs_binary/yarn.lock | 892 --------------------- internal/npm_install/yarn.lock | 1 + 5 files changed, 10 insertions(+), 910 deletions(-) delete mode 100644 examples/devserver/yarn.lock delete mode 100644 examples/nodejs_binary/yarn.lock diff --git a/examples/devserver/yarn.lock b/examples/devserver/yarn.lock deleted file mode 100644 index 07f77f99e7..0000000000 --- a/examples/devserver/yarn.lock +++ /dev/null @@ -1,10 +0,0 @@ -# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. -# yarn lockfile v1 - - -"@bazel/babel@file:internal/babel_library": - version "0.15.3" - -jsesc@~1.2.0: - version "1.2.1" - resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-1.2.1.tgz#2c905f923eefcd3d75438f18287aa582527e18b8" diff --git a/examples/nodejs_binary/package.json b/examples/nodejs_binary/package.json index ecb5b78b7e..346a8ca1b6 100644 --- a/examples/nodejs_binary/package.json +++ b/examples/nodejs_binary/package.json @@ -1,11 +1,8 @@ { "description": "dependencies for nodejs_binary example", "devDependencies": { - "@babel/core": "^7.1.0", - "@babel/preset-env": "^7.1.0", + "@bazel/babel": "file:internal/babel_library", "babel-plugin-transform-es2015-modules-commonjs": "^6.26.2", - "babel-plugin-transform-flow-strip-types": "^6.22.0", - "commander": "^2.18.0", - "mkdirp": "^0.5.1" + "babel-plugin-transform-flow-strip-types": "^6.22.0" } } diff --git a/examples/nodejs_binary/setup_workspace.bzl b/examples/nodejs_binary/setup_workspace.bzl index 4733b34f45..f4c417f840 100644 --- a/examples/nodejs_binary/setup_workspace.bzl +++ b/examples/nodejs_binary/setup_workspace.bzl @@ -15,14 +15,18 @@ """Helper function to setup @package_example workspace. """ -load("@build_bazel_rules_nodejs//:defs.bzl", "yarn_install") +load("@build_bazel_rules_nodejs//:defs.bzl", "npm_install") def nodejs_binary_example_setup_workspace(): """Node repositories for @nodejs_binary_example """ - yarn_install( + npm_install( name = "nodejs_binary_example_yarn_install", package_json = "@nodejs_binary_example//:package.json", - yarn_lock = "@nodejs_binary_example//:yarn.lock", + data = [ + "@build_bazel_rules_nodejs//internal/babel_library:package.json", + "@build_bazel_rules_nodejs//internal/babel_library:babel.js", + "@build_bazel_rules_nodejs//internal/babel_library:yarn.lock", + ], ) diff --git a/examples/nodejs_binary/yarn.lock b/examples/nodejs_binary/yarn.lock deleted file mode 100644 index 1f84efb58c..0000000000 --- a/examples/nodejs_binary/yarn.lock +++ /dev/null @@ -1,892 +0,0 @@ -# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. -# yarn lockfile v1 - - -"@babel/code-frame@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.0.0.tgz#06e2ab19bdb535385559aabb5ba59729482800f8" - dependencies: - "@babel/highlight" "^7.0.0" - -"@babel/core@^7.1.0": - version "7.1.2" - resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.1.2.tgz#f8d2a9ceb6832887329a7b60f9d035791400ba4e" - dependencies: - "@babel/code-frame" "^7.0.0" - "@babel/generator" "^7.1.2" - "@babel/helpers" "^7.1.2" - "@babel/parser" "^7.1.2" - "@babel/template" "^7.1.2" - "@babel/traverse" "^7.1.0" - "@babel/types" "^7.1.2" - convert-source-map "^1.1.0" - debug "^3.1.0" - json5 "^0.5.0" - lodash "^4.17.10" - resolve "^1.3.2" - semver "^5.4.1" - source-map "^0.5.0" - -"@babel/generator@^7.1.2", "@babel/generator@^7.1.3": - version "7.1.3" - resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.1.3.tgz#2103ec9c42d9bdad9190a6ad5ff2d456fd7b8673" - dependencies: - "@babel/types" "^7.1.3" - jsesc "^2.5.1" - lodash "^4.17.10" - source-map "^0.5.0" - trim-right "^1.0.1" - -"@babel/helper-annotate-as-pure@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.0.0.tgz#323d39dd0b50e10c7c06ca7d7638e6864d8c5c32" - dependencies: - "@babel/types" "^7.0.0" - -"@babel/helper-builder-binary-assignment-operator-visitor@^7.1.0": - version "7.1.0" - resolved "https://registry.yarnpkg.com/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.1.0.tgz#6b69628dfe4087798e0c4ed98e3d4a6b2fbd2f5f" - dependencies: - "@babel/helper-explode-assignable-expression" "^7.1.0" - "@babel/types" "^7.0.0" - -"@babel/helper-call-delegate@^7.1.0": - version "7.1.0" - resolved "https://registry.yarnpkg.com/@babel/helper-call-delegate/-/helper-call-delegate-7.1.0.tgz#6a957f105f37755e8645343d3038a22e1449cc4a" - dependencies: - "@babel/helper-hoist-variables" "^7.0.0" - "@babel/traverse" "^7.1.0" - "@babel/types" "^7.0.0" - -"@babel/helper-define-map@^7.1.0": - version "7.1.0" - resolved "https://registry.yarnpkg.com/@babel/helper-define-map/-/helper-define-map-7.1.0.tgz#3b74caec329b3c80c116290887c0dd9ae468c20c" - dependencies: - "@babel/helper-function-name" "^7.1.0" - "@babel/types" "^7.0.0" - lodash "^4.17.10" - -"@babel/helper-explode-assignable-expression@^7.1.0": - version "7.1.0" - resolved "https://registry.yarnpkg.com/@babel/helper-explode-assignable-expression/-/helper-explode-assignable-expression-7.1.0.tgz#537fa13f6f1674df745b0c00ec8fe4e99681c8f6" - dependencies: - "@babel/traverse" "^7.1.0" - "@babel/types" "^7.0.0" - -"@babel/helper-function-name@^7.1.0": - version "7.1.0" - resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.1.0.tgz#a0ceb01685f73355d4360c1247f582bfafc8ff53" - dependencies: - "@babel/helper-get-function-arity" "^7.0.0" - "@babel/template" "^7.1.0" - "@babel/types" "^7.0.0" - -"@babel/helper-get-function-arity@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/helper-get-function-arity/-/helper-get-function-arity-7.0.0.tgz#83572d4320e2a4657263734113c42868b64e49c3" - dependencies: - "@babel/types" "^7.0.0" - -"@babel/helper-hoist-variables@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/helper-hoist-variables/-/helper-hoist-variables-7.0.0.tgz#46adc4c5e758645ae7a45deb92bab0918c23bb88" - dependencies: - "@babel/types" "^7.0.0" - -"@babel/helper-member-expression-to-functions@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.0.0.tgz#8cd14b0a0df7ff00f009e7d7a436945f47c7a16f" - dependencies: - "@babel/types" "^7.0.0" - -"@babel/helper-module-imports@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.0.0.tgz#96081b7111e486da4d2cd971ad1a4fe216cc2e3d" - dependencies: - "@babel/types" "^7.0.0" - -"@babel/helper-module-transforms@^7.1.0": - version "7.1.0" - resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.1.0.tgz#470d4f9676d9fad50b324cdcce5fbabbc3da5787" - dependencies: - "@babel/helper-module-imports" "^7.0.0" - "@babel/helper-simple-access" "^7.1.0" - "@babel/helper-split-export-declaration" "^7.0.0" - "@babel/template" "^7.1.0" - "@babel/types" "^7.0.0" - lodash "^4.17.10" - -"@babel/helper-optimise-call-expression@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.0.0.tgz#a2920c5702b073c15de51106200aa8cad20497d5" - dependencies: - "@babel/types" "^7.0.0" - -"@babel/helper-plugin-utils@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.0.0.tgz#bbb3fbee98661c569034237cc03967ba99b4f250" - -"@babel/helper-regex@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/helper-regex/-/helper-regex-7.0.0.tgz#2c1718923b57f9bbe64705ffe5640ac64d9bdb27" - dependencies: - lodash "^4.17.10" - -"@babel/helper-remap-async-to-generator@^7.1.0": - version "7.1.0" - resolved "https://registry.yarnpkg.com/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.1.0.tgz#361d80821b6f38da75bd3f0785ece20a88c5fe7f" - dependencies: - "@babel/helper-annotate-as-pure" "^7.0.0" - "@babel/helper-wrap-function" "^7.1.0" - "@babel/template" "^7.1.0" - "@babel/traverse" "^7.1.0" - "@babel/types" "^7.0.0" - -"@babel/helper-replace-supers@^7.1.0": - version "7.1.0" - resolved "https://registry.yarnpkg.com/@babel/helper-replace-supers/-/helper-replace-supers-7.1.0.tgz#5fc31de522ec0ef0899dc9b3e7cf6a5dd655f362" - dependencies: - "@babel/helper-member-expression-to-functions" "^7.0.0" - "@babel/helper-optimise-call-expression" "^7.0.0" - "@babel/traverse" "^7.1.0" - "@babel/types" "^7.0.0" - -"@babel/helper-simple-access@^7.1.0": - version "7.1.0" - resolved "https://registry.yarnpkg.com/@babel/helper-simple-access/-/helper-simple-access-7.1.0.tgz#65eeb954c8c245beaa4e859da6188f39d71e585c" - dependencies: - "@babel/template" "^7.1.0" - "@babel/types" "^7.0.0" - -"@babel/helper-split-export-declaration@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.0.0.tgz#3aae285c0311c2ab095d997b8c9a94cad547d813" - dependencies: - "@babel/types" "^7.0.0" - -"@babel/helper-wrap-function@^7.1.0": - version "7.1.0" - resolved "https://registry.yarnpkg.com/@babel/helper-wrap-function/-/helper-wrap-function-7.1.0.tgz#8cf54e9190706067f016af8f75cb3df829cc8c66" - dependencies: - "@babel/helper-function-name" "^7.1.0" - "@babel/template" "^7.1.0" - "@babel/traverse" "^7.1.0" - "@babel/types" "^7.0.0" - -"@babel/helpers@^7.1.2": - version "7.1.2" - resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.1.2.tgz#ab752e8c35ef7d39987df4e8586c63b8846234b5" - dependencies: - "@babel/template" "^7.1.2" - "@babel/traverse" "^7.1.0" - "@babel/types" "^7.1.2" - -"@babel/highlight@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.0.0.tgz#f710c38c8d458e6dd9a201afb637fcb781ce99e4" - dependencies: - chalk "^2.0.0" - esutils "^2.0.2" - js-tokens "^4.0.0" - -"@babel/parser@^7.1.2", "@babel/parser@^7.1.3": - version "7.1.3" - resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.1.3.tgz#2c92469bac2b7fbff810b67fca07bd138b48af77" - -"@babel/plugin-proposal-async-generator-functions@^7.1.0": - version "7.1.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.1.0.tgz#41c1a702e10081456e23a7b74d891922dd1bb6ce" - dependencies: - "@babel/helper-plugin-utils" "^7.0.0" - "@babel/helper-remap-async-to-generator" "^7.1.0" - "@babel/plugin-syntax-async-generators" "^7.0.0" - -"@babel/plugin-proposal-json-strings@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-json-strings/-/plugin-proposal-json-strings-7.0.0.tgz#3b4d7b5cf51e1f2e70f52351d28d44fc2970d01e" - dependencies: - "@babel/helper-plugin-utils" "^7.0.0" - "@babel/plugin-syntax-json-strings" "^7.0.0" - -"@babel/plugin-proposal-object-rest-spread@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.0.0.tgz#9a17b547f64d0676b6c9cecd4edf74a82ab85e7e" - dependencies: - "@babel/helper-plugin-utils" "^7.0.0" - "@babel/plugin-syntax-object-rest-spread" "^7.0.0" - -"@babel/plugin-proposal-optional-catch-binding@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-optional-catch-binding/-/plugin-proposal-optional-catch-binding-7.0.0.tgz#b610d928fe551ff7117d42c8bb410eec312a6425" - dependencies: - "@babel/helper-plugin-utils" "^7.0.0" - "@babel/plugin-syntax-optional-catch-binding" "^7.0.0" - -"@babel/plugin-proposal-unicode-property-regex@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.0.0.tgz#498b39cd72536cd7c4b26177d030226eba08cd33" - dependencies: - "@babel/helper-plugin-utils" "^7.0.0" - "@babel/helper-regex" "^7.0.0" - regexpu-core "^4.2.0" - -"@babel/plugin-syntax-async-generators@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.0.0.tgz#bf0891dcdbf59558359d0c626fdc9490e20bc13c" - dependencies: - "@babel/helper-plugin-utils" "^7.0.0" - -"@babel/plugin-syntax-json-strings@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.0.0.tgz#0d259a68090e15b383ce3710e01d5b23f3770cbd" - dependencies: - "@babel/helper-plugin-utils" "^7.0.0" - -"@babel/plugin-syntax-object-rest-spread@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.0.0.tgz#37d8fbcaf216bd658ea1aebbeb8b75e88ebc549b" - dependencies: - "@babel/helper-plugin-utils" "^7.0.0" - -"@babel/plugin-syntax-optional-catch-binding@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.0.0.tgz#886f72008b3a8b185977f7cb70713b45e51ee475" - dependencies: - "@babel/helper-plugin-utils" "^7.0.0" - -"@babel/plugin-transform-arrow-functions@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.0.0.tgz#a6c14875848c68a3b4b3163a486535ef25c7e749" - dependencies: - "@babel/helper-plugin-utils" "^7.0.0" - -"@babel/plugin-transform-async-to-generator@^7.1.0": - version "7.1.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.1.0.tgz#109e036496c51dd65857e16acab3bafdf3c57811" - dependencies: - "@babel/helper-module-imports" "^7.0.0" - "@babel/helper-plugin-utils" "^7.0.0" - "@babel/helper-remap-async-to-generator" "^7.1.0" - -"@babel/plugin-transform-block-scoped-functions@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.0.0.tgz#482b3f75103927e37288b3b67b65f848e2aa0d07" - dependencies: - "@babel/helper-plugin-utils" "^7.0.0" - -"@babel/plugin-transform-block-scoping@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.0.0.tgz#1745075edffd7cdaf69fab2fb6f9694424b7e9bc" - dependencies: - "@babel/helper-plugin-utils" "^7.0.0" - lodash "^4.17.10" - -"@babel/plugin-transform-classes@^7.1.0": - version "7.1.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-classes/-/plugin-transform-classes-7.1.0.tgz#ab3f8a564361800cbc8ab1ca6f21108038432249" - dependencies: - "@babel/helper-annotate-as-pure" "^7.0.0" - "@babel/helper-define-map" "^7.1.0" - "@babel/helper-function-name" "^7.1.0" - "@babel/helper-optimise-call-expression" "^7.0.0" - "@babel/helper-plugin-utils" "^7.0.0" - "@babel/helper-replace-supers" "^7.1.0" - "@babel/helper-split-export-declaration" "^7.0.0" - globals "^11.1.0" - -"@babel/plugin-transform-computed-properties@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.0.0.tgz#2fbb8900cd3e8258f2a2ede909b90e7556185e31" - dependencies: - "@babel/helper-plugin-utils" "^7.0.0" - -"@babel/plugin-transform-destructuring@^7.0.0": - version "7.1.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.1.3.tgz#e69ff50ca01fac6cb72863c544e516c2b193012f" - dependencies: - "@babel/helper-plugin-utils" "^7.0.0" - -"@babel/plugin-transform-dotall-regex@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.0.0.tgz#73a24da69bc3c370251f43a3d048198546115e58" - dependencies: - "@babel/helper-plugin-utils" "^7.0.0" - "@babel/helper-regex" "^7.0.0" - regexpu-core "^4.1.3" - -"@babel/plugin-transform-duplicate-keys@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.0.0.tgz#a0601e580991e7cace080e4cf919cfd58da74e86" - dependencies: - "@babel/helper-plugin-utils" "^7.0.0" - -"@babel/plugin-transform-exponentiation-operator@^7.1.0": - version "7.1.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.1.0.tgz#9c34c2ee7fd77e02779cfa37e403a2e1003ccc73" - dependencies: - "@babel/helper-builder-binary-assignment-operator-visitor" "^7.1.0" - "@babel/helper-plugin-utils" "^7.0.0" - -"@babel/plugin-transform-for-of@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.0.0.tgz#f2ba4eadb83bd17dc3c7e9b30f4707365e1c3e39" - dependencies: - "@babel/helper-plugin-utils" "^7.0.0" - -"@babel/plugin-transform-function-name@^7.1.0": - version "7.1.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.1.0.tgz#29c5550d5c46208e7f730516d41eeddd4affadbb" - dependencies: - "@babel/helper-function-name" "^7.1.0" - "@babel/helper-plugin-utils" "^7.0.0" - -"@babel/plugin-transform-literals@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-literals/-/plugin-transform-literals-7.0.0.tgz#2aec1d29cdd24c407359c930cdd89e914ee8ff86" - dependencies: - "@babel/helper-plugin-utils" "^7.0.0" - -"@babel/plugin-transform-modules-amd@^7.1.0": - version "7.1.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.1.0.tgz#f9e0a7072c12e296079b5a59f408ff5b97bf86a8" - dependencies: - "@babel/helper-module-transforms" "^7.1.0" - "@babel/helper-plugin-utils" "^7.0.0" - -"@babel/plugin-transform-modules-commonjs@^7.1.0": - version "7.1.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.1.0.tgz#0a9d86451cbbfb29bd15186306897c67f6f9a05c" - dependencies: - "@babel/helper-module-transforms" "^7.1.0" - "@babel/helper-plugin-utils" "^7.0.0" - "@babel/helper-simple-access" "^7.1.0" - -"@babel/plugin-transform-modules-systemjs@^7.0.0": - version "7.1.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.1.3.tgz#2119a3e3db612fd74a19d88652efbfe9613a5db0" - dependencies: - "@babel/helper-hoist-variables" "^7.0.0" - "@babel/helper-plugin-utils" "^7.0.0" - -"@babel/plugin-transform-modules-umd@^7.1.0": - version "7.1.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.1.0.tgz#a29a7d85d6f28c3561c33964442257cc6a21f2a8" - dependencies: - "@babel/helper-module-transforms" "^7.1.0" - "@babel/helper-plugin-utils" "^7.0.0" - -"@babel/plugin-transform-new-target@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.0.0.tgz#ae8fbd89517fa7892d20e6564e641e8770c3aa4a" - dependencies: - "@babel/helper-plugin-utils" "^7.0.0" - -"@babel/plugin-transform-object-super@^7.1.0": - version "7.1.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.1.0.tgz#b1ae194a054b826d8d4ba7ca91486d4ada0f91bb" - dependencies: - "@babel/helper-plugin-utils" "^7.0.0" - "@babel/helper-replace-supers" "^7.1.0" - -"@babel/plugin-transform-parameters@^7.1.0": - version "7.1.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.1.0.tgz#44f492f9d618c9124026e62301c296bf606a7aed" - dependencies: - "@babel/helper-call-delegate" "^7.1.0" - "@babel/helper-get-function-arity" "^7.0.0" - "@babel/helper-plugin-utils" "^7.0.0" - -"@babel/plugin-transform-regenerator@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.0.0.tgz#5b41686b4ed40bef874d7ed6a84bdd849c13e0c1" - dependencies: - regenerator-transform "^0.13.3" - -"@babel/plugin-transform-shorthand-properties@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.0.0.tgz#85f8af592dcc07647541a0350e8c95c7bf419d15" - dependencies: - "@babel/helper-plugin-utils" "^7.0.0" - -"@babel/plugin-transform-spread@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-spread/-/plugin-transform-spread-7.0.0.tgz#93583ce48dd8c85e53f3a46056c856e4af30b49b" - dependencies: - "@babel/helper-plugin-utils" "^7.0.0" - -"@babel/plugin-transform-sticky-regex@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.0.0.tgz#30a9d64ac2ab46eec087b8530535becd90e73366" - dependencies: - "@babel/helper-plugin-utils" "^7.0.0" - "@babel/helper-regex" "^7.0.0" - -"@babel/plugin-transform-template-literals@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.0.0.tgz#084f1952efe5b153ddae69eb8945f882c7a97c65" - dependencies: - "@babel/helper-annotate-as-pure" "^7.0.0" - "@babel/helper-plugin-utils" "^7.0.0" - -"@babel/plugin-transform-typeof-symbol@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.0.0.tgz#4dcf1e52e943e5267b7313bff347fdbe0f81cec9" - dependencies: - "@babel/helper-plugin-utils" "^7.0.0" - -"@babel/plugin-transform-unicode-regex@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.0.0.tgz#c6780e5b1863a76fe792d90eded9fcd5b51d68fc" - dependencies: - "@babel/helper-plugin-utils" "^7.0.0" - "@babel/helper-regex" "^7.0.0" - regexpu-core "^4.1.3" - -"@babel/preset-env@^7.1.0": - version "7.1.0" - resolved "https://registry.yarnpkg.com/@babel/preset-env/-/preset-env-7.1.0.tgz#e67ea5b0441cfeab1d6f41e9b5c79798800e8d11" - dependencies: - "@babel/helper-module-imports" "^7.0.0" - "@babel/helper-plugin-utils" "^7.0.0" - "@babel/plugin-proposal-async-generator-functions" "^7.1.0" - "@babel/plugin-proposal-json-strings" "^7.0.0" - "@babel/plugin-proposal-object-rest-spread" "^7.0.0" - "@babel/plugin-proposal-optional-catch-binding" "^7.0.0" - "@babel/plugin-proposal-unicode-property-regex" "^7.0.0" - "@babel/plugin-syntax-async-generators" "^7.0.0" - "@babel/plugin-syntax-object-rest-spread" "^7.0.0" - "@babel/plugin-syntax-optional-catch-binding" "^7.0.0" - "@babel/plugin-transform-arrow-functions" "^7.0.0" - "@babel/plugin-transform-async-to-generator" "^7.1.0" - "@babel/plugin-transform-block-scoped-functions" "^7.0.0" - "@babel/plugin-transform-block-scoping" "^7.0.0" - "@babel/plugin-transform-classes" "^7.1.0" - "@babel/plugin-transform-computed-properties" "^7.0.0" - "@babel/plugin-transform-destructuring" "^7.0.0" - "@babel/plugin-transform-dotall-regex" "^7.0.0" - "@babel/plugin-transform-duplicate-keys" "^7.0.0" - "@babel/plugin-transform-exponentiation-operator" "^7.1.0" - "@babel/plugin-transform-for-of" "^7.0.0" - "@babel/plugin-transform-function-name" "^7.1.0" - "@babel/plugin-transform-literals" "^7.0.0" - "@babel/plugin-transform-modules-amd" "^7.1.0" - "@babel/plugin-transform-modules-commonjs" "^7.1.0" - "@babel/plugin-transform-modules-systemjs" "^7.0.0" - "@babel/plugin-transform-modules-umd" "^7.1.0" - "@babel/plugin-transform-new-target" "^7.0.0" - "@babel/plugin-transform-object-super" "^7.1.0" - "@babel/plugin-transform-parameters" "^7.1.0" - "@babel/plugin-transform-regenerator" "^7.0.0" - "@babel/plugin-transform-shorthand-properties" "^7.0.0" - "@babel/plugin-transform-spread" "^7.0.0" - "@babel/plugin-transform-sticky-regex" "^7.0.0" - "@babel/plugin-transform-template-literals" "^7.0.0" - "@babel/plugin-transform-typeof-symbol" "^7.0.0" - "@babel/plugin-transform-unicode-regex" "^7.0.0" - browserslist "^4.1.0" - invariant "^2.2.2" - js-levenshtein "^1.1.3" - semver "^5.3.0" - -"@babel/template@^7.1.0", "@babel/template@^7.1.2": - version "7.1.2" - resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.1.2.tgz#090484a574fef5a2d2d7726a674eceda5c5b5644" - dependencies: - "@babel/code-frame" "^7.0.0" - "@babel/parser" "^7.1.2" - "@babel/types" "^7.1.2" - -"@babel/traverse@^7.1.0": - version "7.1.4" - resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.1.4.tgz#f4f83b93d649b4b2c91121a9087fa2fa949ec2b4" - dependencies: - "@babel/code-frame" "^7.0.0" - "@babel/generator" "^7.1.3" - "@babel/helper-function-name" "^7.1.0" - "@babel/helper-split-export-declaration" "^7.0.0" - "@babel/parser" "^7.1.3" - "@babel/types" "^7.1.3" - debug "^3.1.0" - globals "^11.1.0" - lodash "^4.17.10" - -"@babel/types@^7.0.0", "@babel/types@^7.1.2", "@babel/types@^7.1.3": - version "7.1.3" - resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.1.3.tgz#3a767004567060c2f40fca49a304712c525ee37d" - dependencies: - esutils "^2.0.2" - lodash "^4.17.10" - to-fast-properties "^2.0.0" - -ansi-regex@^2.0.0: - version "2.1.1" - resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-2.1.1.tgz#c3b33ab5ee360d86e0e628f0468ae7ef27d654df" - -ansi-styles@^2.2.1: - version "2.2.1" - resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe" - -ansi-styles@^3.2.1: - version "3.2.1" - resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d" - dependencies: - color-convert "^1.9.0" - -babel-code-frame@^6.26.0: - version "6.26.0" - resolved "https://registry.yarnpkg.com/babel-code-frame/-/babel-code-frame-6.26.0.tgz#63fd43f7dc1e3bb7ce35947db8fe369a3f58c74b" - dependencies: - chalk "^1.1.3" - esutils "^2.0.2" - js-tokens "^3.0.2" - -babel-messages@^6.23.0: - version "6.23.0" - resolved "https://registry.yarnpkg.com/babel-messages/-/babel-messages-6.23.0.tgz#f3cdf4703858035b2a2951c6ec5edf6c62f2630e" - dependencies: - babel-runtime "^6.22.0" - -babel-plugin-syntax-flow@^6.18.0: - version "6.18.0" - resolved "http://registry.npmjs.org/babel-plugin-syntax-flow/-/babel-plugin-syntax-flow-6.18.0.tgz#4c3ab20a2af26aa20cd25995c398c4eb70310c8d" - -babel-plugin-transform-es2015-modules-commonjs@^6.26.2: - version "6.26.2" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-modules-commonjs/-/babel-plugin-transform-es2015-modules-commonjs-6.26.2.tgz#58a793863a9e7ca870bdc5a881117ffac27db6f3" - dependencies: - babel-plugin-transform-strict-mode "^6.24.1" - babel-runtime "^6.26.0" - babel-template "^6.26.0" - babel-types "^6.26.0" - -babel-plugin-transform-flow-strip-types@^6.22.0: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-flow-strip-types/-/babel-plugin-transform-flow-strip-types-6.22.0.tgz#84cb672935d43714fdc32bce84568d87441cf7cf" - dependencies: - babel-plugin-syntax-flow "^6.18.0" - babel-runtime "^6.22.0" - -babel-plugin-transform-strict-mode@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-strict-mode/-/babel-plugin-transform-strict-mode-6.24.1.tgz#d5faf7aa578a65bbe591cf5edae04a0c67020758" - dependencies: - babel-runtime "^6.22.0" - babel-types "^6.24.1" - -babel-runtime@^6.22.0, babel-runtime@^6.26.0: - version "6.26.0" - resolved "https://registry.yarnpkg.com/babel-runtime/-/babel-runtime-6.26.0.tgz#965c7058668e82b55d7bfe04ff2337bc8b5647fe" - dependencies: - core-js "^2.4.0" - regenerator-runtime "^0.11.0" - -babel-template@^6.26.0: - version "6.26.0" - resolved "https://registry.yarnpkg.com/babel-template/-/babel-template-6.26.0.tgz#de03e2d16396b069f46dd9fff8521fb1a0e35e02" - dependencies: - babel-runtime "^6.26.0" - babel-traverse "^6.26.0" - babel-types "^6.26.0" - babylon "^6.18.0" - lodash "^4.17.4" - -babel-traverse@^6.26.0: - version "6.26.0" - resolved "https://registry.yarnpkg.com/babel-traverse/-/babel-traverse-6.26.0.tgz#46a9cbd7edcc62c8e5c064e2d2d8d0f4035766ee" - dependencies: - 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@^6.24.1, babel-types@^6.26.0: - version "6.26.0" - resolved "https://registry.yarnpkg.com/babel-types/-/babel-types-6.26.0.tgz#a3b073f94ab49eb6fa55cd65227a334380632497" - dependencies: - babel-runtime "^6.26.0" - esutils "^2.0.2" - lodash "^4.17.4" - to-fast-properties "^1.0.3" - -babylon@^6.18.0: - version "6.18.0" - resolved "https://registry.yarnpkg.com/babylon/-/babylon-6.18.0.tgz#af2f3b88fa6f5c1e4c634d1a0f8eac4f55b395e3" - -browserslist@^4.1.0: - version "4.2.1" - resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.2.1.tgz#257a24c879d1cd4016348eee5c25de683260b21d" - dependencies: - caniuse-lite "^1.0.30000890" - electron-to-chromium "^1.3.79" - node-releases "^1.0.0-alpha.14" - -caniuse-lite@^1.0.30000890: - version "1.0.30000893" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30000893.tgz#284b20932bd41b93e21626975f2050cb01561986" - -chalk@^1.1.3: - version "1.1.3" - resolved "http://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz#a8115c55e4a702fe4d150abd3872822a7e09fc98" - dependencies: - 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" - -chalk@^2.0.0: - version "2.4.1" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.1.tgz#18c49ab16a037b6eb0152cc83e3471338215b66e" - dependencies: - ansi-styles "^3.2.1" - escape-string-regexp "^1.0.5" - supports-color "^5.3.0" - -color-convert@^1.9.0: - version "1.9.3" - resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.3.tgz#bb71850690e1f136567de629d2d5471deda4c1e8" - dependencies: - color-name "1.1.3" - -color-name@1.1.3: - version "1.1.3" - resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25" - -commander@^2.18.0: - version "2.19.0" - resolved "https://registry.yarnpkg.com/commander/-/commander-2.19.0.tgz#f6198aa84e5b83c46054b94ddedbfed5ee9ff12a" - -convert-source-map@^1.1.0: - version "1.6.0" - resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.6.0.tgz#51b537a8c43e0f04dec1993bffcdd504e758ac20" - dependencies: - safe-buffer "~5.1.1" - -core-js@^2.4.0: - version "2.5.7" - resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.5.7.tgz#f972608ff0cead68b841a16a932d0b183791814e" - -debug@^2.6.8: - version "2.6.9" - resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" - dependencies: - ms "2.0.0" - -debug@^3.1.0: - version "3.2.6" - resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.6.tgz#e83d17de16d8a7efb7717edbe5fb10135eee629b" - dependencies: - ms "^2.1.1" - -electron-to-chromium@^1.3.79: - version "1.3.80" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.80.tgz#e99ec7efe64c2c6a269d3885ff411ea88852fa53" - -escape-string-regexp@^1.0.2, escape-string-regexp@^1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" - -esutils@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.2.tgz#0abf4f1caa5bcb1f7a9d8acc6dea4faaa04bac9b" - -globals@^11.1.0: - version "11.8.0" - resolved "https://registry.yarnpkg.com/globals/-/globals-11.8.0.tgz#c1ef45ee9bed6badf0663c5cb90e8d1adec1321d" - -globals@^9.18.0: - version "9.18.0" - resolved "https://registry.yarnpkg.com/globals/-/globals-9.18.0.tgz#aa3896b3e69b487f17e31ed2143d69a8e30c2d8a" - -has-ansi@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/has-ansi/-/has-ansi-2.0.0.tgz#34f5049ce1ecdf2b0649af3ef24e45ed35416d91" - dependencies: - ansi-regex "^2.0.0" - -has-flag@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd" - -invariant@^2.2.2: - version "2.2.4" - resolved "https://registry.yarnpkg.com/invariant/-/invariant-2.2.4.tgz#610f3c92c9359ce1db616e538008d23ff35158e6" - dependencies: - loose-envify "^1.0.0" - -js-levenshtein@^1.1.3: - version "1.1.4" - resolved "https://registry.yarnpkg.com/js-levenshtein/-/js-levenshtein-1.1.4.tgz#3a56e3cbf589ca0081eb22cd9ba0b1290a16d26e" - -"js-tokens@^3.0.0 || ^4.0.0", js-tokens@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" - -js-tokens@^3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-3.0.2.tgz#9866df395102130e38f7f996bceb65443209c25b" - -jsesc@^2.5.1: - version "2.5.1" - resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-2.5.1.tgz#e421a2a8e20d6b0819df28908f782526b96dd1fe" - -jsesc@~0.5.0: - version "0.5.0" - resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-0.5.0.tgz#e7dee66e35d6fc16f710fe91d5cf69f70f08911d" - -json5@^0.5.0: - version "0.5.1" - resolved "http://registry.npmjs.org/json5/-/json5-0.5.1.tgz#1eade7acc012034ad84e2396767ead9fa5495821" - -lodash@^4.17.10, lodash@^4.17.4: - version "4.17.11" - resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.11.tgz#b39ea6229ef607ecd89e2c8df12536891cac9b8d" - -loose-envify@^1.0.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.4.0.tgz#71ee51fa7be4caec1a63839f7e682d8132d30caf" - dependencies: - js-tokens "^3.0.0 || ^4.0.0" - -minimist@0.0.8: - version "0.0.8" - resolved "http://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d" - -mkdirp@^0.5.1: - version "0.5.1" - resolved "http://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903" - dependencies: - minimist "0.0.8" - -ms@2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" - -ms@^2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.1.tgz#30a5864eb3ebb0a66f2ebe6d727af06a09d86e0a" - -node-releases@^1.0.0-alpha.14: - version "1.0.0-alpha.14" - resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-1.0.0-alpha.14.tgz#da9e2780add4bbb59ad890af9e2018a1d9c0034b" - dependencies: - semver "^5.3.0" - -path-parse@^1.0.5: - version "1.0.6" - resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.6.tgz#d62dbb5679405d72c4737ec58600e9ddcf06d24c" - -private@^0.1.6: - version "0.1.8" - resolved "https://registry.yarnpkg.com/private/-/private-0.1.8.tgz#2381edb3689f7a53d653190060fcf822d2f368ff" - -regenerate-unicode-properties@^7.0.0: - version "7.0.0" - resolved "https://registry.yarnpkg.com/regenerate-unicode-properties/-/regenerate-unicode-properties-7.0.0.tgz#107405afcc4a190ec5ed450ecaa00ed0cafa7a4c" - dependencies: - regenerate "^1.4.0" - -regenerate@^1.4.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/regenerate/-/regenerate-1.4.0.tgz#4a856ec4b56e4077c557589cae85e7a4c8869a11" - -regenerator-runtime@^0.11.0: - version "0.11.1" - resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz#be05ad7f9bf7d22e056f9726cee5017fbf19e2e9" - -regenerator-transform@^0.13.3: - version "0.13.3" - resolved "https://registry.yarnpkg.com/regenerator-transform/-/regenerator-transform-0.13.3.tgz#264bd9ff38a8ce24b06e0636496b2c856b57bcbb" - dependencies: - private "^0.1.6" - -regexpu-core@^4.1.3, regexpu-core@^4.2.0: - version "4.2.0" - resolved "https://registry.yarnpkg.com/regexpu-core/-/regexpu-core-4.2.0.tgz#a3744fa03806cffe146dea4421a3e73bdcc47b1d" - dependencies: - regenerate "^1.4.0" - regenerate-unicode-properties "^7.0.0" - regjsgen "^0.4.0" - regjsparser "^0.3.0" - unicode-match-property-ecmascript "^1.0.4" - unicode-match-property-value-ecmascript "^1.0.2" - -regjsgen@^0.4.0: - version "0.4.0" - resolved "https://registry.yarnpkg.com/regjsgen/-/regjsgen-0.4.0.tgz#c1eb4c89a209263f8717c782591523913ede2561" - -regjsparser@^0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/regjsparser/-/regjsparser-0.3.0.tgz#3c326da7fcfd69fa0d332575a41c8c0cdf588c96" - dependencies: - jsesc "~0.5.0" - -resolve@^1.3.2: - version "1.8.1" - resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.8.1.tgz#82f1ec19a423ac1fbd080b0bab06ba36e84a7a26" - dependencies: - path-parse "^1.0.5" - -safe-buffer@~5.1.1: - version "5.1.2" - resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d" - -semver@^5.3.0, semver@^5.4.1: - version "5.6.0" - resolved "https://registry.yarnpkg.com/semver/-/semver-5.6.0.tgz#7e74256fbaa49c75aa7c7a205cc22799cac80004" - -source-map@^0.5.0: - version "0.5.7" - resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc" - -strip-ansi@^3.0.0: - version "3.0.1" - resolved "http://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz#6a385fb8853d952d5ff05d0e8aaf94278dc63dcf" - dependencies: - ansi-regex "^2.0.0" - -supports-color@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7" - -supports-color@^5.3.0: - version "5.5.0" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f" - dependencies: - has-flag "^3.0.0" - -to-fast-properties@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-1.0.3.tgz#b83571fa4d8c25b82e231b06e3a3055de4ca1a47" - -to-fast-properties@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-2.0.0.tgz#dc5e698cbd079265bc73e0377681a4e4e83f616e" - -trim-right@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/trim-right/-/trim-right-1.0.1.tgz#cb2e1203067e0c8de1f614094b9fe45704ea6003" - -unicode-canonical-property-names-ecmascript@^1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-1.0.4.tgz#2619800c4c825800efdd8343af7dd9933cbe2818" - -unicode-match-property-ecmascript@^1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/unicode-match-property-ecmascript/-/unicode-match-property-ecmascript-1.0.4.tgz#8ed2a32569961bce9227d09cd3ffbb8fed5f020c" - dependencies: - unicode-canonical-property-names-ecmascript "^1.0.4" - unicode-property-aliases-ecmascript "^1.0.4" - -unicode-match-property-value-ecmascript@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/unicode-match-property-value-ecmascript/-/unicode-match-property-value-ecmascript-1.0.2.tgz#9f1dc76926d6ccf452310564fd834ace059663d4" - -unicode-property-aliases-ecmascript@^1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/unicode-property-aliases-ecmascript/-/unicode-property-aliases-ecmascript-1.0.4.tgz#5a533f31b4317ea76f17d807fa0d116546111dd0" diff --git a/internal/npm_install/yarn.lock b/internal/npm_install/yarn.lock index 7617b4a769..880d53c7ac 100644 --- a/internal/npm_install/yarn.lock +++ b/internal/npm_install/yarn.lock @@ -5,3 +5,4 @@ removeNPMAbsolutePaths@1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/removeNPMAbsolutePaths/-/removeNPMAbsolutePaths-1.0.4.tgz#cc657a861485fc55344717972ebf4c453d775d21" + integrity sha512-xPf4iXieSibmA4f824hXLHzM2nwyFxWJ8Mp6PesVuASWmWbyUy0wvq41oYGYmuSe1f5g8gvCch/UaKr4H61x4g== From cf0a405bf92da80400dc3631e598a932bedc8dd5 Mon Sep 17 00:00:00 2001 From: globegitter Date: Fri, 26 Oct 2018 22:46:07 +0200 Subject: [PATCH 51/53] Fix nodejs_binary examples. --- examples/nodejs_binary/BUILD.bazel | 40 +++++++++++++++--------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/examples/nodejs_binary/BUILD.bazel b/examples/nodejs_binary/BUILD.bazel index 759a2ae065..8724d1ddba 100644 --- a/examples/nodejs_binary/BUILD.bazel +++ b/examples/nodejs_binary/BUILD.bazel @@ -1,28 +1,31 @@ load("@build_bazel_rules_nodejs//:defs.bzl", "nodejs_binary") load("@build_bazel_rules_nodejs//:defs.bzl", "babel_library") -js_library( +babel_library( name = "msg", srcs = ["msg.js"], + babel = "@devserver_example_yarn_install//@bazel/babel/bin:babel", ) -js_library( +babel_library( name = "lib", srcs = ["lib.js"], deps = [ ":msg", ], + babel = "@devserver_example_yarn_install//@bazel/babel/bin:babel", ) -js_library( +babel_library( name = "index_lib", srcs = ["index.js"], deps = [ ":lib", ], + babel = "@devserver_example_yarn_install//@bazel/babel/bin:babel", ) -js_library( +babel_library( name = "someLibrary", srcs = [ "someLibrary/index.js", @@ -30,30 +33,27 @@ js_library( ], module_name = "someLibrary", module_root = "someLibrary", + babel = "@devserver_example_yarn_install//@bazel/babel/bin:babel", ) -# nodejs_binary( -# name = "flowBabel", -# data = [ -# "@build_bazel_rules_nodejs//internal/js_library/v2:babel.js", -# "@nodejs_binary_example_yarn_install//@babel/core", -# "@nodejs_binary_example_yarn_install//@babel/preset-env", -# "@nodejs_binary_example_yarn_install//babel-plugin-transform-es2015-modules-commonjs", -# "@nodejs_binary_example_yarn_install//babel-plugin-transform-flow-strip-types", -# "@nodejs_binary_example_yarn_install//commander", -# "@nodejs_binary_example_yarn_install//mkdirp", -# ], -# entry_point = "build_bazel_rules_nodejs/internal/js_library/v2/babel.js", -# install_source_map_support = False, -# ) +nodejs_binary( + name = "flowBabel", + data = [ + "@nodejs_binary_example_yarn_install//@bazel/babel", + "@nodejs_binary_example_yarn_install//babel-plugin-transform-es2015-modules-commonjs", + "@nodejs_binary_example_yarn_install//babel-plugin-transform-flow-strip-types", + ], + entry_point = "@bazel/babel/babel.js", + install_source_map_support = False, +) -js_library( +babel_library( name = "flowLibrary", srcs = [ "flowLibrary/index.js", "flowLibrary/internalFile.js", ], - # babel = ":flowBabel", + babel = ":flowBabel", babelrc = "flowLibrary/flow.babelrc", module_name = "flowLibrary", module_root = "flowLibrary", From 982ee03ea7f1410fc4c601a668793472ca3a8a1e Mon Sep 17 00:00:00 2001 From: globegitter Date: Fri, 26 Oct 2018 23:00:09 +0200 Subject: [PATCH 52/53] Fix docstring. --- internal/babel_library/babel_library.bzl | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/internal/babel_library/babel_library.bzl b/internal/babel_library/babel_library.bzl index 3ac986baf1..5b2076a2fd 100644 --- a/internal/babel_library/babel_library.bzl +++ b/internal/babel_library/babel_library.bzl @@ -1,7 +1,24 @@ -"""babel_library allows defining a set of next generation javascript sources +# Copyright 2017 The Bazel Authors. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +"""Babel support + +babel_library allows defining a set of next generation javascript sources and uses babel to compile them for runtimes of today. It also brings -compatibility with rules_typescript.""" +compatibility with rules_typescript. +""" load("@bazel_skylib//:lib.bzl", "paths") From 86301dd0bfed8eca0f3f1c6c33e547af49661fae Mon Sep 17 00:00:00 2001 From: globegitter Date: Fri, 26 Oct 2018 23:07:54 +0200 Subject: [PATCH 53/53] Run buildifier. --- examples/devserver/BUILD.bazel | 2 +- examples/devserver/src/BUILD.bazel | 2 +- examples/devserver/src/dir/BUILD.bazel | 2 +- examples/devserver/src/my_lib_folder/BUILD.bazel | 2 +- examples/nodejs_binary/BUILD.bazel | 6 +++--- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/examples/devserver/BUILD.bazel b/examples/devserver/BUILD.bazel index 1e7c5490a6..56456aab61 100644 --- a/examples/devserver/BUILD.bazel +++ b/examples/devserver/BUILD.bazel @@ -5,4 +5,4 @@ filegroup( srcs = glob([ "node_modules/**/*", ]), -) \ No newline at end of file +) diff --git a/examples/devserver/src/BUILD.bazel b/examples/devserver/src/BUILD.bazel index 46f7977230..e732dd0b09 100644 --- a/examples/devserver/src/BUILD.bazel +++ b/examples/devserver/src/BUILD.bazel @@ -16,6 +16,7 @@ babel_library( babel_library( name = "test", srcs = ["test.js"], + babel = "@devserver_example_yarn_install//@bazel/babel/bin:babel", # Note: This rc file will only be found by babel when run in the devserver_example workspace # but not in the top-level one, due to how bazel currently handels pathing data = [ @@ -26,7 +27,6 @@ babel_library( "//src/dir:module", "//src/my_lib_folder:my_lib", ], - babel = "@devserver_example_yarn_install//@bazel/babel/bin:babel", ) mock_typescript_devserver( diff --git a/examples/devserver/src/dir/BUILD.bazel b/examples/devserver/src/dir/BUILD.bazel index 0ecd6470d1..3e32a6d6c2 100644 --- a/examples/devserver/src/dir/BUILD.bazel +++ b/examples/devserver/src/dir/BUILD.bazel @@ -3,6 +3,6 @@ load("@build_bazel_rules_nodejs//:defs.bzl", "babel_library") babel_library( name = "module", srcs = ["module.js"], - visibility = ["//src:__subpackages__"], babel = "@devserver_example_yarn_install//@bazel/babel/bin:babel", + visibility = ["//src:__subpackages__"], ) diff --git a/examples/devserver/src/my_lib_folder/BUILD.bazel b/examples/devserver/src/my_lib_folder/BUILD.bazel index 035e5bd9f7..ff7b0a52c5 100644 --- a/examples/devserver/src/my_lib_folder/BUILD.bazel +++ b/examples/devserver/src/my_lib_folder/BUILD.bazel @@ -3,7 +3,7 @@ load("@build_bazel_rules_nodejs//:defs.bzl", "babel_library") babel_library( name = "my_lib", srcs = ["index.js"], + babel = "@devserver_example_yarn_install//@bazel/babel/bin:babel", module_name = "my-lib", visibility = ["//src:__subpackages__"], - babel = "@devserver_example_yarn_install//@bazel/babel/bin:babel", ) diff --git a/examples/nodejs_binary/BUILD.bazel b/examples/nodejs_binary/BUILD.bazel index 8724d1ddba..7a35ba450f 100644 --- a/examples/nodejs_binary/BUILD.bazel +++ b/examples/nodejs_binary/BUILD.bazel @@ -10,19 +10,19 @@ babel_library( babel_library( name = "lib", srcs = ["lib.js"], + babel = "@devserver_example_yarn_install//@bazel/babel/bin:babel", deps = [ ":msg", ], - babel = "@devserver_example_yarn_install//@bazel/babel/bin:babel", ) babel_library( name = "index_lib", srcs = ["index.js"], + babel = "@devserver_example_yarn_install//@bazel/babel/bin:babel", deps = [ ":lib", ], - babel = "@devserver_example_yarn_install//@bazel/babel/bin:babel", ) babel_library( @@ -31,9 +31,9 @@ babel_library( "someLibrary/index.js", "someLibrary/internalFile.js", ], + babel = "@devserver_example_yarn_install//@bazel/babel/bin:babel", module_name = "someLibrary", module_root = "someLibrary", - babel = "@devserver_example_yarn_install//@bazel/babel/bin:babel", ) nodejs_binary(