Skip to content

Commit

Permalink
Skip platform check for node_io (#68)
Browse files Browse the repository at this point in the history
  • Loading branch information
pulyaevskiy authored Sep 26, 2019
1 parent 505ef31 commit 305dbe4
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 5 deletions.
6 changes: 6 additions & 0 deletions build_node_compilers/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# 0.2.3

- Fix: Added node_io to list of known packages that can skip platform checks when compiled with
dart2js ([#67](https://github.com/pulyaevskiy/node-interop/issues/67)).
- Internal: fixed all pedantic issues.

# 0.2.2

- Upgraded to latest build dependencies and synced with build_web_compilers as a reference implementation.
Expand Down
2 changes: 1 addition & 1 deletion build_node_compilers/analysis_options.yaml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
include: package:pedantic/analysis_options.yaml
include: package:pedantic/analysis_options.yaml
9 changes: 6 additions & 3 deletions build_node_compilers/lib/src/dart2js_bootstrap.dart
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,17 @@ import 'dart:convert';
import 'dart:io';

import 'package:build/build.dart';
import 'package:node_preamble/preamble.dart';
import 'package:build_modules/build_modules.dart';
import 'package:crypto/crypto.dart';
import 'package:scratch_space/scratch_space.dart';
import 'package:node_preamble/preamble.dart';
import 'package:path/path.dart' as p;
import 'package:scratch_space/scratch_space.dart';

import 'node_entrypoint_builder.dart';
import 'platforms.dart';

const _knownPackagesToSkipPlatformCheck = {"node_io"};

Future<void> bootstrapDart2Js(
BuildStep buildStep, List<String> dart2JsArgs) async {
var dartEntrypointId = buildStep.inputId;
Expand All @@ -28,7 +30,8 @@ Future<void> bootstrapDart2Js(
List<Module> allDeps;
try {
allDeps = (await module.computeTransitiveDependencies(buildStep,
throwIfUnsupported: true))
throwIfUnsupported: true,
skipPlatformCheckPackages: _knownPackagesToSkipPlatformCheck))
..add(module);
} on UnsupportedModules catch (e) {
var librariesString = (await e.exactLibraries(buildStep).toList())
Expand Down
2 changes: 1 addition & 1 deletion build_node_compilers/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: build_node_compilers
version: 0.2.2
version: 0.2.3
description: Builders wrapping DDC and dart2js compilers configured to output Node modules.
homepage: https://github.com/pulyaevskiy/node-interop
author: Anatoly Pulyaevskiy <[email protected]>
Expand Down

0 comments on commit 305dbe4

Please sign in to comment.