Skip to content

Commit

Permalink
Make a 'runtime' for is:wasm-ready
Browse files Browse the repository at this point in the history
  • Loading branch information
sigurdm committed Feb 8, 2024
1 parent bd1d668 commit 85674eb
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 14 deletions.
12 changes: 3 additions & 9 deletions lib/src/tag/_specs.dart
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ class Runtime {
nativeAot,
nativeJit,
web,
wasm,
];

static final nativeAot = Runtime(
Expand All @@ -91,8 +92,8 @@ class Runtime {

static final wasm = Runtime(
'wasm',
{..._onAllPlatforms},
tag: PanaTags.runtimeWasm,
{..._onAllPlatforms, 'ui', 'ui_web', 'js_interop', 'js_interop_unsafe'},
tag: PanaTags.isWasmReady,
);

static final flutterNative = Runtime(
Expand All @@ -116,12 +117,6 @@ class Runtime {
tag: PanaTags.runtimeFlutterWeb,
);

static final flutterWasm = Runtime(
'flutter-wasm',
{..._onAllPlatforms, 'ui', 'ui_web'},
tag: PanaTags.runtimeFlutterWasm,
);

/// For platform detection we allow dart:ui.
static final broadWeb = Runtime(
'web',
Expand Down Expand Up @@ -185,7 +180,6 @@ class Platform {
linux,
macos,
web,
wasm,
];

/// Platforms that binary-only packages will be assigned to.
Expand Down
3 changes: 1 addition & 2 deletions lib/src/tag/pana_tags.dart
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@ abstract class PanaTags {
static const runtimeFlutterNative = 'runtime:flutter-native';
static const runtimeFlutterWeb = 'runtime:flutter-web';
static const runtimeWeb = 'runtime:web';
static const runtimeWasm = 'runtime:wasm';
static const runtimeFlutterWasm = 'runtime:flutter-wasm';
static const isWasmReady = 'is:wasm-ready';

// platform tags
static const platformAndroid = 'platform:android';
Expand Down
2 changes: 1 addition & 1 deletion test/goldens/end2end/async-2.11.0.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,10 @@
"platform:linux",
"platform:macos",
"platform:web",
"platform:wasm",
"runtime:native-aot",
"runtime:native-jit",
"runtime:web",
"is:wasm-ready",
"is:null-safe",
"is:dart3-compatible",
"license:bsd-3-clause",
Expand Down
2 changes: 1 addition & 1 deletion test/goldens/end2end/http-0.13.0.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,10 @@
"platform:linux",
"platform:macos",
"platform:web",
"platform:wasm",
"runtime:native-aot",
"runtime:native-jit",
"runtime:web",
"is:wasm-ready",
"is:null-safe",
"is:dart3-compatible",
"license:bsd-3-clause",
Expand Down
2 changes: 1 addition & 1 deletion test/goldens/end2end/lints-1.0.0.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@
"platform:linux",
"platform:macos",
"platform:web",
"platform:wasm",
"runtime:native-aot",
"runtime:native-jit",
"runtime:web",
"is:wasm-ready",
"is:null-safe",
"is:dart3-compatible",
"license:bsd-3-clause",
Expand Down
1 change: 1 addition & 0 deletions test/tag/tag_end2end_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ void main() {
'runtime:native-jit',
'runtime:native-aot',
'runtime:web',
'is:wasm-ready',
},
explanations: isEmpty);
_expectTagging(tagger.flutterPluginTags, tags: isEmpty);
Expand Down

0 comments on commit 85674eb

Please sign in to comment.