update conditionals so that web usages dont accidentally use the node package
diff --git a/pkgs/glob/lib/src/io.dart b/pkgs/glob/lib/src/io.dart index 32a30d3..20e532b 100644 --- a/pkgs/glob/lib/src/io.dart +++ b/pkgs/glob/lib/src/io.dart
@@ -4,4 +4,8 @@ // These libraries don't expose *exactly* the same API, but they overlap in all // the cases we care about. -export 'dart:io' if (dart.library.js) 'package:node_io/node_io.dart'; +export 'io_export.dart' + // We don't actually support the web - exporting dart:io gives a reasonably + // clear signal to users about that since it doesn't exist. + if (dart.library.html) 'io_export.dart' + if (dart.library.js) 'package:node_io/node_io.dart';
diff --git a/pkgs/glob/lib/src/io_export.dart b/pkgs/glob/lib/src/io_export.dart new file mode 100644 index 0000000..7f339cf --- /dev/null +++ b/pkgs/glob/lib/src/io_export.dart
@@ -0,0 +1,9 @@ +// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +/// This library exists only to satisfy build_runner, which doesn't allow +/// sdk libraries to be conditional imported or exported directly. +library glob.src.io_export; + +export 'dart:io';