Skip to content

Commit

Permalink
update types
Browse files Browse the repository at this point in the history
  • Loading branch information
devoncarew committed Jul 11, 2023
1 parent 8ed913e commit df83a63
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 9 deletions.
1 change: 1 addition & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,4 @@ jobs:
- run: dart pub get
- run: dart analyze --fatal-infos
- run: dart tool/sig.dart --verify
- run: npm build
18 changes: 15 additions & 3 deletions lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,10 @@ void main(List<String> args) async {
}

// Report success; print version.
await promiseToFuture(exec.exec('dart', ['--version']));
await promiseToFuture(exec.exec(
'dart',
['--version'].map((str) => str.toJS).toList().toJS,
));
} catch (error) {
core.setFailed('$error');
}
Expand Down Expand Up @@ -157,8 +160,17 @@ Future<void> createPubOIDCToken() async {

core.exportVariable('PUB_TOKEN', token);

await promiseToFuture(exec.exec('dart',
['pub', 'token', 'add', 'https://pub.dev', '--env-var', 'PUB_TOKEN']));
await promiseToFuture(exec.exec(
'dart',
[
'pub',
'token',
'add',
'https://pub.dev',
'--env-var',
'PUB_TOKEN',
].map((str) => str.toJS).toList().toJS,
));
}

// https://storage.googleapis.com/dart-archive/channels/stable/release/latest/VERSION
Expand Down
2 changes: 1 addition & 1 deletion lib/node/actions/exec.dart
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@ inline class Exec {
///
/// Output will be streamed to the live console. Returns promise with return
/// code.
external JSPromise exec(String commandLine, [List<String> args]);
external JSPromise exec(String commandLine, [JSArray? args]);
}
4 changes: 2 additions & 2 deletions lib/node/actions/tool_cache.dart
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ inline class ToolCache {
external String find(
String toolName,
String versionSpec, [
String arch,
String? arch,
]);

/// Download a tool from an url and stream it into a file.
Expand All @@ -44,6 +44,6 @@ inline class ToolCache {
String sourceDir,
String tool,
String version, [
String arch,
String? arch,
]);
}
6 changes: 3 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit df83a63

Please sign in to comment.